diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-03-09 13:20:05 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-03-09 13:20:05 +0100 |
commit | 74bcf29c698ee9b6f8a7859d59c28f4a69a54e02 (patch) | |
tree | 6cdb1b2e071807089c5b11bb5dc5860d632c17ad /apps/px4io/controls.c | |
parent | 5335de4cc71aa283366b683d169e8f90af78569d (diff) | |
download | px4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.tar.gz px4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.tar.bz2 px4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.zip |
Refactored debug level into proper register, px4io status now correctly reads it. Added more of the missing alarms clear logic, alarms reporting now consistent. Adding missing sign change on mode switch, fixes override issue when attempting to switch to auto mode. Pending outdoor tests
Diffstat (limited to 'apps/px4io/controls.c')
-rw-r--r-- | apps/px4io/controls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/px4io/controls.c b/apps/px4io/controls.c index 2d99116f8..b507078a1 100644 --- a/apps/px4io/controls.c +++ b/apps/px4io/controls.c @@ -213,7 +213,9 @@ controls_tick() { if (assigned_channels == 0) { rc_input_lost = true; } else { + /* set RC OK flag and clear RC lost alarm */ r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_OK; + r_status_alarms &= ~PX4IO_P_STATUS_ALARMS_RC_LOST; } /* @@ -274,7 +276,7 @@ controls_tick() { * requested override. * */ - if ((r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK) && (r_rc_values[4] > RC_CHANNEL_HIGH_THRESH)) + if ((r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK) && (REG_TO_SIGNED(r_rc_values[4]) > RC_CHANNEL_HIGH_THRESH)) override = true; if (override) { |