diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 14:04:56 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-24 14:04:56 -0400 |
commit | b3c38cf2f99e387359653fc9f9530239c38c381d (patch) | |
tree | 781cd5ea77c24a7344bfa4d1d68151c61223143b /instr-daemon.c | |
parent | 37715d8b1b2a6465f1bb8232df8ae9c73efc743b (diff) |
fix writeUserBlock usage, and fix non-obvious rcl values
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/instr-daemon.c b/instr-daemon.c index b8a24c7..ec4e27e 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -237,17 +237,19 @@ 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); + fixFlash(&globals.Flash); + + // 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)); + } + nicinfo info; strcpy(info.ip,"-"); nicutils_infofordefaultroute(&info); |