SSTV TX to ext (#2254)

* SSTV TX to ext
This commit is contained in:
Totoo 2024-09-20 15:41:44 +02:00 committed by GitHub
parent 7feef9d38b
commit 9438c9a574
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 110 additions and 15 deletions

View File

@ -327,7 +327,7 @@ set(CPPSRC
# apps/ui_spectrum_painter_text.cpp
# apps/ui_spectrum_painter.cpp
apps/ui_ss_viewer.cpp
apps/ui_sstvtx.cpp
# apps/ui_sstvtx.cpp #moved to ext
apps/ui_standalone_view.cpp
apps/ui_subghzd.cpp
# apps/ui_test.cpp

View File

@ -89,10 +89,13 @@ set(EXTCPPSRC
external/adsbtx/main.cpp
external/adsbtx/ui_adsb_tx.cpp
#morse_tx
external/morse_tx/main.cpp
external/morse_tx/ui_morse.cpp
#sstvtx
external/sstvtx/main.cpp
external/sstvtx/ui_sstvtx.cpp
)
set(EXTAPPLIST
@ -118,4 +121,5 @@ set(EXTAPPLIST
protoview
adsbtx
morse_tx
sstvtx
)

View File

@ -45,6 +45,7 @@ MEMORY
ram_external_app_protoview(rwx) : org = 0xADC40000, len = 32k
ram_external_app_adsbtx(rwx) : org = 0xADC50000, len = 32k
ram_external_app_morse_tx(rwx) : org = 0xADC60000, len = 32k
ram_external_app_sstvtx(rwx) : org = 0xADC70000, len = 32k
}
SECTIONS
@ -183,5 +184,12 @@ SECTIONS
*(*ui*external_app*morse_tx*);
} > ram_external_app_morse_tx
.external_app_sstvtx : ALIGN(4) SUBALIGN(4)
{
KEEP(*(.external_app.app_sstvtx.application_information));
*(*ui*external_app*sstvtx*);
} > ram_external_app_sstvtx
}

View File

@ -0,0 +1,82 @@
/*
* Copyright (C) 2023 Bernd Herzog
*
* 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.hpp"
#include "ui_sstvtx.hpp"
#include "ui_navigation.hpp"
#include "external_app.hpp"
namespace ui::external_app::sstvtx {
void initialize_app(ui::NavigationView& nav) {
nav.push<SSTVTXView>();
}
} // namespace ui::external_app::sstvtx
extern "C" {
__attribute__((section(".external_app.app_sstvtx.application_information"), used)) application_information_t _application_information_sstvtx = {
/*.memory_location = */ (uint8_t*)0x00000000,
/*.externalAppEntry = */ ui::external_app::sstvtx::initialize_app,
/*.header_version = */ CURRENT_HEADER_VERSION,
/*.app_version = */ VERSION_MD5,
/*.app_name = */ "SSTV",
/*.bitmap_data = */ {
0x00,
0x00,
0x00,
0x00,
0xFE,
0x7F,
0x03,
0xC0,
0x53,
0xD5,
0xAB,
0xCA,
0x53,
0xD5,
0xAB,
0xCA,
0x53,
0xD5,
0xAB,
0xCA,
0x53,
0xD5,
0x03,
0xC0,
0xFF,
0xFF,
0xFB,
0xD7,
0xFE,
0x7F,
0x00,
0x00,
},
/*.icon_color = */ ui::Color::green().v,
/*.menu_location = */ app_location_t::TX,
/*.m4_app_tag = portapack::spi_flash::image_tag_sstvtx */ {'P', 'S', 'T', 'X'},
/*.m4_app_offset = */ 0x00000000, // will be filled at compile time
};
}

View File

@ -31,7 +31,7 @@
using namespace portapack;
namespace ui {
namespace ui::external_app::sstvtx {
void SSTVTXView::focus() {
if (file_error)
@ -232,7 +232,8 @@ SSTVTXView::SSTVTXView(
// Maybe this could be merged with proc_tones ? Pretty much the same except lots
// of different tones (256+)
baseband::run_image(portapack::spi_flash::image_tag_sstv_tx);
// baseband::run_image(portapack::spi_flash::image_tag_sstv_tx);
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
add_children({&labels,
&options_bitmaps,
@ -283,4 +284,4 @@ SSTVTXView::SSTVTXView(
};
}
} /* namespace ui */
} // namespace ui::external_app::sstvtx

View File

@ -38,7 +38,7 @@
using namespace sstv;
namespace ui {
namespace ui::external_app::sstvtx {
class SSTVTXView : public View {
public:
@ -110,6 +110,6 @@ class SSTVTXView : public View {
}};
};
} /* namespace ui */
} /* namespace ui::external_app::sstvtx */
#endif /*__UI_SSTVTX_H__*/

View File

@ -74,7 +74,7 @@
#include "ui_sonde.hpp"
// #include "ui_spectrum_painter.hpp" //moved to ext app
#include "ui_ss_viewer.hpp"
#include "ui_sstvtx.hpp"
// #include "ui_sstvtx.hpp" //moved to ext
// #include "ui_test.hpp"
#include "ui_text_editor.hpp"
#include "ui_tone_search.hpp"
@ -191,7 +191,7 @@ const NavigationView::AppList NavigationView::appList = {
{"pocsagtx", "POCSAG TX", TX, ui::Color::green(), &bitmap_icon_pocsag, new ViewFactory<POCSAGTXView>()},
{"rdstx", "RDS", TX, ui::Color::green(), &bitmap_icon_rds, new ViewFactory<RDSView>()},
{"soundbrd", "Soundbrd", TX, ui::Color::green(), &bitmap_icon_soundboard, new ViewFactory<SoundBoardView>()},
{"sstvtx", "SSTV", TX, ui::Color::green(), &bitmap_icon_sstv, new ViewFactory<SSTVTXView>()},
//{"sstvtx", "SSTV", TX, ui::Color::green(), &bitmap_icon_sstv, new ViewFactory<SSTVTXView>()}, //moved to ext
{"touchtune", "TouchTune", TX, ui::Color::green(), &bitmap_icon_touchtunes, new ViewFactory<TouchTunesView>()},
/* UTILITIES *************************************************************/
{"antennalength", "Antenna Length", UTILITIES, Color::green(), &bitmap_icon_tools_antenna, new ViewFactory<WhipCalcView>()},

View File

@ -480,12 +480,6 @@ set(MODE_CPPSRC
DeclareTargets(PSIG siggen)
### SSTV TX
set(MODE_CPPSRC
proc_sstvtx.cpp
)
DeclareTargets(PSTX sstvtx)
### Tones
@ -650,6 +644,12 @@ set(MODE_CPPSRC
DeclareTargets(PPVW protoview)
### SSTV TX
set(MODE_CPPSRC
proc_sstvtx.cpp
)
DeclareTargets(PSTX sstvtx)
### TPMS