diff --git a/API.md b/API.md index 71cf194..e446903 100644 --- a/API.md +++ b/API.md @@ -115,14 +115,14 @@ the `` parameter. * Reboot the camera * `http:///control?var=reboot&val=0` -You can try these yourself in a browser address bar, from the commandline with `curl` -and co. or use them programatically from your scripting language of choice. +You can try these yourself in a browser address bar, from the command line with `curl` +and co. or use them programmatically from your scripting language of choice. ## ESP32CAM WebSocket API -This API is inteded for fast statefull communication between the server and the browser. You can think of a websocket as a state machine, which can be accessed and programmed from the client side, using JavaScript or any other language, which supports Webocket API. +This API is intended for fast stateful communication between the server and the browser. You can think of a websocket as a state machine, which can be accessed and programmed from the client side, using JavaScript or any other language, which supports Websocket API. In order to use the WebSocket API, you need to open the Websocket first. The url of the websocket is always -`ws:///ws`. In Java Script, you simply need to add the followig lines to your page: +`ws:///ws`. In Java Script, you simply need to add the following lines to your page: ``` ws = new WebSocket(websocketURL); @@ -156,26 +156,26 @@ Once the `ws` object is created successfully, you can handle its events on the p ``` Once the websocket is open, you may also send commands and data to the server. Commands are sent with help of the `ws.send(command)` function where the `command` is to be a binary Uint8Array. The first byte of this -array reflects the command code while the rest of bytes can host addtional parameters of the command. +array reflects the command code while the rest of bytes can host additional parameters of the command. The following commands are supported: -'s' - starts the stream. Once the comamand is issued, the server will start pushing the frames to the client - according to the camera settings. The server will switch to the video mode. -'p' - similar to the previous command but there will be only one frame taken and pushed to the client. The - server will swicth to the photo mode. -'u' - similar to the previous two commands. The server will either start stream or take a still photo, - depending on the current mode of the server. -'t' - terminates the stream. Only makes sense after 's' or 'u' commands. -'c' - tells the server that this websocket will be used for PWM control commands. -'w' - writes the PWM duty value to the pin. This command has additional parameters passed in the bytes of the - `command` array, as follows: +- 's' - starts the stream. Once the command is issued, the server will start pushing the frames to the client + according to the camera settings. The server will switch to the video mode. +- 'p' - similar to the previous command but there will be only one frame taken and pushed to the client. The + server will switch to the photo mode. +- 'u' - similar to the previous two commands. The server will either start stream or take a still photo, + depending on the current mode of the server. +- 't' - terminates the stream. Only makes sense after 's' or 'u' commands. +- 'c' - tells the server that this websocket will be used for PWM control commands. +- 'w' - writes the PWM duty value to the pin. This command has additional parameters passed in the bytes of the + `command` array, as follows: byte0 - 'w' - code of the command byte1 - pin number. If you use the ESP32CAM-DEV board, the available pins are usually limited to 4, 12, 13 and 33. The 4th pin is connected to the flash lamp so you can control the lamp brightness by sending value to this pin via the websocket. Pin 33 is connected to the onboard LED. So, only - 12 and 13 are the ones you can use, provided taht you also use the SD card for storage. + 12 and 13 are the ones you can use, provided that you also use the SD card for storage. if you use the internal LittleFS for storage, you may be able to use other pins otherwise utilized by the SD card interface. byte2 - send 1 for servo mode and 2 for any other PWM. @@ -205,10 +205,10 @@ GPIO pins used for PWM can be defined in the `/httpd.json`, in the `pwm` paramet The `pwm` parameter is defined as a JSON array where each object of the array is a definition of one PWM. Attributes of a pwm object are explained below: -`pin` - GPIO pin number -`frequency` - PWM frequency in Herz. -`resolution` - precision of the PWM (number of bits). -`default` - initial value of the PWM. if this attribute is not defined, 0 will be used for default. +- `pin` - GPIO pin number +- `frequency` - PWM frequency in Herz. +- `resolution` - precision of the PWM (number of bits). +- `default` - initial value of the PWM. if this attribute is not defined, 0 will be used for default. if the `lamp` parameter in the httpd config is greater or equal to 0, the 1st element of the pwm array will be used for definition of flash lamp PWM. In the example above, the lamp PWM is configured for pin 4 diff --git a/Docs/html/app__cam_8h_source.html b/Docs/html/app__cam_8h_source.html index d42c994..d296cb9 100644 --- a/Docs/html/app__cam_8h_source.html +++ b/Docs/html/app__cam_8h_source.html @@ -105,7 +105,7 @@ $(function() {
36 void setRotation(int val) {myRotation = val;};
37 int getRotation() {return myRotation;};
38
-
39 int snapToBufer();
+
39 int snapToBuffer();
40 uint8_t * getBuffer() {return fb->buf;};
41 size_t getBufferSize() {return fb->len;};
42 bool isJPEGinBuffer() {return fb->format == PIXFORMAT_JPEG;};
@@ -163,7 +163,7 @@ $(function() {
void setFrameRate(int newFrameRate)
Definition: app_cam.h:31
int getRotation()
Definition: app_cam.h:37
int getFrameRate()
Definition: app_cam.h:30
-
int snapToBufer()
Definition: app_cam.cpp:202
+
int snapToBuffer()
Definition: app_cam.cpp:202
int getXclk()
Definition: app_cam.h:34
int stop()
Definition: app_cam.cpp:78
String getErr()
Definition: app_cam.h:28
diff --git a/Docs/html/class_c_l_app_cam.html b/Docs/html/class_c_l_app_cam.html index c8b038b..4f3caaa 100644 --- a/Docs/html/class_c_l_app_cam.html +++ b/Docs/html/class_c_l_app_cam.html @@ -114,7 +114,7 @@ Public Member Functions   int getRotation ()   -int snapToBufer () +int snapToBuffer ()   uint8_t * getBuffer ()   @@ -535,13 +535,13 @@ Additional Inherited Members -

◆ snapToBufer()

+

◆ snapToBuffer()

- + diff --git a/Docs/html/functions.html b/Docs/html/functions.html index cd9c17d..8fd0b57 100644 --- a/Docs/html/functions.html +++ b/Docs/html/functions.html @@ -259,7 +259,7 @@ $(function() {
  • setTag() : CLAppComponent
  • setup() : ESP32PWM
  • setXclk() : CLAppCam
  • -
  • snapToBufer() : CLAppCam
  • +
  • snapToBuffer() : CLAppCam
  • snapToStream() : CLAppHttpd
  • ssid : Station
  • start() : CLAppCam, CLAppComponent, CLAppConn, CLAppHttpd
  • diff --git a/Docs/html/functions_func.html b/Docs/html/functions_func.html index 00a0545..fc3f317 100644 --- a/Docs/html/functions_func.html +++ b/Docs/html/functions_func.html @@ -248,7 +248,7 @@ $(function() {
  • setTag() : CLAppComponent
  • setup() : ESP32PWM
  • setXclk() : CLAppCam
  • -
  • snapToBufer() : CLAppCam
  • +
  • snapToBuffer() : CLAppCam
  • snapToStream() : CLAppHttpd
  • start() : CLAppCam, CLAppComponent, CLAppConn, CLAppHttpd
  • startOTA() : CLAppConn
  • diff --git a/Docs/html/search/all_f.js b/Docs/html/search/all_f.js index 6c70dab..33c7428 100644 --- a/Docs/html/search/all_f.js +++ b/Docs/html/search/all_f.js @@ -30,7 +30,7 @@ var searchData= ['settag_27',['setTag',['../class_c_l_app_component.html#a75a706c37e31c3083c845d304e3a519b',1,'CLAppComponent']]], ['setup_28',['setup',['../class_e_s_p32_p_w_m.html#a2be6068904d3bec84211221148b21310',1,'ESP32PWM']]], ['setxclk_29',['setXclk',['../class_c_l_app_cam.html#a9ccd0763eb8eeb559b46e747df25d268',1,'CLAppCam']]], - ['snaptobufer_30',['snapToBufer',['../class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9',1,'CLAppCam']]], + ['snaptobufer_30',['snapToBuffer',['../class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9',1,'CLAppCam']]], ['snaptostream_31',['snapToStream',['../class_c_l_app_httpd.html#a4e52f72c1d20cf6420e2f17b0b521da4',1,'CLAppHttpd']]], ['ssid_32',['ssid',['../struct_station.html#ad635bfe5333139b2596ace399fe5054e',1,'Station']]], ['start_33',['start',['../class_c_l_app_httpd.html#aaf8a95884768b7ac3e1c04ea041ee514',1,'CLAppHttpd::start()'],['../class_c_l_app_conn.html#a75a0c8c0ab160691ecf58e3c4ad58951',1,'CLAppConn::start()'],['../class_c_l_app_cam.html#af277f42041c7c0a561bd8c8b087f4b3a',1,'CLAppCam::start()'],['../class_c_l_app_component.html#a7e64a4c55bd1f3216c507101835392b5',1,'CLAppComponent::start()']]], diff --git a/Docs/html/search/functions_d.js b/Docs/html/search/functions_d.js index 054c251..2802a62 100644 --- a/Docs/html/search/functions_d.js +++ b/Docs/html/search/functions_d.js @@ -30,7 +30,7 @@ var searchData= ['settag_27',['setTag',['../class_c_l_app_component.html#a75a706c37e31c3083c845d304e3a519b',1,'CLAppComponent']]], ['setup_28',['setup',['../class_e_s_p32_p_w_m.html#a2be6068904d3bec84211221148b21310',1,'ESP32PWM']]], ['setxclk_29',['setXclk',['../class_c_l_app_cam.html#a9ccd0763eb8eeb559b46e747df25d268',1,'CLAppCam']]], - ['snaptobufer_30',['snapToBufer',['../class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9',1,'CLAppCam']]], + ['snaptobufer_30',['snapToBuffer',['../class_c_l_app_cam.html#a89a7a39bd89130cab06fd7139fc9b6d9',1,'CLAppCam']]], ['snaptostream_31',['snapToStream',['../class_c_l_app_httpd.html#a4e52f72c1d20cf6420e2f17b0b521da4',1,'CLAppHttpd']]], ['start_32',['start',['../class_c_l_app_cam.html#af277f42041c7c0a561bd8c8b087f4b3a',1,'CLAppCam::start()'],['../class_c_l_app_component.html#a7e64a4c55bd1f3216c507101835392b5',1,'CLAppComponent::start()'],['../class_c_l_app_conn.html#a75a0c8c0ab160691ecf58e3c4ad58951',1,'CLAppConn::start()'],['../class_c_l_app_httpd.html#aaf8a95884768b7ac3e1c04ea041ee514',1,'CLAppHttpd::start()']]], ['startota_33',['startOTA',['../class_c_l_app_conn.html#a8d0720ee6abfd427ed8a0d109490a286',1,'CLAppConn']]], diff --git a/README.md b/README.md index f795e56..48a100b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ small antennas, older designs, congested airwaves and demanding users. The major disconnects, stutters and other communication problems are simply due to 'WiFi issues'. The AI-THINKER camera module & esp32 combination is quite susceptible to power supply -problems affecting both WiFi conctivity and Video quality; short cabling and decent +problems affecting both WiFi connectivity and Video quality; short cabling and decent power supplies are your friend here; also well cooled cases and, if you have the time, decoupling capacitors on the power lines. @@ -63,7 +63,7 @@ Is pretty simple, You just need jumper wires, no soldering really required, see * The adapters **TX** line goes to the ESP32 **RX** pin * The **GPIO0** pin of the ESP32 must be held LOW (to ground) when the unit is powered up to allow it to enter it's programming mode. This can be done with simple - jumper cable connected at poweron, fitting a switch for this is useful if you + jumper cable connected at power on, fitting a switch for this is useful if you will be reprogramming a lot. * You will to supply 5v to the ESP32 in order to power it during programming; the FTDI board alone fails to supply this sometimes. The ESP32 CAM board is very sensitive @@ -103,13 +103,13 @@ following line in the `src/app_config.h`: Re-build the sketch and upload it to the ESP32CAM board. Also upload the data folder using the **ESP32 Sketch Data Upload** tool, which is invoked from the `Tools` menu of Arduino IDE. -Provided that everything goes well, you shoudl be able to boot your ESP32 CAM Web Server from LittleFS. +Provided that everything goes well, you should be able to boot your ESP32 CAM Web Server from LittleFS. ### Initial configuration If the system has not been configured yet, it will start in Access Point mode by default. The SSID of the access point will be `esp32cam` and the password is `123456789`. if you have the Serial monitor -connected to the ESP32CAM board, you shoudl see the following messages: +connected to the ESP32CAM board, you should see the following messages: ``` No known networks found, entering AccessPoint fallback mode @@ -117,7 +117,7 @@ Setting up Access Point (channel=1) SSID : esp32cam Password : 123456789 IP address: 192.168.4.1 -Access Point init successfull +Access Point init successful Starting Captive Portal OTA is disabled mDNS responder started @@ -133,7 +133,7 @@ Switch the Access Point Mode off. The screen will change as follows: Specify SSID and Password for your WiFi setup. This board supports only 2.4 GHz band so you will need to ensure you wifi router has this band enabled. -Set up your preffered NTP server, Time Zone, Daylight Saving Time (DST), desired host name, HTTP port. +Set up your preferred NTP server, Time Zone, Daylight Saving Time (DST), desired host name, HTTP port. If you plan to use Over-the-Air firmware update, please ensure to specify a complex password. Do not leave it empty or default. @@ -153,7 +153,7 @@ The system monitoring page is accessible at `http:/// ### Configuration files -The web server stores its configuraion in JSON files. The format of the files is below. If any of these +The web server stores its configuration in JSON files. The format of the files is below. If any of these files is missing in the root folder of the storage used, default values will be loaded. #### Network Configuration (/conn.json) @@ -247,7 +247,7 @@ cause the module to crash and reboot rather than updating if you use it. ![IDE board config](Docs/ota-board-selection.png) Make sure you select the `Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)` partition -cheme and turn `PSRAM` on. +scheme and turn `PSRAM` on. The first time you program (or if OTA is failing) you need to compile and upload the code from the IDE, and when the `Connecting...` appears in the console reboot the ESP32 @@ -264,7 +264,7 @@ you should see it appearing in the `network ports` list of the IDE, and you can wirelessly. If you have a status LED configured it will give a double flash when it begins -attempting to conenct to WiFi, and five short flashes once it has succeeded. It will +attempting to connect to WiFi, and five short flashes once it has succeeded. It will also flash briefly when you access the camera to change settings. diff --git a/data/default_conn.json b/data/default_conn.json index d986a5f..44b021d 100644 --- a/data/default_conn.json +++ b/data/default_conn.json @@ -1,8 +1,8 @@ { "mdns_name":"esp32cam", "dhcp":true, "http_port":80, - "ota_enabled":true, - "ota_password":"", + "ota_enabled":false, + "ota_password":"changeit!", "ap_ssid":"esp32cam", "ap_pass":"123456789", "ap_ip": {"ip":"192.168.4.1", "netmask":"255.255.255.0"}, diff --git a/data/www/js/cam.js b/data/www/js/cam.js index ac82811..02ab761 100644 --- a/data/www/js/cam.js +++ b/data/www/js/cam.js @@ -51,14 +51,6 @@ const selectOptions = [{"field": "framesize", {"id": 13, "name": "UXGA 4:3 (1600x1200)"}, {"id": 14, "name": "FHD 16:9 (1920x1080)"}, {"id": 17, "name": "QXGA 4:3 (2048x1536)"}]}, - {"field": "frame_rate", - "options": [{"id": 60, "name": "60 fps"}, - {"id": 50, "name": "50 fps"}, - {"id": 30, "name": "30 fps"}, - {"id": 25, "name": "25 fps"}, - {"id": 24, "name": "24 fps"}, - {"id": 20, "name": "20 fps"}, - {"id": 12, "name": "12 fps"}]}, {"field": "special_effect", "options": [{"id": 0, "name": "No Effect"}, {"id": 1, "name": "Negative"}, @@ -101,8 +93,10 @@ var cameraFormFields = [{"id": "lamp", "name": "Light", "control": "range", "title":"Camera resolution", "classes": "default-action", "simple":"true"}, - {"id": "frame_rate", "name": "Frame Rate", "control": "select", + {"id": "frame_rate", "name": "Frame Rate", "control": "text", "type": "number", "title":"Frame rate Use this for a smoother stream and to reduce load on the WiFi and browser", + "min_value":"2", "max_value":"60", "default_value": "25", + "max_caption": "FPS", "classes": "default-action", "simple":"true"}, {"id": "quality", "name": "Quality", "control": "range", diff --git a/esp32-cam-webserver.ino b/esp32-cam-webserver.ino index e08b9a7..a7f4671 100644 --- a/esp32-cam-webserver.ino +++ b/esp32-cam-webserver.ino @@ -62,7 +62,7 @@ void setup() { } else { // Flash the LED to show we are connected - notifyConect(); + notifyConnect(); } } @@ -114,7 +114,7 @@ void loop() { //attempt to reconnect if(AppConn.start() == WL_CONNECTED) { - notifyConect(); + notifyConnect(); } } @@ -153,7 +153,7 @@ void handleSerial() { } } -void notifyConect() { +void notifyConnect() { for (int i = 0; i < 5; i++) { flashLED(150); delay(50); diff --git a/src/app_cam.cpp b/src/app_cam.cpp index 422e074..99388a5 100644 --- a/src/app_cam.cpp +++ b/src/app_cam.cpp @@ -199,7 +199,7 @@ int CLAppCam::savePrefs(){ } -int CLAppCam::snapToBufer() { +int CLAppCam::snapToBuffer() { fb = esp_camera_fb_get(); return (fb?ESP_OK:ESP_FAIL); diff --git a/src/app_cam.h b/src/app_cam.h index 03cb257..5b9461d 100644 --- a/src/app_cam.h +++ b/src/app_cam.h @@ -36,7 +36,7 @@ class CLAppCam : public CLAppComponent { void setRotation(int val) {myRotation = val;}; int getRotation() {return myRotation;}; - int snapToBufer(); + int snapToBuffer(); uint8_t * getBuffer() {return fb->buf;}; size_t getBufferSize() {return fb->len;}; bool isJPEGinBuffer() {return fb->format == PIXFORMAT_JPEG;}; diff --git a/src/app_conn.cpp b/src/app_conn.cpp index f6a7c6d..538e3f0 100644 --- a/src/app_conn.cpp +++ b/src/app_conn.cpp @@ -142,7 +142,7 @@ int CLAppConn::start() { } ap_status = WL_CONNECTED; - Serial.println("Access Point init successfull"); + Serial.println("Access Point init successful"); // Start the DNS captive portal if requested if (ap_dhcp) { diff --git a/src/app_conn.h b/src/app_conn.h index 5094574..f914196 100644 --- a/src/app_conn.h +++ b/src/app_conn.h @@ -114,7 +114,7 @@ class CLAppConn : public CLAppComponent { char ssid[64]; char password[64]; - char mdnsName[20]; + char mdnsName[20]=""; bool accesspoint = false; char apName[20]; @@ -144,7 +144,7 @@ class CLAppConn : public CLAppComponent { char otaPassword[20] = ""; // NTP parameters - char ntpServer[20]; + char ntpServer[20] = ""; long gmtOffset_sec; int daylightOffset_sec; diff --git a/src/app_httpd.cpp b/src/app_httpd.cpp index 4beb310..560f66e 100644 --- a/src/app_httpd.cpp +++ b/src/app_httpd.cpp @@ -175,7 +175,7 @@ int CLAppHttpd::snapToStream(bool debug) { if(!stream_client) return ESP_FAIL; - int res = AppCam.snapToBufer(); + int res = AppCam.snapToBuffer(); if(!res) { @@ -185,7 +185,7 @@ int CLAppHttpd::snapToStream(bool debug) { Serial.print("JPG: "); Serial.print(AppCam.getBufferSize()); } } else { - // camera failed to aquire frame + // camera failed to acquire frame if(debug) Serial.println("Capture Error: Non-JPEG image returned by camera module"); res = OS_FAIL; @@ -211,11 +211,16 @@ int CLAppHttpd::startStream(uint32_t id) { xTimerStop(snap_timer, 100); if(streammode == CAPTURE_STREAM) { + if(autoLamp){ + setLamp(); + delay(75); // coupled with the status led flash this gives ~150ms for lamp to settle. + } Serial.print("Stream start, frame period = "); Serial.println(xTimerGetPeriod(snap_timer)); xTimerStart(snap_timer, 0); streamCount=1; + } else if(streammode == CAPTURE_STILL) { Serial.println("Still image requested"); @@ -246,6 +251,8 @@ int CLAppHttpd::startStream(uint32_t id) { int CLAppHttpd::stopStream(uint32_t id) { + if(autoLamp) setLamp(0); + if(!snap_timer) return OS_FAIL; @@ -377,6 +384,9 @@ void onControl(AsyncWebServerRequest *request) { else if(variable == "lamp" && AppHttpd.getLamp() != -1) { AppHttpd.setLamp(constrain(val,0,100)); } + else if(variable == "flashlamp" && AppHttpd.getLamp() != -1) { + AppHttpd.setFlashLamp(constrain(val,0,100)); + } else if(variable == "accesspoint") AppConn.setAccessPoint(val); else if(variable == "ap_channel") AppConn.setAPChannel(val); else if(variable == "ap_dhcp") AppConn.setAPDHCP(val); @@ -503,9 +513,9 @@ void dumpSystemStatusToJson(char * buf, size_t size) { buf += sprintf(buf,"\"captiveportal\":%s,", (AppConn.isCaptivePortal()?"true":"false")); buf += sprintf(buf,"\"ap_name\":\"%s\",", AppConn.getApName()); buf += sprintf(buf,"\"ssid\":\"%s\",", AppConn.getSSID()); - buf += sprintf(buf,"\"rssi\":%i,", WiFi.RSSI()); - String bssid = WiFi.BSSIDstr(); - buf += sprintf(buf,"\"bssid\":\"%s\",", bssid.c_str()); + + buf += sprintf(buf,"\"rssi\":%i,", (!AppConn.isAccessPoint()?WiFi.RSSI():0)); + buf += sprintf(buf,"\"bssid\":\"%s\",", (!AppConn.isAccessPoint()?WiFi.BSSIDstr().c_str():"")); buf += sprintf(buf,"\"dhcp\":%i,", (AppConn.isDHCPEnabled()? 1:0 )); buf += sprintf(buf,"\"ip_address\":\"%s\",", (AppConn.isAccessPoint()?WiFi.softAPIP().toString():WiFi.localIP().toString())); buf += sprintf(buf,"\"subnet\":\"%s\",", (!AppConn.isAccessPoint()?WiFi.subnetMask().toString():"")); @@ -525,7 +535,7 @@ void dumpSystemStatusToJson(char * buf, size_t size) { byte mac[6]; WiFi.macAddress(mac); buf += sprintf(buf,"\"mac_address\":\"%02X:%02X:%02X:%02X:%02X:%02X\",", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - buf += sprintf(buf,"\"local_time\":\"%s\",", AppConn.getLocalTimeStr()); + buf += sprintf(buf,"\"local_time\":\"%s\",", (!AppConn.isAccessPoint()?AppConn.getLocalTimeStr():"")); buf += sprintf(buf,"\"up_time\":\"%s\",", AppConn.getUpTimeStr()); buf += sprintf(buf,"\"ntp_server\":\"%s\",", AppConn.getNTPServer()); buf += sprintf(buf,"\"gmt_offset\":%li,", AppConn.getGmtOffset_sec()); @@ -640,6 +650,8 @@ int CLAppHttpd::savePrefs() { json_gen_str_start(&jstr, buf, sizeof(buf), NULL, NULL); json_gen_start_object(&jstr); + json_gen_obj_set_string(&jstr, (char*)"my_name", myName); + json_gen_obj_set_int(&jstr, (char*)"lamp", lampVal); json_gen_obj_set_bool(&jstr, (char*)"autolamp", autoLamp); json_gen_obj_set_int(&jstr, (char*)"flashlamp", flashLamp); diff --git a/src/app_httpd.h b/src/app_httpd.h index d4bbf12..802c056 100644 --- a/src/app_httpd.h +++ b/src/app_httpd.h @@ -98,6 +98,7 @@ class CLAppHttpd : public CLAppComponent { void setAutoLamp(bool val) {autoLamp = val;}; bool isAutoLamp() { return autoLamp;}; int getFlashLamp() {return flashLamp;}; + void setFlashLamp(int newVal) {flashLamp = newVal;}; void setLamp(int newVal = DEFAULT_FLASH); int getLamp() {return lampVal;}; @@ -141,9 +142,9 @@ class CLAppHttpd : public CLAppComponent { // Name of the application used in web interface // Can be re-defined in the httpd.json file - char myName[20] = CAM_NAME; + char myName[32] = CAM_NAME; - char serialBuffer[64]; + char serialBuffer[64]=""; AsyncWebServer *server; AsyncWebSocket *ws;
    int CLAppCam::snapToBufer int CLAppCam::snapToBuffer ( )