diff options
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/instr-daemon.c b/instr-daemon.c index c850c2f..58bff70 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -283,7 +283,7 @@ int main(int argc, char **argv) GMainLoop *loop = g_main_loop_new (NULL, FALSE); g_timeout_add (20, (GSourceFunc) periodic_poll, NULL); - g_timeout_add (100, (GSourceFunc) finish_boot, NULL); + g_timeout_add (100, (GSourceFunc) finish_boot, NULL); g_main_loop_run (loop); @@ -296,7 +296,8 @@ int main(int argc, char **argv) } -static gboolean finish_boot (void) { +static gboolean finish_boot (void) +{ #define MIN_STARTUP_DELAY 2 #define MAX_STARTUP_DELAY 120 @@ -342,8 +343,8 @@ static gboolean periodic_poll (void) } LCD_clear(); - LCD_write(0,0,"PWR: If frozen >10sec, turn off 1min &"); - LCD_write(1,0,"try again."); + LCD_write(0,0,"PWR: If frozen >10sec, turn off 1min &"); + LCD_write(1,0,"try again."); // use plain old open to avoid any buffering etc int enablefd = open("/proc/sys/kernel/sysrq", O_SYNC | O_RDWR); @@ -371,9 +372,9 @@ static gboolean periodic_poll (void) for (i=0; i<(globals.Flash.ChanKey_output_state?globals.Flash.channels:1); ++i) { output_on_time_so_far = (int) (sec_timer()-globals.Timers.last_activity_at[i]); - if ( (globals.Flash.output_timer[i]>0) && - (globals.Timers.last_activity_at[i]>0) && - (output_on_time_so_far > globals.Flash.output_timer[i])) { + if ( (globals.Flash.output_timer[i]>0) && + (globals.Timers.last_activity_at[i]>0) && + (output_on_time_so_far > globals.Flash.output_timer[i])) { Set_Output_State(i,output_off); Show_Main_Menu(); } |