add TransportFSM::transport_speed(), a putative replacement for the Session method of the same name
This commit is contained in:
parent
438b1e5eab
commit
825c299feb
|
@ -151,6 +151,8 @@ struct TransportFSM
|
||||||
|
|
||||||
std::string current_state () const;
|
std::string current_state () const;
|
||||||
|
|
||||||
|
int transport_speed () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MotionState _motion_state;
|
MotionState _motion_state;
|
||||||
ButlerState _butler_state;
|
ButlerState _butler_state;
|
||||||
|
|
|
@ -638,6 +638,20 @@ TransportFSM::enqueue (Event* ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
TransportFSM::transport_speed() const
|
||||||
|
{
|
||||||
|
if (_motion_state == Stopped || _direction_state == Reversing) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_direction_state == Backwards) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransportFSM::set_speed (Event const & ev)
|
TransportFSM::set_speed (Event const & ev)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user