Browse Source

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

c415-sdk
Willian Galvani 5 years ago committed by Jacob Walser
parent
commit
824816ddcb
  1. 6
      ArduSub/joystick.cpp

6
ArduSub/joystick.cpp

@ -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: case JSButton::button_function_t::k_roll_pitch_toggle:
if (!held) { if (!held) {
roll_pitch_flag = !roll_pitch_flag; 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; break;

Loading…
Cancel
Save