aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/safety.c
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-09-03 09:34:25 +0200
committerJulian Oes <julian@oes.ch>2013-09-03 09:34:25 +0200
commit96e7f42844abbd2a3ef36e207e639c0dffe75e66 (patch)
tree4ef89b11ababd57c5d16a1d531918127fbc722d4 /src/modules/px4iofirmware/safety.c
parent1fed9ef1b1ec2d0bf7c2cba7d60be77e37faaf40 (diff)
parent2457013bbba3e15e3fbfcc45f07428f006d56dcd (diff)
downloadpx4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.tar.gz
px4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.tar.bz2
px4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.zip
Merge branch 'master' into python3_compat
Diffstat (limited to 'src/modules/px4iofirmware/safety.c')
-rw-r--r--src/modules/px4iofirmware/safety.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/px4iofirmware/safety.c b/src/modules/px4iofirmware/safety.c
index 4dbecc274..95335f038 100644
--- a/src/modules/px4iofirmware/safety.c
+++ b/src/modules/px4iofirmware/safety.c
@@ -110,7 +110,7 @@ safety_check_button(void *arg)
* state machine, keep ARM_COUNTER_THRESHOLD the same
* length in all cases of the if/else struct below.
*/
- if (safety_button_pressed && !(r_status_flags & PX4IO_P_STATUS_FLAGS_ARMED) &&
+ if (safety_button_pressed && !(r_status_flags & PX4IO_P_STATUS_FLAGS_SAFETY_OFF) &&
(r_setup_arming & PX4IO_P_SETUP_ARMING_IO_ARM_OK)) {
if (counter < ARM_COUNTER_THRESHOLD) {
@@ -118,18 +118,18 @@ safety_check_button(void *arg)
} else if (counter == ARM_COUNTER_THRESHOLD) {
/* switch to armed state */
- r_status_flags |= PX4IO_P_STATUS_FLAGS_ARMED;
+ r_status_flags |= PX4IO_P_STATUS_FLAGS_SAFETY_OFF;
counter++;
}
- } else if (safety_button_pressed && (r_status_flags & PX4IO_P_STATUS_FLAGS_ARMED)) {
+ } else if (safety_button_pressed && (r_status_flags & PX4IO_P_STATUS_FLAGS_SAFETY_OFF)) {
if (counter < ARM_COUNTER_THRESHOLD) {
counter++;
} else if (counter == ARM_COUNTER_THRESHOLD) {
/* change to disarmed state and notify the FMU */
- r_status_flags &= ~PX4IO_P_STATUS_FLAGS_ARMED;
+ r_status_flags &= ~PX4IO_P_STATUS_FLAGS_SAFETY_OFF;
counter++;
}
@@ -140,7 +140,7 @@ safety_check_button(void *arg)
/* Select the appropriate LED flash pattern depending on the current IO/FMU arm state */
uint16_t pattern = LED_PATTERN_FMU_REFUSE_TO_ARM;
- if (r_status_flags & PX4IO_P_STATUS_FLAGS_ARMED) {
+ if (r_status_flags & PX4IO_P_STATUS_FLAGS_SAFETY_OFF) {
if (r_setup_arming & PX4IO_P_SETUP_ARMING_FMU_ARMED) {
pattern = LED_PATTERN_IO_FMU_ARMED;