summaryrefslogtreecommitdiff
path: root/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'flash.c')
-rw-r--r--flash.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/flash.c b/flash.c
index 23a7823..ee3b036 100644
--- a/flash.c
+++ b/flash.c
@@ -414,7 +414,7 @@ static void initFlashValues(FlashStruct *mem)
mem->logic_level_enabled=0;
mem->ChanKey_logic_level=0;
- strcpy(mem->model_num,"unprogrammed");
+ strcpy(mem->model_num,"AV-unprogrammed");
strcpy(mem->serial_num,"00000");
mem->fully_programmed=Being_Programmed;
@@ -936,6 +936,14 @@ void fixFlash(FlashStruct *mem)
int i, fix_initial_constants;
+ fix_initial_constants = 0;
+
+ // handle change in model number location
+ if ((mem->model_num[0] != 'A') && (mem->model_num[1] != 'V')) {
+ strcpy(mem->model_num, mem->model_num_old);
+ ++fix_initial_constants;
+ }
+
for (i=0; i<max_channels; i++) {
globals.Constraints.composite_min_burst_time[i]=mem->min_burst_gap[i];
@@ -1008,6 +1016,9 @@ void fixFlash(FlashStruct *mem)
eprom_loc = (char *) &(mem->rcl_amplitude) - (char *) &(mem->flash_start);
writeUserBlock(&globals.Flash, eprom_loc, sizeof(mem->rcl_amplitude));
+
+ eprom_loc = (char *) &(mem->model_num) - (char *) &(mem->flash_start);
+ writeUserBlock(&globals.Flash, eprom_loc, sizeof(mem->model_num));
}
}