diff options
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/instr-daemon.c b/instr-daemon.c index f2b9ca2..021eb62 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -317,6 +317,12 @@ static gboolean periodic_poll (void) { if (bus_getpin (POWER_FAIL)) { + globals.Flags.shutdown_started = TRUE; + + while (globals.Flags.flash_write_in_progress) { + g_usleep(1000); + } + LCD_clear(); LCD_write(0,0,"Power failed. Shutdown."); |