|
|
|
@ -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 |
|
|
|
|