File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,10 @@ <h1>ESP32 Cam Webserver</h1>
125125 bodyHtml += 'Filesystem: ' + data . storage_size + data . storage_units +
126126 ', used: ' + data . storage_used + data . storage_units + '<br>' ;
127127
128- bodyHtml += '<h2>Serial</h2>' ;
129- bodyHtml += data . serial_buf ;
130-
128+ if ( data . serial_buf . lenght == 0 ) {
129+ bodyHtml += '<h2>Serial</h2>' ;
130+ bodyHtml += data . serial_buf ;
131+ }
131132 bodyHtml += '<br><br>' ;
132133
133134 contentBody . innerHTML = bodyHtml ;
Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ int CLAppCam::start() {
8080 #if defined(LAMP_PIN)
8181 ledcSetup (lampChannel, pwmfreq, pwmresolution); // configure LED PWM channel
8282 ledcAttachPin (LAMP_PIN, lampChannel); // attach the GPIO pin to the channel
83- if (autoLamp) setLamp (0 ); // set default value
84- else setLamp ();
83+ setLamp (0 ); // set default value
8584 #endif
8685 } else {
8786 Serial.println (" No lamp, or lamp disabled in config" );
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class CLAppCam : public CLAppComponent {
6767 #if defined(LAMP_DISABLE)
6868 int lampVal = -1 ; // lamp is disabled in config
6969 #elif defined(LAMP_PIN)
70- int lampVal = constrain(LAMP_DEFAULT, 0 , 100 ) ;
70+ int lampVal = 0 ;
7171 #else
7272 int lampVal = -1 ; // no lamp pin assigned
7373 #endif
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ int CLAppComponent::parsePrefs(jparse_ctx_t *jctx) {
5555 return OS_FAIL;
5656 }
5757
58- int ret = json_parse_start (jctx, conn_json.c_str (), conn_json.length ());
58+ char *cn_ptr = const_cast <char *>(conn_json.c_str ());
59+
60+ int ret = json_parse_start (jctx, cn_ptr, conn_json.length ());
5961 if (ret != OS_SUCCESS) {
6062 Serial.printf (" Preference file %s could not be parsed; using system defaults.\r\n " , conn_file);
6163 return OS_FAIL;
Original file line number Diff line number Diff line change 3535// #define LED_DISABLE
3636
3737// Uncomment to disable the illumination lamp features
38- #define LAMP_DISABLE
38+ // #define LAMP_DISABLE
3939
4040// Uncomment this line to use LittleFS instead of SD.
4141// NOTE!
You can’t perform that action at this time.
0 commit comments