diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-05-16 09:12:13 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-05-16 09:12:13 +0200 |
commit | 58084685b2b2f8e31598320318a7c34dd0a96955 (patch) | |
tree | ed55c5db4bea5143c8e0640cbc524bb8c61f9334 /src/drivers/px4io | |
parent | fa816d0fd65da461fd5bf8803cf00caebaf23c5c (diff) | |
download | px4-firmware-58084685b2b2f8e31598320318a7c34dd0a96955.tar.gz px4-firmware-58084685b2b2f8e31598320318a7c34dd0a96955.tar.bz2 px4-firmware-58084685b2b2f8e31598320318a7c34dd0a96955.zip |
Hotfix: Changed alarms back to what they originally were designed for: Traps to later see if condition was once violated. Currente status can be read through the status flags
Diffstat (limited to 'src/drivers/px4io')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index a40142792..8b2fae12b 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1273,6 +1273,9 @@ PX4IO::print_status() ((alarms & PX4IO_P_STATUS_ALARMS_FMU_LOST) ? " FMU_LOST" : ""), ((alarms & PX4IO_P_STATUS_ALARMS_RC_LOST) ? " RC_LOST" : ""), ((alarms & PX4IO_P_STATUS_ALARMS_PWM_ERROR) ? " PWM_ERROR" : "")); + /* now clear alarms */ + io_reg_set(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_ALARMS, 0xFFFF); + printf("vbatt %u ibatt %u vbatt scale %u\n", io_reg_get(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_VBATT), io_reg_get(PX4IO_PAGE_STATUS, PX4IO_P_STATUS_IBATT), |