diff --git a/platformio.ini b/platformio.ini index c4e1bfa..994eabf 100644 --- a/platformio.ini +++ b/platformio.ini @@ -79,6 +79,10 @@ build_flags = ${dualcore.build_flags} -DCORE_DEBUG_LEVEL=3 --param=large-unit-insns=1000 + -DSERIAL_BAUD=921600 +; The info logs hold up the task that logs for ~1ms a line at 921600, ~9ms at +; 115200. The ROM's boot banner stays at 115200, so it shows as garbage. +monitor_speed = 921600 [env:esp32s3] extends = esp32 diff --git a/src/SomfyController.ino b/src/SomfyController.ino index 644980c..c6a2ff6 100644 --- a/src/SomfyController.ino +++ b/src/SomfyController.ino @@ -22,6 +22,10 @@ static const char *TAG = "Main"; #define LOOP_SLOW_MS 100 +// platformio.ini can set its own, along with a matching monitor_speed. +#ifndef SERIAL_BAUD +#define SERIAL_BAUD 115200 +#endif // How long an updated firmware has to run, and then have the network up, before // it is kept. A reset before then rolls back to the previous firmware. #define OTA_PROVEN_MS 60000 @@ -67,7 +71,7 @@ void listDir(const char *dirname, uint8_t levels) { } void setup() { - Serial.begin(115200); + Serial.begin(SERIAL_BAUD); ESP_LOGI(TAG, "Startup/Boot...."); esp_core_dump_summary_t summary; if (esp_core_dump_get_summary(&summary) == ESP_OK) {