13
0

fix thinko when handling set_speed (0.0)

Code only handled a reversing->rolling path, not reversing->stopped
This commit is contained in:
Paul Davis 2020-02-24 20:06:43 -07:00
parent 4749fcef86
commit 7e4728027c

View File

@ -327,12 +327,14 @@ TransportFSM::process_event (Event& ev, bool already_deferred, bool& deferred)
if (reversing()) { if (reversing()) {
if (most_recently_requested_speed > 0) { if (most_recently_requested_speed >= 0.) {
transition (Forwards); transition (Forwards);
} else { } else {
transition (Forwards); transition (Backwards);
} }
if (fabs (most_recently_requested_speed) > 0.) {
transition (Rolling); transition (Rolling);
api->set_transport_speed (last_speed_request.speed, last_speed_request.abort_capture, last_speed_request.clear_state, last_speed_request.as_default); api->set_transport_speed (last_speed_request.speed, last_speed_request.abort_capture, last_speed_request.clear_state, last_speed_request.as_default);
@ -340,6 +342,9 @@ TransportFSM::process_event (Event& ev, bool already_deferred, bool& deferred)
if (most_recently_requested_speed != 0.0) { if (most_recently_requested_speed != 0.0) {
roll_after_locate (); roll_after_locate ();
} }
} else {
transition (Stopped);
}
} else { } else {
if (should_not_roll_after_locate()) { if (should_not_roll_after_locate()) {