Fixed blinking too early in lora_pingpong.py
This commit is contained in:
parent
45ee016126
commit
b7c8e9f3cf
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user