aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/registers.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-02-17 17:47:26 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-02-17 17:47:26 +0100
commit56bf9855a8f8140a8a5edeeb08f4246249b27085 (patch)
tree87936852503268586228b197126f77ca34ae57d5 /apps/px4io/registers.c
parentf689f0abb0832c3d68e462e291a7a4d6dd43e216 (diff)
downloadpx4-firmware-56bf9855a8f8140a8a5edeeb08f4246249b27085.tar.gz
px4-firmware-56bf9855a8f8140a8a5edeeb08f4246249b27085.tar.bz2
px4-firmware-56bf9855a8f8140a8a5edeeb08f4246249b27085.zip
Finished and tested in-air restore of arming state, as long as both boards reset at the same time armings state is now retained
Diffstat (limited to 'apps/px4io/registers.c')
-rw-r--r--apps/px4io/registers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/px4io/registers.c b/apps/px4io/registers.c
index be3bebada..40bf72482 100644
--- a/apps/px4io/registers.c
+++ b/apps/px4io/registers.c
@@ -270,6 +270,16 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
r_status_alarms &= ~value;
break;
+ case PX4IO_P_STATUS_FLAGS:
+ /*
+ * Allow FMU override of arming state (to allow in-air restores),
+ * but only if the arming state is not in sync on the IO side.
+ */
+ if (!(r_status_flags & PX4IO_P_STATUS_FLAGS_ARM_SYNC)) {
+ r_status_flags = value;
+ }
+ break;
+
default:
/* just ignore writes to other registers in this page */
break;