Sub: send messages to GCS when toggling roll/pitch control

This commit is contained in:
Willian Galvani 2020-02-20 16:32:09 -03:00 committed by Jacob Walser
parent ba415c99fe
commit 824816ddcb

View File

@ -561,6 +561,12 @@ void Sub::handle_jsbutton_press(uint8_t _button, bool shift, bool held)
case JSButton::button_function_t::k_roll_pitch_toggle:
if (!held) {
roll_pitch_flag = !roll_pitch_flag;
if (roll_pitch_flag) {
gcs().send_text(MAV_SEVERITY_INFO, "#Attitude Control");
}
else {
gcs().send_text(MAV_SEVERITY_INFO, "#Movement Control");
}
}
break;