From 306bb3a9321cd4362ef72296a67f4fa8baccecd6 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Fri, 29 Apr 2022 07:52:01 +0200 Subject: [PATCH] Changed a debug printf statement and added a new API end point which will be used for ota updates --- src/app/app.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/app.ino b/src/app/app.ino index 8f1db3b..004b500 100644 --- a/src/app/app.ino +++ b/src/app/app.ino @@ -42,7 +42,8 @@ void setup() if(cfgDictionary != NULL) { - Serial.print("AP PASSWORD : ");if((*cfgDictionary)("PASSWORD") != NULL)Serial.println((*cfgDictionary)("PASSWORD")->stringValue()); + Serial.printf("AP PASSWORD : %s\n", + (*cfgDictionary)("PASSWORD") ? (*cfgDictionary)("PASSWORD")->stringValue() : ""); } #if 0 @@ -92,6 +93,7 @@ void setup() sab.getWebServer().addApiRoutine("/sab/io/set/level", &(ioSetLevelApi), &sab, WEBServer::GET); sab.getWebServer().addApiRoutine("/sab/io/get/mode", &(ioGetModeApi), &sab, WEBServer::GET); sab.getWebServer().addApiRoutine("/sab/io/set/mode", &(ioSetModeApi), &sab, WEBServer::GET); + sab.getWebServer().addApiRoutine("/sab/ota/update", &(otaUpdateApi), NULL, WEBServer::POST); sab.getIoManager().setISROnIOChange(&(ioISR), GPIO_3_RX);