changed Input Invert parameters

This commit is contained in:
Alexander Richter 2023-08-14 13:10:11 +02:00
parent 7f9a7f0b0d
commit 882f293723

View File

@ -343,16 +343,24 @@ while True:
if cmd == "I": if cmd == "I":
firstcom = 1 firstcom = 1
if value == 1: if value == 1:
if c["din.{}-invert".format(io)] == 0:
c["din.{}".format(io)] = 1 c["din.{}".format(io)] = 1
c["din.{}-invert".format(io)] = 0
if(Debug):print("din{}:{}".format(io,1)) if(Debug):print("din{}:{}".format(io,1))
else:
c["din.{}".format(io)] = 0
if(Debug):print("din{}:{}".format(io,0))
if value == 0: if value == 0:
if c["din.{}-invert".format(io)] == 0:
c["din.{}".format(io)] = 0 c["din.{}".format(io)] = 0
c["din.{}-invert".format(io)] = 1
if(Debug):print("din{}:{}".format(io,0)) if(Debug):print("din{}:{}".format(io,0))
else:
c["din.{}".format(io)] = 1
if(Debug):print("din{}:{}".format(io,1))
else:pass else:pass
elif cmd == "A": elif cmd == "A":
firstcom = 1 firstcom = 1
c["ain.{}".format(io)] = value c["ain.{}".format(io)] = value