From 9d3dbed4115ce1ad54abe204d25eb469f98a1be7 Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Tue, 5 May 2020 11:40:50 +0200 Subject: [PATCH] some formatting --- tasmota/xdrv_10_scripter.ino | 4 ++-- tasmota/xdrv_39_webcam.ino | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 3056e41a8..5040d38cb 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -73,7 +73,7 @@ uint32_t DecodeLightId(uint32_t hue_id); void SaveFile(const char *name,const uint8_t *buf,uint32_t len) { - File file = SPIFFS.open(name,FILE_WRITE); + File file = SPIFFS.open(name, FILE_WRITE); if (!file) return; file.write(buf, len); file.close(); @@ -5237,7 +5237,7 @@ bool Xdrv10(uint8_t function) case FUNC_WEB_ADD_MAIN_BUTTON: ScriptWebShow('&'); break; -#endif +#endif // USE_SCRIPT_WEB_DISPLAY case FUNC_WEB_ADD_HANDLER: Webserver->on("/" WEB_HANDLE_SCRIPT, HandleScriptConfiguration); Webserver->on("/ta",HTTP_POST, HandleScriptTextareaConfiguration); diff --git a/tasmota/xdrv_39_webcam.ino b/tasmota/xdrv_39_webcam.ino index c852fc86c..3035aa67b 100644 --- a/tasmota/xdrv_39_webcam.ino +++ b/tasmota/xdrv_39_webcam.ino @@ -525,7 +525,7 @@ void draw_face_boxes(dl_matrix3du_t *image_matrix, box_array_t *boxes, int face_ #define DL_SPIRAM_SUPPORT uint32_t wc_set_face_detect(int32_t value) { - if (value >= 0) { face_detect_time=value; } + if (value >= 0) { face_detect_time = value; } return faces; } @@ -542,7 +542,7 @@ bool detected = false; int face_id = 0; camera_fb_t *fb; - if ((millis()-face_ltime) > face_detect_time) { + if ((millis() - face_ltime) > face_detect_time) { face_ltime = millis(); fb = esp_camera_fb_get(); if (!fb) { return ESP_FAIL; } @@ -570,7 +570,7 @@ camera_fb_t *fb; box_array_t *net_boxes = face_detect(image_matrix, &mtmn_config); if (net_boxes){ detected = true; - faces=net_boxes->len; + faces = net_boxes->len; //if(recognition_enabled){ // face_id = run_face_recognition(image_matrix, net_boxes); //} @@ -580,7 +580,7 @@ camera_fb_t *fb; free(net_boxes->landmark); free(net_boxes); } else { - faces=0; + faces = 0; } dl_matrix3du_free(image_matrix); //Serial.printf("face detected: %d",faces); @@ -683,7 +683,7 @@ uint32_t motion_brightness; uint8_t *last_motion_buffer; uint32_t wc_set_motion_detect(int32_t value) { - if (value >= 0) { motion_detect=value; } + if (value >= 0) { motion_detect = value; } if (-1 == value) { return motion_trigger; } else { @@ -694,7 +694,7 @@ uint32_t wc_set_motion_detect(int32_t value) { // optional motion detector void detect_motion(void) { camera_fb_t *wc_fb; - uint8_t *out_buf=0; + uint8_t *out_buf = 0; if ((millis()-motion_ltime) > motion_detect) { motion_ltime = millis();