mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Harmonize setup routines
This commit is contained in:
parent
8452cbaecd
commit
9dca1e0891
@ -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()
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user