Accomodate new Debug Option setting in Arduino IDE (#255)

Thanks, that's perfect!
This commit is contained in:
Ben Lye 2019-09-06 13:05:57 +01:00 committed by pascallanger
parent d80c218744
commit 539819fa0c
2 changed files with 6 additions and 1 deletions

View File

@ -401,7 +401,7 @@ enum MultiPacketTypes
//********************
//** Debug messages **
//********************
#if defined(STM32_BOARD) && defined (DEBUG_SERIAL)
#if defined(STM32_BOARD) && (defined (DEBUG_SERIAL) || defined (ARDUINO_MULTI_DEBUG))
uint16_t debug_time=0;
#define debug(msg, ...) {char debug_buf[64]; sprintf(debug_buf, msg, ##__VA_ARGS__); Serial.write(debug_buf);}
#define debugln(msg, ...) {char debug_buf[64]; sprintf(debug_buf, msg "\r\n", ##__VA_ARGS__); Serial.write(debug_buf);}

View File

@ -35,6 +35,11 @@
#error You need to update your Multi 4-in-1 board definition. Open Boards Manager and update to the latest version of the Multi 4-in-1 STM32 Board.
#endif
// Enable serial debugging if a debugging option was chosen in the IDE
#ifdef ARDUINO_MULTI_DEBUG
#define DEBUG_SERIAL
#endif
// Error if CHECK_FOR_BOOTLOADER is not enabled but a FLASH_FROM_TX board is selected
#if (defined(ARDUINO_MULTI_FLASH_FROM_TX) || defined(ARDUINO_MULTI_STM32_FLASH_FROM_TX)) &! defined(CHECK_FOR_BOOTLOADER)
#if defined(STM32_BOARD)