Rover: only send RC_CHANNELS_SCALED in HIL

saves a bit of telemetry bandwidth
This commit is contained in:
Andrew Tridgell 2013-09-21 09:27:38 +10:00
parent b6a0577723
commit b52b6ce121

View File

@ -265,6 +265,8 @@ static void NOINLINE send_gps_raw(mavlink_channel_t chan)
g_gps->num_sats); g_gps->num_sats);
} }
#if HIL_MODE != HIL_MODE_DISABLED
static void NOINLINE send_servo_out(mavlink_channel_t chan) static void NOINLINE send_servo_out(mavlink_channel_t chan)
{ {
// normalized values scaled to -10000 to 10000 // normalized values scaled to -10000 to 10000
@ -284,6 +286,7 @@ static void NOINLINE send_servo_out(mavlink_channel_t chan)
0, 0,
receiver_rssi); receiver_rssi);
} }
#endif
static void NOINLINE send_radio_in(mavlink_channel_t chan) static void NOINLINE send_radio_in(mavlink_channel_t chan)
{ {
@ -526,8 +529,10 @@ static bool mavlink_try_send_message(mavlink_channel_t chan, enum ap_message id,
break; break;
case MSG_SERVO_OUT: case MSG_SERVO_OUT:
#if HIL_MODE != HIL_MODE_DISABLED
CHECK_PAYLOAD_SIZE(RC_CHANNELS_SCALED); CHECK_PAYLOAD_SIZE(RC_CHANNELS_SCALED);
send_servo_out(chan); send_servo_out(chan);
#endif
break; break;
case MSG_RADIO_IN: case MSG_RADIO_IN: