|
You probably have something like this:
relayX_fwd = pX_sw_trig
You need something like this:
if (pX_sw_trig) then relayX_fwd = 1
if (pX_sw_top) then relayX_fwd = 0
If using two buttons is out of the question, you'll have to get a bit more creative:
if ((pX_sw_trig ~= LastState) & (pX_sw_trig = 1)) then
relayX_fwd = OpenClose
OpenClose = OpenClose - 1
endif
LastState = pX_sw_trig
|