mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
some formatting
This commit is contained in:
parent
489865b82b
commit
9d3dbed411
@ -73,7 +73,7 @@ uint32_t DecodeLightId(uint32_t hue_id);
|
|||||||
|
|
||||||
|
|
||||||
void SaveFile(const char *name,const uint8_t *buf,uint32_t len) {
|
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;
|
if (!file) return;
|
||||||
file.write(buf, len);
|
file.write(buf, len);
|
||||||
file.close();
|
file.close();
|
||||||
@ -5237,7 +5237,7 @@ bool Xdrv10(uint8_t function)
|
|||||||
case FUNC_WEB_ADD_MAIN_BUTTON:
|
case FUNC_WEB_ADD_MAIN_BUTTON:
|
||||||
ScriptWebShow('&');
|
ScriptWebShow('&');
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif // USE_SCRIPT_WEB_DISPLAY
|
||||||
case FUNC_WEB_ADD_HANDLER:
|
case FUNC_WEB_ADD_HANDLER:
|
||||||
Webserver->on("/" WEB_HANDLE_SCRIPT, HandleScriptConfiguration);
|
Webserver->on("/" WEB_HANDLE_SCRIPT, HandleScriptConfiguration);
|
||||||
Webserver->on("/ta",HTTP_POST, HandleScriptTextareaConfiguration);
|
Webserver->on("/ta",HTTP_POST, HandleScriptTextareaConfiguration);
|
||||||
|
@ -525,7 +525,7 @@ void draw_face_boxes(dl_matrix3du_t *image_matrix, box_array_t *boxes, int face_
|
|||||||
#define DL_SPIRAM_SUPPORT
|
#define DL_SPIRAM_SUPPORT
|
||||||
|
|
||||||
uint32_t wc_set_face_detect(int32_t value) {
|
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;
|
return faces;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -542,7 +542,7 @@ bool detected = false;
|
|||||||
int face_id = 0;
|
int face_id = 0;
|
||||||
camera_fb_t *fb;
|
camera_fb_t *fb;
|
||||||
|
|
||||||
if ((millis()-face_ltime) > face_detect_time) {
|
if ((millis() - face_ltime) > face_detect_time) {
|
||||||
face_ltime = millis();
|
face_ltime = millis();
|
||||||
fb = esp_camera_fb_get();
|
fb = esp_camera_fb_get();
|
||||||
if (!fb) { return ESP_FAIL; }
|
if (!fb) { return ESP_FAIL; }
|
||||||
@ -570,7 +570,7 @@ camera_fb_t *fb;
|
|||||||
box_array_t *net_boxes = face_detect(image_matrix, &mtmn_config);
|
box_array_t *net_boxes = face_detect(image_matrix, &mtmn_config);
|
||||||
if (net_boxes){
|
if (net_boxes){
|
||||||
detected = true;
|
detected = true;
|
||||||
faces=net_boxes->len;
|
faces = net_boxes->len;
|
||||||
//if(recognition_enabled){
|
//if(recognition_enabled){
|
||||||
// face_id = run_face_recognition(image_matrix, net_boxes);
|
// face_id = run_face_recognition(image_matrix, net_boxes);
|
||||||
//}
|
//}
|
||||||
@ -580,7 +580,7 @@ camera_fb_t *fb;
|
|||||||
free(net_boxes->landmark);
|
free(net_boxes->landmark);
|
||||||
free(net_boxes);
|
free(net_boxes);
|
||||||
} else {
|
} else {
|
||||||
faces=0;
|
faces = 0;
|
||||||
}
|
}
|
||||||
dl_matrix3du_free(image_matrix);
|
dl_matrix3du_free(image_matrix);
|
||||||
//Serial.printf("face detected: %d",faces);
|
//Serial.printf("face detected: %d",faces);
|
||||||
@ -683,7 +683,7 @@ uint32_t motion_brightness;
|
|||||||
uint8_t *last_motion_buffer;
|
uint8_t *last_motion_buffer;
|
||||||
|
|
||||||
uint32_t wc_set_motion_detect(int32_t value) {
|
uint32_t wc_set_motion_detect(int32_t value) {
|
||||||
if (value >= 0) { motion_detect=value; }
|
if (value >= 0) { motion_detect = value; }
|
||||||
if (-1 == value) {
|
if (-1 == value) {
|
||||||
return motion_trigger;
|
return motion_trigger;
|
||||||
} else {
|
} else {
|
||||||
@ -694,7 +694,7 @@ uint32_t wc_set_motion_detect(int32_t value) {
|
|||||||
// optional motion detector
|
// optional motion detector
|
||||||
void detect_motion(void) {
|
void detect_motion(void) {
|
||||||
camera_fb_t *wc_fb;
|
camera_fb_t *wc_fb;
|
||||||
uint8_t *out_buf=0;
|
uint8_t *out_buf = 0;
|
||||||
|
|
||||||
if ((millis()-motion_ltime) > motion_detect) {
|
if ((millis()-motion_ltime) > motion_detect) {
|
||||||
motion_ltime = millis();
|
motion_ltime = millis();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user