summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device-functions.c19
-rw-r--r--device-functions.h1
2 files changed, 16 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;
diff --git a/device-functions.h b/device-functions.h
index c60bacb..532026b 100644
--- a/device-functions.h
+++ b/device-functions.h
@@ -27,6 +27,7 @@ int Set_Trig_Source(int channel,int mode);
int Set_Gate_Sync(int channel,int mode);
int Set_Gate_Level(int channel,int mode);
int Set_zout(int channel,int setting,int really_for_zout);
+int Set_Use_Vctrl_PW_Range(int channel, gboolean mode);
int Set_Load(int channel, float value);
int Set_EA(int channel,int mode);
int Set_AdvDel(int channel,int setting);