diff --git a/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin b/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin index 7b3b1d1..b145b52 100644 Binary files a/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin and b/Arduino_Sketch/HASwitchPlate.ino.d1_mini.bin differ diff --git a/Arduino_Sketch/HASwitchPlate/HASwitchPlate.ino b/Arduino_Sketch/HASwitchPlate/HASwitchPlate.ino index 806d542..2adf5a7 100644 --- a/Arduino_Sketch/HASwitchPlate/HASwitchPlate.ino +++ b/Arduino_Sketch/HASwitchPlate/HASwitchPlate.ino @@ -2233,10 +2233,20 @@ void configRead() { strcpy(nextionBaud, jsonConfigValues["nextionBaud"]); } + if (strcmp(nextionBaud, "") == 0) + { // Cover off any edge case where this value winds up being empty + debugPrintln(F("SPIFFS: [WARNING] /config.json has empty nextionBaud value, setting to '115200'")); + strcpy(nextionBaud, "115200"); + } if (!jsonConfigValues["nextionMaxPages"].isNull()) { nextionMaxPages = jsonConfigValues["nextionMaxPages"]; } + if (nextionMaxPages < 1) + { // Cover off any edge case where this value winds up being zero or negative + debugPrintln(F("SPIFFS: [WARNING] /config.json has nextionMaxPages value of zero or negative, setting to '11'")); + nextionMaxPages = 11; + } if (!jsonConfigValues["motionPinConfig"].isNull()) { strcpy(motionPinConfig, jsonConfigValues["motionPinConfig"]); diff --git a/Arduino_Sketch/debug/HASwitchPlate.ino.d1_mini.elf b/Arduino_Sketch/debug/HASwitchPlate.ino.d1_mini.elf index 574099d..7e449c3 100644 Binary files a/Arduino_Sketch/debug/HASwitchPlate.ino.d1_mini.elf and b/Arduino_Sketch/debug/HASwitchPlate.ino.d1_mini.elf differ