From 565f595be882885ea1dd32bb02b845c611bf4b47 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:21:08 +0900 Subject: allow output to be switched off even if Error_check fails --- device-functions.c | 6 ++++-- 1 file 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; } -- cgit