Move APRS transmitter to external app

This commit is contained in:
Belousov Oleg
2026-07-27 21:31:08 +03:00
parent 8adb3c2428
commit ec495b49f6
8 changed files with 74 additions and 8 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_tx.cpp
apps/ui_battinfo.cpp
apps/ui_bmp_file_viewer.cpp
apps/ui_btle_rx.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_tx.hpp"
#include "ui_navigation.hpp"
#include "external_app.hpp"
namespace ui::external_app::aprs_tx {
void initialize_app(ui::NavigationView& nav) {
nav.push<APRSTXView>();
}
} // namespace ui::external_app::aprs_tx
extern "C" {
__attribute__((section(".external_app.app_aprs_tx.application_information"), used)) application_information_t _application_information_aprs_tx = {
/*.memory_location = */ (uint8_t*)0x00000000,
/*.externalAppEntry = */ ui::external_app::aprs_tx::initialize_app,
/*.header_version = */ CURRENT_HEADER_VERSION,
/*.app_version = */ VERSION_MD5,
/*.app_name = */ "APRS TX",
/*.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::TX,
/*.desired_menu_position = */ -1,
/*.m4_app_tag = portapack::spi_flash::image_tag_afsk */ {'P', 'A', 'F', 'T'},
/*.m4_app_offset = */ 0x00000000,
};
} // extern "C"
@@ -37,7 +37,7 @@
using namespace aprs;
using namespace portapack;
namespace ui {
namespace ui::external_app::aprs_tx {
void APRSTXView::focus() {
tx_view.focus();
@@ -242,4 +242,4 @@ APRSTXView::APRSTXView(NavigationView& nav) {
// process_coordinates(last_lat, last_lon); //don't load last, so won't confuse users
}
} /* namespace ui */
} // namespace ui::external_app::aprs_tx
@@ -33,7 +33,7 @@
#include "radio_state.hpp"
#include "portapack.hpp"
namespace ui {
namespace ui::external_app::aprs_tx {
class APRSTXView : public View {
public:
@@ -161,4 +161,4 @@ class APRSTXView : public View {
}};
};
} /* namespace ui */
} // namespace ui::external_app::aprs_tx
+5
View File
@@ -403,6 +403,10 @@ set(EXTCPPSRC
external/aprs_rx/main.cpp
external/aprs_rx/ui_aprs_rx.cpp
#aprs tx
external/aprs_tx/main.cpp
external/aprs_tx/ui_aprs_tx.cpp
)
set(EXTAPPLIST
@@ -500,6 +504,7 @@ set(EXTAPPLIST
adsbrx
ais_rx
aprs_rx
aprs_tx
)
# sdusb has type conflicts with PRALINE (HackRF Pro) - add only for non-PRALINE builds
+7
View File
@@ -118,6 +118,7 @@ MEMORY
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
ram_external_app_aprs_tx (rwx) : org = 0xAE100000, len = 32k
}
SECTIONS
@@ -692,6 +693,12 @@ SECTIONS
*(*ui*external_app*aprs_rx*);
} > ram_external_app_aprs_rx
.external_app_aprs_tx : ALIGN(4) SUBALIGN(4)
{
KEEP(*(.external_app.app_aprs_tx.application_information));
*(*ui*external_app*aprs_tx*);
} > ram_external_app_aprs_tx
}
-2
View File
@@ -30,7 +30,6 @@
#include "portapack.hpp"
#include "ui_about_simple.hpp"
#include "ui_aprs_tx.hpp"
#include "ui_btle_rx.hpp"
#include "ui_debug.hpp"
#include "ui_encoders.hpp"
@@ -104,7 +103,6 @@ const NavigationView::AppList NavigationView::appList = {
{"subghzd", "SubGhzD", RX, Color::yellow(), &bitmap_icon_remote, new ViewFactory<SubGhzDView>()},
{"weather", "Weather", RX, Color::green(), &bitmap_icon_thermometer, new ViewFactory<WeatherView>()},
/* TX ********************************************************************/
{"aprstx", "APRS TX", TX, ui::Color::green(), &bitmap_icon_aprs, new ViewFactory<APRSTXView>()},
{"bletx", "BLE Tx", TX, ui::Color::green(), &bitmap_icon_btle, new ViewFactory<BLETxView>()},
{"ooktx", "OOK", TX, ui::Color::yellow(), &bitmap_icon_remote, new ViewFactory<EncodersView>()},
{"rdstx", "RDS", TX, ui::Color::green(), &bitmap_icon_rds, new ViewFactory<RDSView>()},
+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 = 0xAE100000
external_apps_address_end = 0xAE110000