Harmonize setup routines

This commit is contained in:
fvanroie 2021-02-21 20:51:19 +01:00
parent 8452cbaecd
commit 9dca1e0891
2 changed files with 13 additions and 12 deletions

View File

@ -61,6 +61,13 @@ void setup()
guiSetup();
debugSetup(); // Init the console
#if HASP_USE_CONFIG > 0
if(!oobeSetup())
#endif
{
haspSetup();
}
#if HASP_USE_GPIO > 0
gpioSetup();
#endif
@ -77,13 +84,6 @@ void setup()
networkSetup();
#endif
#if HASP_USE_CONFIG > 0
if(!oobeSetup())
#endif
{
haspSetup();
}
#if HASP_USE_MDNS > 0
mdnsSetup();
#endif
@ -106,7 +106,7 @@ void setup()
mainLastLoopTime = millis() - 1000; // reset loop counter
delay(250);
guiStart();
// guiStart();
}
void loop()

View File

@ -100,14 +100,14 @@ void setup()
// debug_init();
// Initialize lvgl environment
lv_init();
lv_log_register_print_cb(debugLvglLogEvent);
lv_init();
haspDevice.init();
hal_setup();
// hal_setup();
dispatchSetup();
guiSetup();
dispatchSetup();
// debugSetup(); // Init the console
printf("%s %d\n", __FILE__, __LINE__);
@ -194,6 +194,8 @@ int main(int argc, char* argv[])
InitializeConsoleOutput();
haspDevice.show_info();
char hostbuffer[256];
char* IPbuffer;
struct hostent* host_entry;
@ -264,7 +266,6 @@ int main(int argc, char* argv[])
// printf("%s %d\n", __FILE__, __LINE__);
// fflush(stdout);
setup();
monitor_title(haspDevice.get_hostname());
while(isRunning) {
loop();