From b7ce6e5071530d4426ddd22e8f733a076e4f754a Mon Sep 17 00:00:00 2001 From: theBohnanza Date: Tue, 24 Oct 2023 23:16:19 +0200 Subject: [PATCH] removed Lpoti Bug Lpotis didn't work because of wrong halpin Name. also little tidy up --- arduino-connector.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arduino-connector.py b/arduino-connector.py index a7a578f..e80d4c2 100644 --- a/arduino-connector.py +++ b/arduino-connector.py @@ -224,11 +224,11 @@ for port in range(AInputs): for Poti in range(LPoti): if SetLPotiValue[Poti] == 0: for Pin in range(LPotiLatches[Poti][1]): - c.newpin("LPoti.{}.{}" .format(LPotiLatches[Poti][0],Pin), hal.HAL_BIT, hal.HAL_OUT) + c.newpin("lpoti.{}.{}" .format(LPotiLatches[Poti][0],Pin), hal.HAL_BIT, hal.HAL_OUT) if SetLPotiValue[Poti] == 1: - c.newpin("LPoti.{}.{}" .format(LPotiLatches[Poti][0],"out"), hal.HAL_S32, hal.HAL_OUT) + c.newpin("lpoti.{}.out" .format(LPotiLatches[Poti][0]), hal.HAL_S32, hal.HAL_OUT) if SetLPotiValue[Poti] == 2: - c.newpin("LPoti.{}.{}" .format(LPotiLatches[Poti][0],"out"), hal.HAL_FLOAT, hal.HAL_OUT) + c.newpin("lpoti.{}.out" .format(LPotiLatches[Poti][0]), hal.HAL_FLOAT, hal.HAL_OUT) # setup Absolute Encoder Knob halpins if BinSelKnob: @@ -413,8 +413,8 @@ while True: if(Debug):print("lpoti.{}.{} =0".format(io,Pin)) if LPotiLatches[Poti][0] == io and SetLPotiValue[Poti] >= 1: - c["lpoti.{}.{}" .format(io,"out")] = LPotiValues[Poti][value] - if(Debug):print("lpoti.{}.{} = 0".format("out",LPotiValues[Poti][value])) + c["lpoti.{}.out" .format(io)] = LPotiValues[Poti][value] + if(Debug):print("lpoti.{}.out = {}".format(io,LPotiValues[Poti][value])) elif cmd == "K": firstcom = 1