From 447332845f9a600f799cd45ab3eb61b306317118 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Fri, 24 Aug 2012 13:44:02 -0400 Subject: added startup counting for calibration routines --- instr-daemon.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'instr-daemon.c') diff --git a/instr-daemon.c b/instr-daemon.c index 7ed6808..b8a24c7 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -237,6 +237,13 @@ int main(int argc, char **argv) initFlash (&globals.Flash, FALSE, 0); + // count startups + if (globals.Flash.self_cal) { + ++globals.Flash.self_cal_startups; + int eprom_loc = (char *) &(globals.Flash.self_cal_startups) - (char *) &(globals.Flash.flash_start); + writeUserBlock(eprom_loc,&globals.Flash.flash_start + eprom_loc,sizeof(globals.Flash.self_cal_startups)); + } + gchar *message = g_strdup_printf ("%s, S/N %s", globals.Flash.model_num, globals.Flash.serial_num); LCD_display_extended_message (message, 0); g_free (message); @@ -266,6 +273,9 @@ int main(int argc, char **argv) bus_init(); Main_Rst(); + + + //register stdin channel stdinChannel = g_io_channel_unix_new(0); if(stdinChannel == NULL) { -- cgit