diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 13:44:02 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 13:44:02 -0400 |
commit | 447332845f9a600f799cd45ab3eb61b306317118 (patch) | |
tree | b3e2ee25603d7bc57e06977d474757657f6fe232 /instr-daemon.c | |
parent | 33aad940481f16502c0c5f46dbf37781916c5b83 (diff) |
added startup counting for calibration routines
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |