Move APRS receiver to external app

This commit is contained in:
Belousov Oleg
2026-07-27 21:27:28 +03:00
parent 4a836aef86
commit 8adb3c2428
8 changed files with 85 additions and 9 deletions
-1
View File
@@ -285,7 +285,6 @@ set(CPPSRC
apps/capture_app.cpp
apps/pocsag_app.cpp
apps/ui_about_simple.cpp
apps/ui_aprs_rx.cpp
apps/ui_aprs_tx.cpp
apps/ui_battinfo.cpp
apps/ui_bmp_file_viewer.cpp
+57
View File
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2026 PortaPack Mayhem
*
* This file is part of PortaPack.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#include "ui_aprs_rx.hpp"
#include "ui_navigation.hpp"
#include "external_app.hpp"
namespace ui::external_app::aprs_rx {
void initialize_app(ui::NavigationView& nav) {
nav.push<APRSRXView>();
}
} // namespace ui::external_app::aprs_rx
extern "C" {
__attribute__((section(".external_app.app_aprs_rx.application_information"), used)) application_information_t _application_information_aprs_rx = {
/*.memory_location = */ (uint8_t*)0x00000000,
/*.externalAppEntry = */ ui::external_app::aprs_rx::initialize_app,
/*.header_version = */ CURRENT_HEADER_VERSION,
/*.app_version = */ VERSION_MD5,
/*.app_name = */ "APRS",
/*.bitmap_data = */ {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F,
0x4C, 0x32, 0xFE, 0x7F, 0x25, 0xA4, 0x25, 0xA4,
0xFF, 0xFF, 0x25, 0xA4, 0x25, 0xA4, 0xFE, 0x7F,
0x4C, 0x32, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00,
},
/*.icon_color = */ ui::Color::green().v,
/*.menu_location = */ app_location_t::RX,
/*.desired_menu_position = */ -1,
/*.m4_app_tag = portapack::spi_flash::image_tag_aprs_rx */ {'P', 'A', 'P', 'R'},
/*.m4_app_offset = */ 0x00000000,
};
} // extern "C"
@@ -31,19 +31,25 @@
using namespace portapack;
namespace ui::external_app::aprs_rx {
void APRSLogger::log_raw_data(const std::string& data) {
log_file.write_entry(data);
}
} // namespace ui::external_app::aprs_rx
namespace ui {
template <>
void RecentEntriesTable<APRSRecentEntries>::draw(
void RecentEntriesTable<external_app::aprs_rx::APRSRecentEntries>::draw(
const Entry& entry,
const Rect& target_rect,
Painter& painter,
const Style& style,
RecentEntriesColumns& columns) {
using namespace external_app::aprs_rx;
Color target_color;
// auto entry_age = entry.age;
@@ -68,6 +74,10 @@ void RecentEntriesTable<APRSRecentEntries>::draw(
}
}
} // namespace ui
namespace ui::external_app::aprs_rx {
void APRSRxView::focus() {
options_region.focus();
}
@@ -402,4 +412,4 @@ void APRSRXView::focus() {
APRSRXView::~APRSRXView() {
}
} /* namespace ui */
} // namespace ui::external_app::aprs_rx
@@ -38,6 +38,8 @@
#include "utility.hpp"
#include "file_path.hpp"
namespace ui::external_app::aprs_rx {
class APRSLogger {
public:
Optional<File::Error> append(const std::filesystem::path& filename) {
@@ -50,8 +52,6 @@ class APRSLogger {
LogFile log_file{};
};
namespace ui {
struct APRSRecentEntry {
using Key = uint64_t;
@@ -290,6 +290,6 @@ class APRSRXView : public View {
}};
};
} /* namespace ui */
} // namespace ui::external_app::aprs_rx
#endif /*__UI_APRS_RX_H__*/
+5
View File
@@ -399,6 +399,10 @@ set(EXTCPPSRC
external/ais_rx/main.cpp
external/ais_rx/ais_app.cpp
#aprs rx
external/aprs_rx/main.cpp
external/aprs_rx/ui_aprs_rx.cpp
)
set(EXTAPPLIST
@@ -495,6 +499,7 @@ set(EXTAPPLIST
tetra_rx
adsbrx
ais_rx
aprs_rx
)
# sdusb has type conflicts with PRALINE (HackRF Pro) - add only for non-PRALINE builds
+7
View File
@@ -117,6 +117,7 @@ MEMORY
ram_external_app_tetra_rx (rwx) : org = 0xAE0C0000, len = 32k
ram_external_app_adsbrx (rwx) : org = 0xAE0D0000, len = 32k
ram_external_app_ais_rx (rwx) : org = 0xAE0E0000, len = 32k
ram_external_app_aprs_rx (rwx) : org = 0xAE0F0000, len = 32k
}
SECTIONS
@@ -685,6 +686,12 @@ SECTIONS
*(*ui*external_app*ais_rx*);
} > ram_external_app_ais_rx
.external_app_aprs_rx : ALIGN(4) SUBALIGN(4)
{
KEEP(*(.external_app.app_aprs_rx.application_information));
*(*ui*external_app*aprs_rx*);
} > ram_external_app_aprs_rx
}
-2
View File
@@ -30,7 +30,6 @@
#include "portapack.hpp"
#include "ui_about_simple.hpp"
#include "ui_aprs_rx.hpp"
#include "ui_aprs_tx.hpp"
#include "ui_btle_rx.hpp"
#include "ui_debug.hpp"
@@ -97,7 +96,6 @@ const NavigationView::AppList NavigationView::appList = {
{nullptr, "Games", HOME, Color::cyan(), &bitmap_icon_games, new ViewFactory<GamesMenuView>()},
{nullptr, "Settings", HOME, Color::cyan(), &bitmap_icon_setup, new ViewFactory<SettingsMenuView>()},
/* RX ********************************************************************/
{"aprsrx", "APRS", RX, Color::green(), &bitmap_icon_aprs, new ViewFactory<APRSRXView>()},
{"audio", "Audio", RX, Color::green(), &bitmap_icon_speaker, new ViewFactory<AnalogAudioView>()},
{"blerx", "BLE Rx", RX, Color::green(), &bitmap_icon_btle, new ViewFactory<BLERxView>()},
{"pocsag", "POCSAG", RX, Color::green(), &bitmap_icon_pocsag, new ViewFactory<POCSAGAppView>()},
+1 -1
View File
@@ -24,4 +24,4 @@
# external app address ranges below must match those in linker file "external.ld"
maximum_application_size = 32*1024
external_apps_address_start = 0xADB00000
external_apps_address_end = 0xAE0F0000
external_apps_address_end = 0xAE100000