# HG changeset patch # User David Douard # Date 1631216956 -7200 # Node ID 55e3b4441b113c2e334ca754be8f32328d53a06b # Parent 42c4e1ea9a77025f214fac35db05c35e697e5329 Stop splashscreen after 5s diff -r 42c4e1ea9a77 -r 55e3b4441b11 src/main.cpp --- 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); }