summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c
index 464079c..203af45 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -2715,6 +2715,18 @@ int Set_VI_Control(int parameter,int channel,float new_ampl,int *point_found,int
} else {
use_atten = globals.Flash.attenuators[channel][*atten_range];
}
+
+ // Limit max voltage in attenuator mode to 93% of full maximum,
+ // to avoid the region in AVPs where PW shifts at high amplitudes
+ float max1 = fabs(globals.Flash.min_ampl[channel]);
+ float max2 = fabs(globals.Flash.max_ampl[channel]);
+ if (max2 > max1) {
+ max1 = max2;
+ }
+ if ((use_ampl * use_atten) >
+ (globals.Flash.atten_percent_max_ampl[channel] * max1)) {
+ continue;
+ }
}
for (range_i=starting_range; (range_i<max_ranges) && (!*point_found || top_range_only); ++range_i) { /* use non-all-zero ranges */