Parse error when source-call has ssid above 9 fixed
This commit is contained in:
@@ -65,9 +65,9 @@ def encode_address(s, final):
|
|||||||
encoded_ssid |= 0b10000000
|
encoded_ssid |= 0b10000000
|
||||||
|
|
||||||
# SSID should now be one or two postions long and contain a number (idealy between 0 and 15).
|
# 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)
|
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)
|
encoded_ssid |= (int(ssid) << 1) | 0b01100000 | (0b00000001 if final else 0)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
@@ -44,6 +44,9 @@ class LoraAprsKissTnc(LoRa):
|
|||||||
|
|
||||||
super(LoraAprsKissTnc, self).__init__(verbose)
|
super(LoraAprsKissTnc, self).__init__(verbose)
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
|
|
||||||
|
if appendSignalReport == 'False':
|
||||||
|
appendSignalReport = False
|
||||||
self.appendSignalReport = appendSignalReport
|
self.appendSignalReport = appendSignalReport
|
||||||
|
|
||||||
self.set_mode(MODE.SLEEP)
|
self.set_mode(MODE.SLEEP)
|
||||||
|
@@ -21,7 +21,7 @@ bandwidth=BW125
|
|||||||
# CR4_7
|
# CR4_7
|
||||||
# CR4_8
|
# CR4_8
|
||||||
codingrate=CR4_5
|
codingrate=CR4_5
|
||||||
appendSignalReport=True
|
appendSignalReport=False
|
||||||
paSelect = 1
|
paSelect = 1
|
||||||
MaxoutputPower = 15
|
MaxoutputPower = 15
|
||||||
outputPower = 15
|
outputPower = 15
|
||||||
|
@@ -60,7 +60,7 @@ class KissServer(Thread):
|
|||||||
encoded_data = KissHelper.encode_kiss(data)
|
encoded_data = KissHelper.encode_kiss(data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("KISS encoding went wrong (exception while parsing)")
|
print("KISS encoding went wrong (exception while parsing)")
|
||||||
# traceback.print_tb(e.__traceback__)
|
traceback.print_tb(e.__traceback__)
|
||||||
encoded_data = None
|
encoded_data = None
|
||||||
|
|
||||||
if encoded_data != None:
|
if encoded_data != None:
|
||||||
|
Reference in New Issue
Block a user