Plane: fixed the last build warnings

we now build with no warnings for APM1, APM2 and SITL. Yay!
This commit is contained in:
Andrew Tridgell 2012-12-20 22:46:48 +11:00
parent 8d47a739a1
commit d54c6989ab
3 changed files with 4 additions and 10 deletions

View File

@ -941,9 +941,7 @@ static void slow_loop()
mavlink_system.sysid = g.sysid_this_mav; // This is just an ugly hack to keep mavlink_system.sysid sync'd with our parameter
#if USB_MUX_PIN > 0
check_usb_mux();
#endif
break;
}

View File

@ -458,13 +458,13 @@ static void NOINLINE send_ahrs(mavlink_channel_t chan)
ahrs.get_error_yaw());
}
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
// report simulator state
static void NOINLINE send_simstate(mavlink_channel_t chan)
{
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
sitl.simstate_send(chan);
}
#endif
}
static void NOINLINE send_hwstatus(mavlink_channel_t chan)
{
@ -650,10 +650,8 @@ static bool mavlink_try_send_message(mavlink_channel_t chan, enum ap_message id,
break;
case MSG_SIMSTATE:
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
CHECK_PAYLOAD_SIZE(SIMSTATE);
send_simstate(chan);
#endif
break;
case MSG_HWSTATUS:
@ -2029,9 +2027,7 @@ static void mavlink_delay_cb()
last_5s = tnow;
gcs_send_text_P(SEVERITY_LOW, PSTR("Initialising APM..."));
}
#if USB_MUX_PIN > 0
check_usb_mux();
#endif
in_mavlink_delay = false;
}

View File

@ -511,9 +511,9 @@ static uint32_t map_baudrate(int8_t rate, uint32_t default_baud)
}
#if USB_MUX_PIN > 0
static void check_usb_mux(void)
{
#if USB_MUX_PIN > 0
bool usb_check = !digitalRead(USB_MUX_PIN);
if (usb_check == usb_connected) {
return;
@ -526,8 +526,8 @@ static void check_usb_mux(void)
} else {
hal.uartA->begin(map_baudrate(g.serial3_baud, SERIAL3_BAUD));
}
}
#endif
}
/*