Quote:
Originally posted by Coach C
if ((pX_sw_trig ~= LastState) & (pX_sw_trig = 1)) then
relayX_fwd = OpenClose
OpenClose = OpenClose - 1
endif
LastState = pX_sw_trig
|
The PBASIC operator for not equal is <>. Also, use the keyword AND instead of &. Finally, can get rid of the variable OpenClose and just use relayX_fwd=1-relayX_fwd if you are running low on variable space. Either way, make sure to set relayX_rev=1-relayX_fwd.