summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:01:15 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:01:15 +0900
commite0f362e6e2ceae4b4bfd91054ae944a0120c364d (patch)
treefdb4920f141f52e44888d042007763ccc6658dbd
parent4bd59d65ea5c4c14d156e1191cd7b72dc6a2e31a (diff)
allow amplitude to be in a limited negative-only range (AVR-CD2-B)
-rw-r--r--device-functions.c3
-rw-r--r--flash.c2
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;
diff --git a/flash.c b/flash.c
index ee3b036..1d84309 100644
--- a/flash.c
+++ b/flash.c
@@ -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;
}