aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/px4io.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-03-09 13:20:05 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-03-09 13:20:05 +0100
commit74bcf29c698ee9b6f8a7859d59c28f4a69a54e02 (patch)
tree6cdb1b2e071807089c5b11bb5dc5860d632c17ad /apps/px4io/px4io.c
parent5335de4cc71aa283366b683d169e8f90af78569d (diff)
downloadpx4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.tar.gz
px4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.tar.bz2
px4-firmware-74bcf29c698ee9b6f8a7859d59c28f4a69a54e02.zip
Refactored debug level into proper register, px4io status now correctly reads it. Added more of the missing alarms clear logic, alarms reporting now consistent. Adding missing sign change on mode switch, fixes override issue when attempting to switch to auto mode. Pending outdoor tests
Diffstat (limited to 'apps/px4io/px4io.c')
-rw-r--r--apps/px4io/px4io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/px4io/px4io.c b/apps/px4io/px4io.c
index 0c4838523..9de37e118 100644
--- a/apps/px4io/px4io.c
+++ b/apps/px4io/px4io.c
@@ -64,8 +64,7 @@ struct sys_state_s system_state;
static struct hrt_call serial_dma_call;
-/* global debug level for isr_debug() */
-volatile uint8_t debug_level = 0;
+/* store i2c reset count XXX this should be a register, together with other error counters */
volatile uint32_t i2c_loop_resets = 0;
/*
@@ -90,7 +89,7 @@ static char msg[NUM_MSG][40];
void
isr_debug(uint8_t level, const char *fmt, ...)
{
- if (level > debug_level) {
+ if (level > r_page_setup[PX4IO_P_SETUP_SET_DEBUG]) {
return;
}
va_list ap;
@@ -219,7 +218,7 @@ user_start(int argc, char *argv[])
struct mallinfo minfo = mallinfo();
isr_debug(1, "d:%u s=0x%x a=0x%x f=0x%x r=%u m=%u",
- (unsigned)debug_level,
+ (unsigned)r_page_setup[PX4IO_P_SETUP_SET_DEBUG],
(unsigned)r_status_flags,
(unsigned)r_setup_arming,
(unsigned)r_setup_features,