Registered a new rest api endpoint for remote OTA updates, renamed getIoManager to getIOManager

This commit is contained in:
anschrammh 2022-09-27 08:02:30 +02:00
parent 9988b03306
commit 04a5eb9643

View File

@ -95,9 +95,10 @@ void setup()
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/sw/version", &(swVersionApi), &sab, WEBServer<WEBClient>::GET);
sab.getWebServer().addApiRoutine("/sab/ota/update", &(otaUpdateApi), NULL, WEBServer<WEBClient>::POST);
sab.getWebServer().addApiRoutine("/sab/ota/update/upload", &(otaUpdateUploadApi), NULL, WEBServer<WEBClient>::POST);
sab.getWebServer().addApiRoutine("/sab/ota/update/device", &(otaUpdateRemoteApi), &sab, WEBServer<WEBClient>::GET);
sab.getIoManager().setISROnIOChange(&(ioISR), GPIO_3_RX);
sab.getIOManager().setISROnIOChange(&(ioISR), GPIO_3_RX);
sab.getTaskSchedulerManager().addTask((uint16_t)0, TaskSchedulerManagerHelper::Schedule::scheduleBuilder()->setMillis(5000), &(task_blink), &sab);
sab.getTaskSchedulerManager().addTask(1, TaskSchedulerManagerHelper::Schedule::scheduleBuilder()->setSeconds(10), &(task_sys_info), &v1p);
@ -121,8 +122,8 @@ void loop()
vstap.ipAddr = sab.getConnectivityManager().localIP();
vstap.sigStrength = sab.getConnectivityManager().RSSI();
sab.getIoManager().getPcf().digitalReadAll(vio.ioState);
sab.getIoManager().getPcf().getPinModeAll(vio.ioMode);
sab.getIOManager().getPcf().digitalReadAll(vio.ioState);
sab.getIOManager().getPcf().getPinModeAll(vio.ioMode);
if(ioStateChange)
{