mirror of https://github.com/arendst/Tasmota.git
The webserver for the esp32-cam stream doesn't get started automatically. (#19905)
This ensures that it does start when the WcStream (or WcInterrupt) are run. Co-authored-by: Anthony Sepa <protectivedad@gmail.com>
This commit is contained in:
parent
b83516970f
commit
11e9b7375d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue