aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/comms.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/px4io/comms.c')
-rw-r--r--apps/px4io/comms.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/px4io/comms.c b/apps/px4io/comms.c
index 0fcf952ab..9a786234e 100644
--- a/apps/px4io/comms.c
+++ b/apps/px4io/comms.c
@@ -183,7 +183,7 @@ comms_handle_command(const void *buffer, size_t length)
system_state.vector_flight_mode_ok = cmd->vector_flight_mode_ok;
system_state.manual_override_ok = cmd->manual_override_ok;
system_state.mixer_fmu_available = true;
- system_state.fmu_data_received = true;
+ system_state.fmu_data_received_time = hrt_absolute_time();
/* set PWM update rate if changed (after limiting) */
uint16_t new_servo_rate = cmd->servo_rate;
@@ -201,6 +201,9 @@ comms_handle_command(const void *buffer, size_t length)
system_state.servo_rate = new_servo_rate;
}
+ /* update servo values immediately */
+ mixer_tick();
+
/* XXX do relay changes here */
for (unsigned i = 0; i < PX4IO_RELAY_CHANNELS; i++) {
system_state.relays[i] = cmd->relay_state[i];