summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-24 13:44:02 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-24 13:44:02 -0400
commit447332845f9a600f799cd45ab3eb61b306317118 (patch)
treeb3e2ee25603d7bc57e06977d474757657f6fe232
parent33aad940481f16502c0c5f46dbf37781916c5b83 (diff)
added startup counting for calibration routines
-rw-r--r--instr-daemon.c10
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) {