aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/mixer.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-03-09 11:03:06 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-03-09 11:03:06 +0100
commitcc628fbc27794fee52e3a6f33d091758ca1cb51a (patch)
tree8b07c8f8dfdc762ae20fd4d07361e8320a88aabd /apps/px4io/mixer.cpp
parent7c8942f46c87c117533ce2c4a1886f7c364399ca (diff)
downloadpx4-firmware-cc628fbc27794fee52e3a6f33d091758ca1cb51a.tar.gz
px4-firmware-cc628fbc27794fee52e3a6f33d091758ca1cb51a.tar.bz2
px4-firmware-cc628fbc27794fee52e3a6f33d091758ca1cb51a.zip
Add missing mixer ok check in override mode, clear FMU lost alarm when setting FMU_OK flag, print AP RX timeout in production mode as well
Diffstat (limited to 'apps/px4io/mixer.cpp')
-rw-r--r--apps/px4io/mixer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/px4io/mixer.cpp b/apps/px4io/mixer.cpp
index ed74cb3d3..65de864ec 100644
--- a/apps/px4io/mixer.cpp
+++ b/apps/px4io/mixer.cpp
@@ -92,7 +92,7 @@ mixer_tick(void)
/* too long without FMU input, time to go to failsafe */
if (r_status_flags & PX4IO_P_STATUS_FLAGS_FMU_OK) {
- debug("AP RX timeout");
+ lowsyslog("AP RX timeout");
}
r_status_flags &= ~(PX4IO_P_STATUS_FLAGS_FMU_OK | PX4IO_P_STATUS_FLAGS_RAW_PWM);
r_status_alarms |= PX4IO_P_STATUS_ALARMS_FMU_LOST;
@@ -101,6 +101,7 @@ mixer_tick(void)
r_status_flags |= PX4IO_P_STATUS_FLAGS_OVERRIDE;
} else {
r_status_flags |= PX4IO_P_STATUS_FLAGS_FMU_OK;
+ r_status_alarms &= ~PX4IO_P_STATUS_ALARMS_FMU_LOST;
}
source = MIX_FAILSAFE;
@@ -123,7 +124,8 @@ mixer_tick(void)
}
if ( (r_status_flags & PX4IO_P_STATUS_FLAGS_OVERRIDE) &&
- (r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK)) {
+ (r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK) &&
+ (r_status_flags & PX4IO_P_STATUS_FLAGS_MIXER_OK)) {
/* if allowed, mix from RC inputs directly */
source = MIX_OVERRIDE;