diff options
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 */ |