From f4cbb6a155da3c4582486fa2539b8bdd2723db59 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 31 Dec 1999 19:13:22 -0500 Subject: Revert "Revert "add possibility to ignore voltage polarity set by user"" This reverts commit 623db64a55a04e531bb847fa02ef20ce1a05a10c. --- device-functions.c | 5 +++++ flash.c | 1 + globals.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/device-functions.c b/device-functions.c index 9cd490e..a29d1f1 100644 --- a/device-functions.c +++ b/device-functions.c @@ -198,6 +198,11 @@ int Set_Amplitude(int check_possible_only,int pol_override,int override_on,int w int entry; int actual_pol; + // for CH2 of AVR-D3-B-MS1 + if (globals.Flash.ignore_ampl_polarity[channel]) { + new_ampl = fabs(new_ampl); + } + if (globals.Flash.enable_avrq_extra_ampls && channel) { return Set_avrq_ampl(check_possible_only,word_override,range_override,channel,new_ampl); } diff --git a/flash.c b/flash.c index 03b0529..db57bac 100644 --- a/flash.c +++ b/flash.c @@ -727,6 +727,7 @@ static void initFlashValues(FlashStruct *mem) mem->ext_amplify_xtra_rly[i]=4; mem->ea_xtra_rly[i]=5; mem->ew_xtra_rly[i]=5; + mem->ignore_ampl_polarity[i]=0; mem->curr_slew[i]=0; mem->distort_X[i]=0.0; diff --git a/globals.h b/globals.h index a5a1623..a49431d 100644 --- a/globals.h +++ b/globals.h @@ -716,6 +716,8 @@ typedef struct { char ew_enabled[max_channels]; /* addr 10142 */ short ew_xtra_rly[max_channels]; /* addr 10144 */ + char ignore_ampl_polarity[max_channels]; /* addr 10148, for AVR-D3-B-MS1 CH2 */ + char spare_end; char flash_end; -- cgit