diff options
-rw-r--r-- | device-functions.c | 3 | ||||
-rw-r--r-- | flash.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/device-functions.c b/device-functions.c index 3853422..b17eada 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4498,6 +4498,9 @@ float rst_ampl_value (int channel) if ((globals.Flash.min_ampl[channel] > 0.0) && (globals.Flash.max_ampl[channel] > 0.0)) { // both min and max ampls are positive, range does not include zero. AVR-D4-B. return globals.Flash.min_ampl[channel]; + } else if ((globals.Flash.min_ampl[channel] < 0.0) && (globals.Flash.max_ampl[channel] < 0.0)) { + // both min and max ampls are negative, range does not include zero. AVR-CD2-B CH2. + return globals.Flash.max_ampl[channel]; } else { // normal unit return 0.0; @@ -983,7 +983,7 @@ void fixFlash(FlashStruct *mem) } if ((safe_val != 0.0) && (mem->rcl_amplitude[i][j] == 0.0)) { - // AVR-D4-B + // AVR-D4-B, AVR-CD2-B CH2 mem->rcl_amplitude[i][j] = safe_val; ++fix_initial_constants; } |