From 5c60ed9a9457e3ab0c51584e7e0db59bdbe4fd87 Mon Sep 17 00:00:00 2001 From: px4dev Date: Mon, 14 Jan 2013 01:11:29 -0800 Subject: Fix up FMU input timeout handling. Fix the FMU auto OK LED status. Strip out unused fields from the system state structure. --- apps/px4io/registers.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/px4io/registers.c') diff --git a/apps/px4io/registers.c b/apps/px4io/registers.c index 59684f1ee..0dd8fe28d 100644 --- a/apps/px4io/registers.c +++ b/apps/px4io/registers.c @@ -42,6 +42,8 @@ #include #include +#include + #include "px4io.h" #include "protocol.h" @@ -140,6 +142,8 @@ uint16_t r_page_rc_input_config[MAX_CONTROL_CHANNELS * PX4IO_P_RC_CONFIG_STRIDE void registers_set(uint8_t page, uint8_t offset, const uint16_t *values, unsigned num_values) { + system_state.fmu_data_received_time = hrt_absolute_time(); + switch (page) { /* handle bulk controls input */ @@ -157,6 +161,7 @@ registers_set(uint8_t page, uint8_t offset, const uint16_t *values, unsigned num } /* XXX we should cause a mixer tick ASAP */ + system_state.fmu_data_received_time = hrt_absolute_time(); r_status_flags |= PX4IO_P_STATUS_FLAGS_FMU_OK; break; -- cgit v1.2.3