mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Harmonize setup routines
This commit is contained in:
parent
8452cbaecd
commit
9dca1e0891
@ -61,6 +61,13 @@ void setup()
|
|||||||
guiSetup();
|
guiSetup();
|
||||||
debugSetup(); // Init the console
|
debugSetup(); // Init the console
|
||||||
|
|
||||||
|
#if HASP_USE_CONFIG > 0
|
||||||
|
if(!oobeSetup())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
haspSetup();
|
||||||
|
}
|
||||||
|
|
||||||
#if HASP_USE_GPIO > 0
|
#if HASP_USE_GPIO > 0
|
||||||
gpioSetup();
|
gpioSetup();
|
||||||
#endif
|
#endif
|
||||||
@ -77,13 +84,6 @@ void setup()
|
|||||||
networkSetup();
|
networkSetup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HASP_USE_CONFIG > 0
|
|
||||||
if(!oobeSetup())
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
haspSetup();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if HASP_USE_MDNS > 0
|
#if HASP_USE_MDNS > 0
|
||||||
mdnsSetup();
|
mdnsSetup();
|
||||||
#endif
|
#endif
|
||||||
@ -106,7 +106,7 @@ void setup()
|
|||||||
|
|
||||||
mainLastLoopTime = millis() - 1000; // reset loop counter
|
mainLastLoopTime = millis() - 1000; // reset loop counter
|
||||||
delay(250);
|
delay(250);
|
||||||
guiStart();
|
// guiStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
@ -100,14 +100,14 @@ void setup()
|
|||||||
// debug_init();
|
// debug_init();
|
||||||
|
|
||||||
// Initialize lvgl environment
|
// Initialize lvgl environment
|
||||||
lv_init();
|
|
||||||
lv_log_register_print_cb(debugLvglLogEvent);
|
lv_log_register_print_cb(debugLvglLogEvent);
|
||||||
|
lv_init();
|
||||||
|
|
||||||
haspDevice.init();
|
haspDevice.init();
|
||||||
hal_setup();
|
// hal_setup();
|
||||||
|
dispatchSetup();
|
||||||
guiSetup();
|
guiSetup();
|
||||||
|
|
||||||
dispatchSetup();
|
|
||||||
// debugSetup(); // Init the console
|
// debugSetup(); // Init the console
|
||||||
|
|
||||||
printf("%s %d\n", __FILE__, __LINE__);
|
printf("%s %d\n", __FILE__, __LINE__);
|
||||||
@ -194,6 +194,8 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
InitializeConsoleOutput();
|
InitializeConsoleOutput();
|
||||||
|
|
||||||
|
haspDevice.show_info();
|
||||||
|
|
||||||
char hostbuffer[256];
|
char hostbuffer[256];
|
||||||
char* IPbuffer;
|
char* IPbuffer;
|
||||||
struct hostent* host_entry;
|
struct hostent* host_entry;
|
||||||
@ -264,7 +266,6 @@ int main(int argc, char* argv[])
|
|||||||
// printf("%s %d\n", __FILE__, __LINE__);
|
// printf("%s %d\n", __FILE__, __LINE__);
|
||||||
// fflush(stdout);
|
// fflush(stdout);
|
||||||
setup();
|
setup();
|
||||||
monitor_title(haspDevice.get_hostname());
|
|
||||||
|
|
||||||
while(isRunning) {
|
while(isRunning) {
|
||||||
loop();
|
loop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user