Skip to content

Commit

Permalink
Prevent auto restart on cam framebuffer init error (#1522)
Browse files Browse the repository at this point in the history
* use correct log level

* revert autorestart on camera framebuffer init error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>
  • Loading branch information
caco3 and CaCO3 committed Dec 9, 2022
1 parent 0c7a999 commit 63b68d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ extern "C" void app_main(void)
camera_fb_t * fb = esp_camera_fb_get();
if (!fb) {
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Camera Framebuffer cannot be initialized!");
initSucessful = false;
/* Easiest would be to simply restart here and try again,
how ever there seem to be systems where it fails at startup but still work corectly later.
Therefore we treat it still as successed!
//initSucessful = false; */
}
else {
esp_camera_fb_return(fb);
Expand Down

0 comments on commit 63b68d5

Please sign in to comment.