Rolling 20210420

This commit is contained in:
jomjol
2021-04-20 19:44:16 +02:00
parent 520f818adc
commit ea2305de47
156 changed files with 11095 additions and 8601 deletions

View File

@@ -24,8 +24,6 @@
#include "time_sntp.h"
#include "ClassControllCamera.h"
#include "server_main.h"
#include "server_camera.h"
#define __SD_USE_ONE_LINE_MODE__
@@ -115,7 +113,6 @@ void task_NoSDBlink(void *pvParameter)
{
gpio_pad_select_gpio(BLINK_GPIO);
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
TickType_t xDelay;
xDelay = 100 / portTICK_PERIOD_MS;
@@ -127,33 +124,28 @@ void task_NoSDBlink(void *pvParameter)
vTaskDelay( xDelay );
gpio_set_level(BLINK_GPIO, 0);
vTaskDelay( xDelay );
}
vTaskDelete(NULL); //Delete this task if it exits from the loop above
}
extern "C" void app_main(void)
{
printf("Do Reset Camera\n");
PowerResetCamera();
Camera.InitCam();
Camera.LightOnOff(false);
if (!Init_NVS_SDCard())
{
xTaskCreate(&task_NoSDBlink, "task_NoSDBlink", configMINIMAL_STACK_SIZE * 64, NULL, tskIDLE_PRIORITY+1, NULL);
return;
};
CheckOTAUpdate();
Camera.InitCam();
LoadWlanFromFile("/sdcard/wlan.ini");
ConnectToWLAN();
printf("\nNetparameter: IP: %s - GW: %s - NetMask %s\n", getIPAddress().c_str(), getGW().c_str(), getNetMask().c_str());
TickType_t xDelay;
xDelay = 2000 / portTICK_PERIOD_MS;
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
// printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
// LogFile.WriteToFile("Startsequence 06");
vTaskDelay( xDelay );
// LogFile.WriteToFile("Startsequence 07");
@@ -163,17 +155,14 @@ extern "C" void app_main(void)
LogFile.WriteToFile("=============================================================================================");
LogFile.SwitchOnOff(false);
std::string zw = gettimestring("%Y%m%d-%H%M%S");
printf("time %s\n", zw.c_str());
// std::string zw = gettimestring("%Y%m%d-%H%M%S");
// printf("time %s\n", zw.c_str());
// Camera.InitCam();
// Camera.LightOnOff(false);
xDelay = 2000 / portTICK_PERIOD_MS;
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
vTaskDelay( xDelay );
server = start_webserver();
register_server_camera_uri(server);
register_server_tflite_uri(server);
register_server_file_uri(server, "/sdcard");
register_server_ota_sdcard_uri(server);
@@ -185,4 +174,4 @@ extern "C" void app_main(void)
register_server_main_uri(server, "/sdcard");
TFliteDoAutoStart();
}
}