Skip to content

Commit

Permalink
Add * suffix for digirepaters only
Browse files Browse the repository at this point in the history
  • Loading branch information
sh123 committed Dec 1, 2022
1 parent f0fcd6c commit aba3fd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ax25_callsign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ bool Callsign::ToBinary(byte *txPayload, int bufferLength) const
return true;
}

String Callsign::ToString() const
String Callsign::ToString(bool isDigirepeater) const
{
String result = call_;
if (ssid_ == 0) {
result += "*";
result += isDigirepeater ? "*" : "";
} else {
result += "-" + String(ssid_);
}
Expand Down
2 changes: 1 addition & 1 deletion ax25_callsign.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Callsign
inline bool IsWide() const { return call_.startsWith("WIDE"); }
inline bool IsPath() const { return IsWide(); }

String ToString() const;
String ToString(bool isDigirepeater=false) const;
bool ToBinary(byte *txPayload, int bufferLength) const;

bool Digirepeat();
Expand Down
2 changes: 1 addition & 1 deletion ax25_payload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ String Payload::ToString(const String &customComment) const

for (int i = 0; i < rptCallsCount_; i++) {
if (rptCalls_[i].IsValid()) {
txt += String(",") + rptCalls_[i].ToString();
txt += String(",") + rptCalls_[i].ToString(true);
}
}

Expand Down

0 comments on commit aba3fd1

Please sign in to comment.