summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:07:39 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:07:39 +0900
commit5e244d168aaeea24a1e9f9316e63e183feaad850 (patch)
tree38aeadd6efc00fde9345b9d88af211c05b695d35 /device-functions.c
parent270f0099a806ae27c11422efb8426eaefc8a0802 (diff)
better abstraction of method of switching voltage-controlled PW range, for clarity
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;