improvements for new MCU support (-S3/-S2/-C3)
- switch off debug messages to USBCDC, if WLED_DEBUG is not set - ensure that analogread pins are valid - invalid pins cause lots of error messages and finally lead to watchdog reset on some MCUs.
This commit is contained in:
@@ -272,6 +272,9 @@ void WLED::setup()
|
||||
#if defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && (defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || ARDUINO_USB_CDC_ON_BOOT)
|
||||
delay(2500); // allow CDC USB serial to initialise
|
||||
#endif
|
||||
#if !defined(WLED_DEBUG) && defined(ARDUINO_ARCH_ESP32) && !defined(WLED_DEBUG_HOST) && ARDUINO_USB_CDC_ON_BOOT
|
||||
Serial.setDebugOutput(false); // switch off kernel messages when using USBCDC
|
||||
#endif
|
||||
DEBUG_PRINTLN();
|
||||
DEBUG_PRINT(F("---WLED "));
|
||||
DEBUG_PRINT(versionString);
|
||||
|
||||
Reference in New Issue
Block a user