mirror of
https://github.com/H3ALY/Wireless-PC-Switch.git
synced 2025-12-19 18:28:22 +00:00
Add config validation
This commit is contained in:
committed by
GitHub
parent
eec8f25056
commit
b6e50efcf0
@@ -24,6 +24,11 @@ void mqttCallback(char* topic, byte* payload, unsigned int length) {
|
|||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
|
||||||
|
if (!validate_config()) {
|
||||||
|
Serial.println("Configuration validation failed. Halting execution.");
|
||||||
|
while (true);
|
||||||
|
}
|
||||||
WiFiManager wifiManager;
|
WiFiManager wifiManager;
|
||||||
wifiManager.setup_wifi();
|
wifiManager.setup_wifi();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user