Fixed blinking too early in lora_pingpong.py

This commit is contained in:
BlueFox 2024-03-30 17:31:28 +00:00
parent 45ee016126
commit b7c8e9f3cf

View File

@ -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"]