Skip to content

Commit

Permalink
The webserver for the esp32-cam stream doesn't get started automatica…
Browse files Browse the repository at this point in the history
…lly. (#19905)

This ensures that it does start when the WcStream (or WcInterrupt) are run.

Co-authored-by: Anthony Sepa <[email protected]>
  • Loading branch information
protectivedad and Anthony Sepa authored Nov 3, 2023
1 parent b835169 commit 11e9b73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,11 @@ void CmndWebcam(void) {
void CmndWebcamStream(void) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
Settings->webcam_config.stream = XdrvMailbox.payload;
if (!Settings->webcam_config.stream) { WcInterruptControl(); } // Stop stream
if (!Settings->webcam_config.stream) {
WcInterruptControl(); // Stop stream
} else {
WcSetStreamserver(Settings->webcam_config.stream); // Ensure server is running
}
}
ResponseCmndStateText(Settings->webcam_config.stream);
}
Expand Down
1 change: 1 addition & 0 deletions tasmota/tasmota_xdrv_driver/xdrv_81_esp32_webcam_task.ino
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ void WcInterrupt(uint32_t state) {
// Stop camera ISR if active to fix TG1WDT_SYS_RESET
if (!Wc.up) { return; }

WcSetStreamserver(state);
if (state) {
// Re-enable interrupts
cam_start();
Expand Down

0 comments on commit 11e9b73

Please sign in to comment.