summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/device-functions.c b/device-functions.c
index 6630c19..243edee 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -578,12 +578,10 @@ int Set_Pw(int check_possible_only,int word_override,int range_override,int chan
}
}
- /* Zout hardware/software is used in AVPP to control PW ranges in the
- * external circuitry, not Zout */
- Set_zout(channel,globals.Flash.zout_min[channel],0);
+ Set_Use_Vctrl_PW_Range(channel,TRUE);
} else {
- Set_zout(channel,globals.Flash.zout_max[channel],0);
+ Set_Use_Vctrl_PW_Range(channel,FALSE);
/* In AVPP units, the bottom range is voltage-controlled, and the upper range(s) are
PWin=PWout. Therefore, shift the relay used by the upper ranges by one, to avoid
@@ -1405,6 +1403,19 @@ int Set_zout(int channel,int setting,int really_for_zout)
}
+int Set_Use_Vctrl_PW_Range(int channel, gboolean mode)
+{
+ // This is a bit hackish.
+ // The Zout hardware/software is used in AVPP and similar units
+ // to control PW ranges in the external circuitry, not Zout.
+ if (mode == TRUE) {
+ Set_zout(channel,globals.Flash.zout_min[channel],0);
+ } else {
+ Set_zout(channel,globals.Flash.zout_max[channel],0);
+ }
+}
+
+
int Set_Load(int channel, float value)
{
int error_num;