Browse Source

Rover: fixed build warnings

master
Andrew Tridgell 10 years ago
parent
commit
f400f39f08
  1. 16
      APMrover2/GCS_Mavlink.pde
  2. 1
      APMrover2/commands_logic.pde
  3. 4
      APMrover2/setup.pde

16
APMrover2/GCS_Mavlink.pde

@ -530,14 +530,22 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id) @@ -530,14 +530,22 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id)
// unused
break;
case MSG_RETRY_DEFERRED:
case MSG_TERRAIN:
break; // just here to prevent a warning
case MSG_BATTERY2:
CHECK_PAYLOAD_SIZE(BATTERY2);
gcs[chan-MAVLINK_COMM_0].send_battery2(battery);
break;
case MSG_CAMERA_FEEDBACK:
#if CAMERA == ENABLED
CHECK_PAYLOAD_SIZE(CAMERA_FEEDBACK);
camera.send_feedback(chan, gps, ahrs, current_loc);
#endif
break;
case MSG_RETRY_DEFERRED:
case MSG_TERRAIN:
case MSG_OPTICAL_FLOW:
break; // just here to prevent a warning
}

1
APMrover2/commands_logic.pde

@ -308,6 +308,7 @@ static void do_take_picture() @@ -308,6 +308,7 @@ static void do_take_picture()
{
#if CAMERA == ENABLED
camera.trigger_pic();
gcs_send_message(MSG_CAMERA_FEEDBACK);
if (should_log(MASK_LOG_CAMERA)) {
DataFlash.Log_Write_Camera(ahrs, gps, current_loc);
}

4
APMrover2/setup.pde

@ -341,9 +341,7 @@ setup_flightmodes(uint8_t argc, const Menu::arg *argv) @@ -341,9 +341,7 @@ setup_flightmodes(uint8_t argc, const Menu::arg *argv)
mode != AUTO &&
mode != RTL)
{
if (mode < MANUAL)
mode = RTL;
else if (mode > RTL)
if (mode > RTL)
mode = MANUAL;
else
mode += radioInputSwitch;

Loading…
Cancel
Save