Browse Source

Sub: send Roll/Pitch Toggle flag

zr-v5.1
Willian Galvani 5 years ago committed by Jacob Walser
parent
commit
ba415c99fe
  1. 3
      ArduSub/GCS_Mavlink.cpp
  2. 3
      ArduSub/Sub.h
  3. 1
      ArduSub/joystick.cpp

3
ArduSub/GCS_Mavlink.cpp

@ -140,6 +140,9 @@ bool GCS_MAVLINK_Sub::send_info() @@ -140,6 +140,9 @@ bool GCS_MAVLINK_Sub::send_info()
CHECK_PAYLOAD_SIZE(NAMED_VALUE_FLOAT);
send_named_float("InputHold", sub.input_hold_engaged);
CHECK_PAYLOAD_SIZE(NAMED_VALUE_FLOAT);
send_named_float("RollPitch", sub.roll_pitch_flag);
return true;
}

3
ArduSub/Sub.h

@ -308,6 +308,9 @@ private: @@ -308,6 +308,9 @@ private:
// Flag indicating if we are currently using input hold
bool input_hold_engaged;
// Flag indicating if we are currently controlling Pitch and Roll instead of forward/lateral
bool roll_pitch_flag = false;
// 3D Location vectors
// Current location of the Sub (altitude is relative to home)
Location current_loc;

1
ArduSub/joystick.cpp

@ -24,7 +24,6 @@ const uint8_t SERVO_CHAN_1 = 9; // Pixhawk Aux1 @@ -24,7 +24,6 @@ const uint8_t SERVO_CHAN_1 = 9; // Pixhawk Aux1
const uint8_t SERVO_CHAN_2 = 10; // Pixhawk Aux2
const uint8_t SERVO_CHAN_3 = 11; // Pixhawk Aux3
uint8_t roll_pitch_flag = false; // Flag to adjust roll/pitch instead of forward/lateral
bool controls_reset_since_input_hold = true;
}

Loading…
Cancel
Save