Fix issue with wrong path being digirepeated

pull/42/head
sh123 2022-10-16 11:28:14 +03:00
rodzic e2165619c0
commit 9f216ee30b
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -65,7 +65,9 @@ bool Callsign::ToBinary(byte *txPayload, int bufferLength) const
String Callsign::ToString() const
{
String result = call_;
if (ssid_ != 0) {
if (ssid_ == 0) {
result += "*";
} else {
result += "-" + String(ssid_);
}
return result;
@ -75,9 +77,7 @@ bool Callsign::Digirepeat()
{
if (IsPath()) {
if (ssid_ > 0) {
if (--ssid_ == 0) {
call_ += "*";
}
ssid_--;
return true;
}
}