Rover: fixed build warnings

This commit is contained in:
Andrew Tridgell 2015-01-06 15:28:38 +11:00
parent 8a77fef6f8
commit f400f39f08
3 changed files with 14 additions and 7 deletions

View File

@ -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
}

View File

@ -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);
}

View File

@ -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;