diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-01-27 08:16:39 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-17 13:03:36 +0100 |
commit | 04bea8678e98d58145d18c44bd3069433f528019 (patch) | |
tree | c147a5374615df3b69fdd1c6fb87fcc481658add /apps/px4io | |
parent | a33f314a2500e207d7aa566e2ea4fe8ace7e6300 (diff) | |
download | px4-firmware-04bea8678e98d58145d18c44bd3069433f528019.tar.gz px4-firmware-04bea8678e98d58145d18c44bd3069433f528019.tar.bz2 px4-firmware-04bea8678e98d58145d18c44bd3069433f528019.zip |
Merged debuglevel command from Tridge
Diffstat (limited to 'apps/px4io')
-rw-r--r-- | apps/px4io/protocol.h | 1 | ||||
-rw-r--r-- | apps/px4io/px4io.h | 1 | ||||
-rw-r--r-- | apps/px4io/registers.c | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/apps/px4io/protocol.h b/apps/px4io/protocol.h index 29a287e45..f64b82ad1 100644 --- a/apps/px4io/protocol.h +++ b/apps/px4io/protocol.h @@ -149,6 +149,7 @@ #define PX4IO_P_SETUP_VBATT_SCALE 6 /* battery voltage correction factor (float) */ #define PX4IO_P_SETUP_IBATT_SCALE 7 /* battery current scaling factor (float) */ #define PX4IO_P_SETUP_IBATT_BIAS 8 /* battery current bias value */ +#define PX4IO_P_SETUP_SET_DEBUG 9 /* debug level for IO board */ /* autopilot control values, -10000..10000 */ #define PX4IO_PAGE_CONTROLS 101 /* 0..CONFIG_CONTROL_COUNT */ diff --git a/apps/px4io/px4io.h b/apps/px4io/px4io.h index 92d55a47c..9c5989df7 100644 --- a/apps/px4io/px4io.h +++ b/apps/px4io/px4io.h @@ -185,3 +185,4 @@ extern void isr_debug(uint8_t level, const char *fmt, ...); void i2c_dump(void); void i2c_reset(void); + diff --git a/apps/px4io/registers.c b/apps/px4io/registers.c index f14cd8309..014608416 100644 --- a/apps/px4io/registers.c +++ b/apps/px4io/registers.c @@ -330,6 +330,11 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value) POWER_ACC2(value & (1 << 3) ? 1 : 0); break; + case PX4IO_P_SETUP_SET_DEBUG: + debug_level = value; + isr_debug(0, "set debug %u\n", (unsigned)debug_level); + break; + default: return -1; } |