mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-09 23:13:56 +01:00
new update to kiss utils
This commit is contained in:
parent
50fd831fdb
commit
fbb347fb7f
|
|
@ -39,15 +39,10 @@ String encodeAddressAX25(String tnc2Address) {
|
|||
int ssid = tnc2Address.substring(separatorIndex + 1).toInt();
|
||||
String kissAddress = "";
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
char addressChar;
|
||||
if (tnc2Address.length() > i && i < separatorIndex) {
|
||||
addressChar = tnc2Address.charAt(i);
|
||||
} else {
|
||||
addressChar = ' ';
|
||||
}
|
||||
char addressChar = ' ';
|
||||
if (tnc2Address.length() > i && i < separatorIndex) addressChar = tnc2Address.charAt(i);
|
||||
kissAddress += (char)(addressChar << 1);
|
||||
}
|
||||
|
||||
kissAddress += (char)((ssid << 1) | 0b01100000 | (hasBeenDigipited ? HAS_BEEN_DIGIPITED_MASK : 0));
|
||||
return kissAddress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue