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!")
|
lcd.putstr("Reached timeout!")
|
||||||
break
|
break
|
||||||
|
|
||||||
# NOW got a response!
|
|
||||||
blink_led(receive_led)
|
|
||||||
payload = lora.read_payload()
|
payload = lora.read_payload()
|
||||||
|
|
||||||
if not payload: # if empty because of timeout
|
if not payload: # if empty because of timeout
|
||||||
ping_to_send = True
|
ping_to_send = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# NOW got a response!
|
||||||
|
blink_led(receive_led)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
payload_dict = loads(payload)
|
payload_dict = loads(payload)
|
||||||
TX_POWER_REQ = payload_dict["tx_power"]
|
TX_POWER_REQ = payload_dict["tx_power"]
|
||||||
|
Loading…
Reference in New Issue
Block a user