destination
Transition between states
Transition code
destination = (int)*rtdata;
if ((destination > 0) && (position < 0))
{
to_rudder.do_rudder_right().send();
to_aileron.do_aileron_right().send();
}
else if ((destination > 0) && (position < 0))
{
to_rudder.do_rudder_left().send();
to_aileron.do_aileron_left().send();
}
else if ((destination > 0) && (position > 0))
{
to_rudder.do_rudder_straight().send();
to_aileron.do_aileron_straight().send();
}
else if ((destination < 0) && (position < 0))
{
to_rudder.do_rudder_straight().send();
to_aileron.do_aileron_straight().send();
}
Triggers: