mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Rolling
This commit is contained in:
@@ -80,40 +80,13 @@ extern "C" void app_main(void)
|
||||
Camera.LightOnOff(false);
|
||||
|
||||
Init_NVS_SDCard();
|
||||
// LogFile.WriteToFile("Startsequence 02");
|
||||
|
||||
CheckOTAUpdate();
|
||||
// LogFile.WriteToFile("Startsequence 03");
|
||||
std::string ssid = "";
|
||||
std::string password = "";
|
||||
std::string hostname = "";
|
||||
std::string ip = "";
|
||||
std::string gw = "";
|
||||
std::string netmask = "";
|
||||
std::string dns = "";
|
||||
|
||||
// LoadWlanFromFile("/sdcard/wlan.ini", ssid, password, hostname, ip, gw, netmask, dns);
|
||||
LoadWlanFromFile("/sdcard/wlan.ini", ssid, password, hostname);
|
||||
LoadNetConfigFromFile("/sdcard/wlan.ini", ip, gw, netmask, dns);
|
||||
|
||||
// LogFile.WriteToFile("Startsequence 04");
|
||||
printf("To use WLan: %s, %s\n", ssid.c_str(), password.c_str());
|
||||
printf("To set Hostename: %s\n", hostname.c_str());
|
||||
printf("Fixed IP: %s, Gateway %s, Netmask %s, DNS %s\n", ip.c_str(), gw.c_str(), netmask.c_str(), dns.c_str());
|
||||
|
||||
if (ip.length() == 0 || gw.length() == 0 || netmask.length() == 0)
|
||||
{
|
||||
initialise_wifi(ssid, password, hostname);
|
||||
}
|
||||
else
|
||||
{
|
||||
initialise_wifi_fixed_ip(ip, gw, netmask, ssid, password, hostname, dns);
|
||||
}
|
||||
|
||||
printf("Netparameter: IP: %s - GW: %s - NetMask %s\n", getIPAddress().c_str(), getGW().c_str(), getNetMask().c_str());
|
||||
LoadWlanFromFile("/sdcard/wlan.ini");
|
||||
ConnectToWLAN();
|
||||
printf("\nNetparameter: IP: %s - GW: %s - NetMask %s\n", getIPAddress().c_str(), getGW().c_str(), getNetMask().c_str());
|
||||
|
||||
|
||||
// LogFile.WriteToFile("Startsequence 05");
|
||||
|
||||
TickType_t xDelay;
|
||||
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||
|
||||
Reference in New Issue
Block a user