From 677b5f94b2cf0ca408f49790ecf2c3cca381d05d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 16 May 2018 12:52:17 +1000 Subject: [PATCH] AP_BoardConfig: allow for non-bool BRD_IO_ENABLE this will be used to avoid CRC checks for IO fw development testing --- libraries/AP_BoardConfig/AP_BoardConfig.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.h b/libraries/AP_BoardConfig/AP_BoardConfig.h index 88c37687d4..21d35055ca 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.h +++ b/libraries/AP_BoardConfig/AP_BoardConfig.h @@ -112,12 +112,14 @@ public: } #endif - // ask if IOMCU is enabled - static bool io_enabled(void) { + // ask if IOMCU is enabled. This is a uint8_t to allow + // developer debugging by setting BRD_IO_ENABLE=100 to avoid the + // crc check of IO firmware on startup + static uint8_t io_enabled(void) { #if AP_FEATURE_BOARD_DETECT - return instance?instance->state.io_enable.get():false; + return instance?uint8_t(instance->state.io_enable.get()):0; #else - return false; + return 0; #endif }