Aprs tx gps added, and save config added, path added (#2937)

This commit is contained in:
Totoo
2026-01-25 10:01:33 +01:00
committed by GitHub
parent 44d9ce00cd
commit 2319dcd0d6
11 changed files with 290 additions and 42 deletions
+7 -5
View File
@@ -103,8 +103,10 @@ class APRSPacket {
std::string get_digipeaters_formatted() {
uint8_t position = DIGIPEATER_START;
bool has_more = parse_address(SOURCE_START, REPEATER);
std::string repeaters = "";
if (!has_more) {
return "";
}
std::string repeaters = ",";
while (has_more) {
has_more = parse_address(position, REPEATER);
repeaters += std::string(address_buffer);
@@ -112,7 +114,7 @@ class APRSPacket {
position += ADDRESS_SIZE;
if (has_more) {
repeaters += ">";
repeaters += ",";
}
}
@@ -146,8 +148,8 @@ class APRSPacket {
}
std::string get_stream_text() {
std::string stream = get_source_formatted() + ">" + get_destination_formatted() + ";" + get_digipeaters_formatted() + ";" + get_information_text_formatted();
// get_digipeaters_formatted will add the "," to the beginning if there are digipeaters
std::string stream = get_source_formatted() + ">" + get_destination_formatted() + get_digipeaters_formatted() + ":" + get_information_text_formatted();
return stream;
}
+4
View File
@@ -384,6 +384,10 @@ void Text::set(std::string_view value) {
set_dirty();
}
std::string Text::get() {
return text;
}
void Text::getAccessibilityText(std::string& result) {
result = text;
}
+1
View File
@@ -217,6 +217,7 @@ class Text : public Widget {
Text(Rect parent_rect);
void set(std::string_view value);
std::string get();
void paint(Painter& painter) override;
void getAccessibilityText(std::string& result) override;