diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:01:15 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:01:15 +0900 |
commit | e0f362e6e2ceae4b4bfd91054ae944a0120c364d (patch) | |
tree | fdb4920f141f52e44888d042007763ccc6658dbd | |
parent | 4bd59d65ea5c4c14d156e1191cd7b72dc6a2e31a (diff) |
allow amplitude to be in a limited negative-only range (AVR-CD2-B)
-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; } |