antirez / freakwan

A floor-routing WAN implementing a chat over bare-LoRa (no LoRaWAN).
BSD 2-Clause "Simplified" License
374 stars 17 forks source link

Ignore empty commands #3

Closed eriol closed 1 year ago

eriol commented 1 year ago

It's not really a problem when we receive an empty command, but with this PR we keep serial logging clean. Without receiving an empty command will show the traceback:

Command from BLE received:  
Traceback (most recent call last):
  File "bt.py", line 129, in irq_handler
  File "main.py", line 404, in ble_receive_callback
  File "clictrl.py", line 26, in exec_user_command
IndexError: string index out of range
antirez commented 1 year ago

Good idea, thanks!