From b7c8e9f3cf611066520895fc6971b8e2fd7a1aa0 Mon Sep 17 00:00:00 2001 From: BlueFox Date: Sat, 30 Mar 2024 17:31:28 +0000 Subject: [PATCH] Fixed blinking too early in lora_pingpong.py --- lora_pingpong.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lora_pingpong.py b/lora_pingpong.py index 5304cca..5500495 100644 --- a/lora_pingpong.py +++ b/lora_pingpong.py @@ -66,14 +66,15 @@ def as_initializer(lora, lcd, lcd_connected, interrupt_pin): lcd.putstr("Reached timeout!") break - # NOW got a response! - blink_led(receive_led) payload = lora.read_payload() if not payload: # if empty because of timeout ping_to_send = True continue + # NOW got a response! + blink_led(receive_led) + try: payload_dict = loads(payload) TX_POWER_REQ = payload_dict["tx_power"]