Changed a debug printf statement and added a new API end point which will be used for ota updates

This commit is contained in:
anschrammh 2022-04-29 07:52:01 +02:00
parent 966177a209
commit 306bb3a932

View File

@ -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<WEBClient>::GET);
sab.getWebServer().addApiRoutine("/sab/io/get/mode", &(ioGetModeApi), &sab, WEBServer<WEBClient>::GET);
sab.getWebServer().addApiRoutine("/sab/io/set/mode", &(ioSetModeApi), &sab, WEBServer<WEBClient>::GET);
sab.getWebServer().addApiRoutine("/sab/ota/update", &(otaUpdateApi), NULL, WEBServer<WEBClient>::POST);
sab.getIoManager().setISROnIOChange(&(ioISR), GPIO_3_RX);