From 6ac848ad626c9adb498eba6972f5eb1bbced20b5 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 1 Jan 2000 00:16:57 +0900 Subject: make drive polarity of zout relay configurable for -R50 units and PCB 308A --- device-functions.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'device-functions.c') diff --git a/device-functions.c b/device-functions.c index ceab0c7..64feb6d 100644 --- a/device-functions.c +++ b/device-functions.c @@ -1358,7 +1358,8 @@ int Set_zout(int channel,int setting,int really_for_zout) /* first channel uses dedicated Zout line */ if (channel==0) { - if (setting!=globals.Flash.zout_max[channel]) { + if ( ((setting==globals.Flash.zout_max[channel]) && globals.Flash.zout_relay_high_for_max[channel]) || + ((setting==globals.Flash.zout_min[channel]) && !globals.Flash.zout_relay_high_for_max[channel])) { set_shiftreg_bits(SR_3, POS_12, ONE_BIT, BIT_HIGH); /* power zout relay */ } else { set_shiftreg_bits(SR_3, POS_12, ONE_BIT, BIT_LOW); /* de-power zout relay */ @@ -1367,7 +1368,8 @@ int Set_zout(int channel,int setting,int really_for_zout) /* second channel uses dedicated xtra-rly2 line */ if (channel==1) { - if (setting!=globals.Flash.zout_max[channel]) { + if ( ((setting==globals.Flash.zout_max[channel]) && globals.Flash.zout_relay_high_for_max[channel]) || + ((setting==globals.Flash.zout_min[channel]) && !globals.Flash.zout_relay_high_for_max[channel])) { set_shiftreg_bits(SR_2, XTR_POS + 2, ONE_BIT, BIT_HIGH); /* power zout relay */ } else { set_shiftreg_bits(SR_2, XTR_POS + 2, ONE_BIT, BIT_LOW); /* de-power zout relay */ -- cgit