Skip to content
Snippets Groups Projects
Commit c16e3a03 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

Plane: fixed disarmed throttle in HIL

parent 776b999f
No related branches found
No related tags found
No related merge requests found
...@@ -855,16 +855,6 @@ static void set_servos(void) ...@@ -855,16 +855,6 @@ static void set_servos(void)
channel_rudder->radio_out = channel_rudder->radio_in; channel_rudder->radio_out = channel_rudder->radio_in;
} }
#if HIL_MODE != HIL_MODE_DISABLED
// get the servos to the GCS immediately for HIL
if (comm_get_txspace(MAVLINK_COMM_0) - MAVLINK_NUM_NON_PAYLOAD_BYTES >= MAVLINK_MSG_ID_SERVO_OUTPUT_RAW_LEN) {
send_radio_out(MAVLINK_COMM_0);
}
if (!g.hil_servos) {
return;
}
#endif
if (g.vtail_output != MIXING_DISABLED) { if (g.vtail_output != MIXING_DISABLED) {
channel_output_mixer(g.vtail_output, channel_pitch->radio_out, channel_rudder->radio_out); channel_output_mixer(g.vtail_output, channel_pitch->radio_out, channel_rudder->radio_out);
} else if (g.elevon_output != MIXING_DISABLED) { } else if (g.elevon_output != MIXING_DISABLED) {
...@@ -889,6 +879,16 @@ static void set_servos(void) ...@@ -889,6 +879,16 @@ static void set_servos(void)
} }
} }
#if HIL_MODE != HIL_MODE_DISABLED
// get the servos to the GCS immediately for HIL
if (comm_get_txspace(MAVLINK_COMM_0) - MAVLINK_NUM_NON_PAYLOAD_BYTES >= MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN) {
send_servo_out(MAVLINK_COMM_0);
}
if (!g.hil_servos) {
return;
}
#endif
// send values to the PWM timers for output // send values to the PWM timers for output
// ---------------------------------------- // ----------------------------------------
channel_roll->output(); channel_roll->output();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment