Merge pull request #8331 from gemu2015/webcam-update

fix webcam size parameter
This commit is contained in:
Theo Arends 2020-05-04 09:33:01 +02:00 committed by GitHub
commit af11d060db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -80,7 +80,7 @@ inline void analogWriteFreqRange(uint32_t channel,uint32_t freq, uint32_t irange
ledcSetup(cnt+PWM_CHANNEL_OFFSET,freq,range);
}
}
Serial.printf("freq - range %d - %d\n",freq,range);
//Serial.printf("freq - range %d - %d\n",freq,range);
}
#define INPUT_PULLDOWN_16 INPUT_PULLUP

View File

@ -39,6 +39,11 @@
* 8 = FRAMESIZE_XGA (1024x768)
* 9 = FRAMESIZE_SXGA (1280x1024)
* 10 = FRAMESIZE_UXGA (1600x1200)
* only boards with PSRAM should be used, to enable PSRAM board should be se set to esp32cam in common32 of platform_override.ini
* board = esp32cam
* to speed up cam processing cpu frequency should be better set to 240Mhz in common32 of platform_override.ini
* board_build.f_cpu = 240000000L
\*********************************************************************************************/
#define XDRV_39 39
@ -519,7 +524,8 @@ void CamHandleRoot(void) {
//CamServer->redirect("http://" + String(ip) + ":81/cam.mjpeg");
CamServer->sendHeader("Location", WiFi.localIP().toString() + ":81/cam.mjpeg");
CamServer->send(302, "", "");
Serial.printf("WC root called");
//Serial.printf("WC root called");
AddLog_P2(WC_LOGLEVEL, PSTR("CAM: root called"));
}
uint16_t motion_detect;
@ -673,7 +679,7 @@ void CmndWC(void) {
uint32_t flag = 0;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 10)) {
wc_set_streamserver(XdrvMailbox.payload);
wc_setup(flag);
wc_setup(XdrvMailbox.payload);
}
if (CamServer) { flag = 1; }
Response_P(PSTR("{\"" D_CMND_WC "\":{\"Streaming\":\"%s\"}"),GetStateText(flag));