summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2013-10-02 14:50:29 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2013-10-02 14:50:29 -0400
commit6264d1e20d7d37b1b2d1a5c0fb2c41e8ed203325 (patch)
tree9e0f29e638612bd8a98eaff0d6dfdd57a7c6b04b
parente859a414daccc39e7174232437e370044bcbfd4b (diff)
Revert "added chans_opposite_polarities for AVR-D3-B-MS1 error checking"
This reverts commit e1678aa56d0d1deaf003e0a04f09d26000d9eca5.
-rw-r--r--error_utils.c20
-rw-r--r--flash.c1
-rw-r--r--globals.h3
3 files changed, 3 insertions, 21 deletions
diff --git a/error_utils.c b/error_utils.c
index 718c40b..503724d 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -647,21 +647,6 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
}
}
- float real_max_ampl[max_channels];
- float real_min_ampl[max_channels];
- for (i=0; i<max_channels; i++) {
- real_max_ampl[i]=globals.Flash.max_ampl[i];
- real_min_ampl[i]=globals.Flash.min_ampl[i];
- }
-
- // handle AVR-D3-B-MS1, where the two channels must have opposite polarities
- if ( (globals.Flash.channels==2) && globals.Flash.chans_opposite_polarities && globals.Flash.ChanKey_amplitude) {
- if (ChannelStateToTest[0].amplitude > 0.0) {
- real_max_ampl[1] = 0.0;
- } else {
- real_min_ampl[1]= 0.0;
- }
- }
for (i=0; (i<num_of_chan) && !early_quit; ++i) {
/* Must be changing a setting */
@@ -1063,7 +1048,7 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
/* --- check minimum amplitude --- */
- globals.Constraints.err_min_ampl[i]=real_min_ampl[i];
+ globals.Constraints.err_min_ampl[i]=globals.Flash.min_ampl[i];
if ( (globals.Constraints.err_min_ampl[i]>=0.0 && ChannelStateToTest[i].amplitude<(0.999*globals.Constraints.err_min_ampl[i]))
|| (globals.Constraints.err_min_ampl[i]<0.0 && ChannelStateToTest[i].amplitude<(1.001*globals.Constraints.err_min_ampl[i])) ) {
@@ -1098,8 +1083,7 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels])
/* --- check maximum amplitude --- */
- globals.Constraints.err_max_ampl[i]=real_max_ampl[i];
-
+ globals.Constraints.err_max_ampl[i]=globals.Flash.max_ampl[i];
if ( (globals.Constraints.err_max_ampl[i]>=0.0 && ChannelStateToTest[i].amplitude>(1.001*globals.Constraints.err_max_ampl[i]))
|| (globals.Constraints.err_max_ampl[i]<0.0 && ChannelStateToTest[i].amplitude>(0.999*globals.Constraints.err_max_ampl[i])) ) {
report_error=amplitude_upper_limit;
diff --git a/flash.c b/flash.c
index 781537b..03b0529 100644
--- a/flash.c
+++ b/flash.c
@@ -462,7 +462,6 @@ static void initFlashValues(FlashStruct *mem)
mem->self_cal_typical_time_sec=0;
mem->prf_limiter=1;
- mem->chans_opposite_polarities=0;
mem->pcb116c_mon=1; /* more recent ADC, different reading code */
mem->warn_even_if_output_off=0;
diff --git a/globals.h b/globals.h
index bb6b346..a5a1623 100644
--- a/globals.h
+++ b/globals.h
@@ -456,9 +456,8 @@ typedef struct {
char self_cal; /* 242 */
char prf_limiter; /* 243 */
- char chans_opposite_polarities; /* 244 */
- char spare_padding[11]; /* 245 - padding between common and per-channel sections of the */
+ char spare_padding[12]; /* 244 - padding between common and per-channel sections of the */
/* flash eeprom. Adjust size if variables added to common section, */
/* so that per-channel section starts at 256 */