From d7de65ae85d3cf7c591ff6ac3775c348cb477bf2 Mon Sep 17 00:00:00 2001 From: CiscoTheWolf <cisco@hostingwire.net> Date: Wed, 31 May 2023 18:45:17 +0200 Subject: [PATCH] fixed off by one counting --- rpi/antRender.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpi/antRender.py b/rpi/antRender.py index 0b22f16..9b01344 100644 --- a/rpi/antRender.py +++ b/rpi/antRender.py @@ -136,8 +136,8 @@ def on_connect(client, userdata, flags, response_code): def on_message(client, userdata, message): print("Received message '" + str(message.payload) + "' on topic '" + message.topic + "' with QoS " + str(message.qos)) - pin_number = str(message.payload)[12:13] - pin_state = str(message.payload)[6:9] + pin_number = str(message.payload)[12:14] + pin_state = str(message.payload)[6:10] print("pin number: " + pin_number+ " pin state: " + pin_state) proot_state = ProotState() proot_state.blink()