diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:21:08 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:21:08 +0900 |
commit | 565f595be882885ea1dd32bb02b845c611bf4b47 (patch) | |
tree | 2e1aee81fdc4ad9c781f6e38fa3b7f5b480f9985 /device-functions.c | |
parent | 347f3f886ea54470f340def6a7af981f5845cc01 (diff) |
allow output to be switched off even if Error_check fails
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 87c2bb4..e173d3b 100644 --- a/device-functions.c +++ b/device-functions.c @@ -1018,10 +1018,12 @@ int Set_Output_State(int channel,int mode) TestState[i]=globals.ChannelState[i]; } TestState[channel].output_state=mode; - if ((error_num=Error_check(TestState))) { + if ((error_num=Error_check(TestState)) && (mode == output_on)) { return error_num; } + /* allow output to be switched off even if Error_check fails! */ + /* suppress triggering during relay bounce */ /* set gate bit high, if not already high */ @@ -1055,7 +1057,7 @@ int Set_Output_State(int channel,int mode) /* keep trigger suppressed during output relay update */ /* trigger gate will be released at end of following Main_update_shift_registers(); */ - return OK; + return error_num; } |