- Re-write bool cast for restartCamera method
- Removed preferencesapi library - no longer needed
This commit is contained in:
ZanzyTHEbar 2022-09-13 17:13:29 +01:00
parent 35d615e96c
commit 9b965c224b
3 changed files with 3 additions and 4 deletions

View File

@ -465,8 +465,8 @@ void BaseAPI::setCameraVar(AsyncWebServerRequest *request)
void BaseAPI::restartCamera(AsyncWebServerRequest *request)
{
int mode = atoi(request->arg("mode").c_str());
camera->resetCamera((bool)mode);
bool mode = (bool)atoi(request->arg("mode").c_str());
camera->resetCamera(mode);
request->send(200, MIMETYPE_JSON, "{\"msg\":\"Done. Camera had been restarted.\"}");
}

View File

@ -108,7 +108,6 @@ lib_deps =
esp32-camera
leftcoast/LC_baseTools@^1.5
; geeksville/Micro-RTSP @ ^0.1.6 ; Micro-RTSP library for streaming video over RTSP - will be implemented soon
https://github.com/ZanzyTHEbar/EasyPreferencesLibrary.git
https://github.com/me-no-dev/ESPAsyncWebServer.git
https://github.com/me-no-dev/AsyncTCP.git
https://github.com/bblanchon/ArduinoJson.git

View File

@ -1 +1 @@
8
12