diff options
author | Simon Wilks <sjwilks@gmail.com> | 2015-05-04 22:08:10 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-05-07 08:27:41 +0200 |
commit | ea8ba794812256bc8acf593b0145457a5d5271fd (patch) | |
tree | 8112b0fc04f698a1d7ba45345ce3cf75eacf97ec /src | |
parent | db8dd000e3f60a56d63e83b7031ebfeb850f8e04 (diff) | |
download | px4-firmware-ea8ba794812256bc8acf593b0145457a5d5271fd.tar.gz px4-firmware-ea8ba794812256bc8acf593b0145457a5d5271fd.tar.bz2 px4-firmware-ea8ba794812256bc8acf593b0145457a5d5271fd.zip |
Read the current flight termination circuit breaker value, not just updated values.
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 0b24ef152..176f5b241 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -909,6 +909,9 @@ PX4IO::task_main() goto out; } + /* Fetch initial flight termination circuit breaker state */ + _cb_flighttermination = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY); + /* poll descriptor */ pollfd fds[1]; fds[0].fd = _t_actuator_controls_0; @@ -1079,7 +1082,7 @@ PX4IO::task_main() } } - /* Update Circuit breakers */ + /* Check if the flight termination circuit breaker has been updated */ _cb_flighttermination = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY); param_get(param_find("RC_RSSI_PWM_CHAN"), &_rssi_pwm_chan); |