jomjol 5 yıl önce
ebeveyn
işleme
8d64e28b1a

+ 4 - 1
README.md

@@ -9,10 +9,12 @@ Details can be found on the Wiki pages.
 
 
 ## Changelog - lastest version
 ## Changelog - lastest version
 
 
-##### 0.1.1 (2020-08-13)
+##### Rolling (2020-08-13)
 
 
 * Implementation of Digital Consistency Check: check if Digit shows next number earlier, than previous number has gone through zero - Turn on/off - see updated config.ini `CheckDigitIncreaseConsistency = True`)
 * Implementation of Digital Consistency Check: check if Digit shows next number earlier, than previous number has gone through zero - Turn on/off - see updated config.ini `CheckDigitIncreaseConsistency = True`)
   Not fully tested!
   Not fully tested!
+  
+  
 
 
 ##### 0.1.0 (2020-08-07)
 ##### 0.1.0 (2020-08-07)
 
 
@@ -25,6 +27,7 @@ Details can be found on the Wiki pages.
 * spontaneous reboot, especially in case of intensive web server access
 * spontaneous reboot, especially in case of intensive web server access
 * stopping automated tflite flow - Error teared down to alignment procedure (results in restart)
 * stopping automated tflite flow - Error teared down to alignment procedure (results in restart)
 * Camera initialization stuck not often, but randomly 5s after reboot - Hard reboot (power on/off) necessary :-(
 * Camera initialization stuck not often, but randomly 5s after reboot - Hard reboot (power on/off) necessary :-(
+  --> Next try: adopted reboot sequence with additional and extended camera reset
 
 
 
 
 
 

+ 15 - 0
code/lib/jomjol_controlcamera/server_camera.cpp

@@ -12,6 +12,21 @@
 char scratch2[SCRATCH_BUFSIZE2];
 char scratch2[SCRATCH_BUFSIZE2];
 
 
 
 
+void PowerResetCamera(){
+        ESP_LOGD(TAGPARTCAMERA, "Resetting camera by power down line");
+        gpio_config_t conf = { 0 };
+        conf.pin_bit_mask = 1LL << GPIO_NUM_32;
+        conf.mode = GPIO_MODE_OUTPUT;
+        gpio_config(&conf);
+
+        // carefull, logic is inverted compared to reset pin
+        gpio_set_level(GPIO_NUM_32, 1);
+        vTaskDelay(1000 / portTICK_PERIOD_MS);
+        gpio_set_level(GPIO_NUM_32, 0);
+        vTaskDelay(1000 / portTICK_PERIOD_MS);
+}
+
+
 esp_err_t handler_lightOn(httpd_req_t *req)
 esp_err_t handler_lightOn(httpd_req_t *req)
 {
 {
     LogFile.WriteToFile("handler_lightOn");
     LogFile.WriteToFile("handler_lightOn");

+ 2 - 0
code/lib/jomjol_controlcamera/server_camera.h

@@ -11,4 +11,6 @@ static const char *TAGPARTCAMERA = "server_camera";
 
 
 void register_server_camera_uri(httpd_handle_t server);
 void register_server_camera_uri(httpd_handle_t server);
 
 
+void PowerResetCamera();
+
 #endif
 #endif

+ 2 - 0
code/src/main.cpp

@@ -104,6 +104,8 @@ void Init_NVS_SDCard()
 
 
 extern "C" void app_main()
 extern "C" void app_main()
 {
 {
+    printf("Do Reset Camera\n");
+    PowerResetCamera();
 //    LogFile.WriteToFile("Startsequence 01");
 //    LogFile.WriteToFile("Startsequence 01");
     Init_NVS_SDCard();
     Init_NVS_SDCard();
     LogFile.WriteToFile("Startsequence 02");
     LogFile.WriteToFile("Startsequence 02");

BIN
firmware/firmware.bin