Merged debuglevel command from Tridge

This commit is contained in:
Andrew Tridgell
2013-02-17 13:03:36 +01:00
committed by Lorenz Meier
parent a33f314a25
commit 04bea8678e
5 changed files with 37 additions and 1 deletions
+1
View File
@@ -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 */
+1
View File
@@ -185,3 +185,4 @@ extern void isr_debug(uint8_t level, const char *fmt, ...);
void i2c_dump(void);
void i2c_reset(void);
+5
View File
@@ -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;
}