Thu, 09 Sep 2021 21:49:16 +0200
Stop splashscreen after 5s
src/main.cpp | file | annotate | diff | comparison | revisions |
--- a/src/main.cpp Tue Sep 07 00:16:10 2021 +0200 +++ b/src/main.cpp Thu Sep 09 21:49:16 2021 +0200 @@ -227,7 +227,7 @@ printf("Attach timers\r\n"); splashscreen = true; - splashscreen_timer.attach(callback(&end_splashscreen), 2ms); + splashscreen_timer.attach(callback(&end_splashscreen), 5s); rst.fall(&reset_irq); printf("SETUP DONE\r\n"); @@ -238,6 +238,8 @@ // print is forbidden here because we are in an ISR context here //printf("End of splash screen CB\r\n"); splashscreen = false; + dsp->cls(); + dsp->power_off(); } void reset_irq_tmr(void) @@ -256,6 +258,7 @@ printf("Reset connection to the main unit\n"); if (DigitalIn(HP_RST).read() == 0) { byescreen_timer.detach(); // cancel a "poweroff", if any + splashscreen = false; // in case it still on if (hp == NULL) { printf("setup HP communication handler\r\n"); @@ -428,7 +431,7 @@ // shutdown dsp->show_byescreen(); byescreen_timer.attach(callback(&shutdown), 2s); - } else { + } else { // display related commands dsp->show(cmd.cmd, cmd.value, cmd.size); }