aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/px4fmu/fmu.cpp
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-05-06 22:59:45 +0400
committerAnton Babushkin <anton.babushkin@me.com>2013-05-06 22:59:45 +0400
commitf3e6e4bb50d9d5e63ee423a25713d9033adcebf4 (patch)
treead76e652f05abfa7033c83029c2188dc16d44876 /apps/drivers/px4fmu/fmu.cpp
parent012a0bbc0d8b0880fd4cba7e1c7ee5a208101717 (diff)
downloadpx4-firmware-f3e6e4bb50d9d5e63ee423a25713d9033adcebf4.tar.gz
px4-firmware-f3e6e4bb50d9d5e63ee423a25713d9033adcebf4.tar.bz2
px4-firmware-f3e6e4bb50d9d5e63ee423a25713d9033adcebf4.zip
Update servo arm only on real change.
Diffstat (limited to 'apps/drivers/px4fmu/fmu.cpp')
-rw-r--r--apps/drivers/px4fmu/fmu.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/drivers/px4fmu/fmu.cpp b/apps/drivers/px4fmu/fmu.cpp
index e54724536..761a23c42 100644
--- a/apps/drivers/px4fmu/fmu.cpp
+++ b/apps/drivers/px4fmu/fmu.cpp
@@ -505,7 +505,11 @@ PX4FMU::task_main()
orb_copy(ORB_ID(actuator_armed), _t_armed, &aa);
/* update PWM servo armed status if armed and not locked down */
- up_pwm_servo_arm(aa.armed && !aa.lockdown);
+ bool set_armed = aa.armed && !aa.lockdown;
+ if (set_armed != _armed) {
+ _armed = set_armed;
+ up_pwm_servo_arm(set_armed);
+ }
}
// see if we have new PPM input data