Seems not to crash anymore...

marcel 2 years ago
parent da1a45dad5
commit a1648da6ad
  1. 4
      KissHelper.py
  2. 3
      LoraAprsKissTnc.py
  3. 2
      RPi-LoRa-KISS-TNC.ini
  4. 2
      TCPServer.py

@ -65,9 +65,9 @@ def encode_address(s, final):
encoded_ssid |= 0b10000000
# SSID should now be one or two postions long and contain a number (idealy between 0 and 15).
if len(ssid) is 1 and ssid[0] > 47 and ssid[0] < 58:
if len(ssid) == 1 and ssid[0] > 47 and ssid[0] < 58:
encoded_ssid |= (int(ssid) << 1) | 0b01100000 | (0b00000001 if final else 0)
elif len(ssid) is 2 and ssid[0] > 47 and ssid[0] < 58 and ssid[1] > 47 and ssid[2] < 58:
elif len(ssid) == 2 and ssid[0] > 47 and ssid[0] < 58 and ssid[1] > 47 and ssid[1] < 58:
encoded_ssid |= (int(ssid) << 1) | 0b01100000 | (0b00000001 if final else 0)
else:
return None

@ -44,6 +44,9 @@ class LoraAprsKissTnc(LoRa):
super(LoraAprsKissTnc, self).__init__(verbose)
self.queue = queue
if appendSignalReport == 'False':
appendSignalReport = False
self.appendSignalReport = appendSignalReport
self.set_mode(MODE.SLEEP)

@ -21,7 +21,7 @@ bandwidth=BW125
# CR4_7
# CR4_8
codingrate=CR4_5
appendSignalReport=True
appendSignalReport=False
paSelect = 1
MaxoutputPower = 15
outputPower = 15

@ -60,7 +60,7 @@ class KissServer(Thread):
encoded_data = KissHelper.encode_kiss(data)
except Exception as e:
print("KISS encoding went wrong (exception while parsing)")
# traceback.print_tb(e.__traceback__)
traceback.print_tb(e.__traceback__)
encoded_data = None
if encoded_data != None:

Loading…
Cancel
Save