mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-23 08:47:42 +00:00
move soundbrd app external (#2756)
This commit is contained in:
@@ -274,7 +274,6 @@ set(CPPSRC
|
||||
apps/ble_tx_app.cpp
|
||||
apps/capture_app.cpp
|
||||
apps/pocsag_app.cpp
|
||||
apps/soundboard_app.cpp
|
||||
apps/ui_about_simple.cpp
|
||||
apps/ui_adsb_rx.cpp
|
||||
apps/ui_aprs_rx.cpp
|
||||
|
@@ -3689,44 +3689,6 @@ static constexpr Bitmap bitmap_icon_sonde{
|
||||
{16, 16},
|
||||
bitmap_icon_sonde_data};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_soundboard_data[] = {
|
||||
0xF0,
|
||||
0x0F,
|
||||
0x1C,
|
||||
0x18,
|
||||
0x17,
|
||||
0x38,
|
||||
0x15,
|
||||
0x78,
|
||||
0x15,
|
||||
0xF8,
|
||||
0x15,
|
||||
0x82,
|
||||
0x15,
|
||||
0x8B,
|
||||
0xD5,
|
||||
0x83,
|
||||
0xD5,
|
||||
0xBB,
|
||||
0xD5,
|
||||
0x83,
|
||||
0x15,
|
||||
0x8B,
|
||||
0x15,
|
||||
0x92,
|
||||
0x15,
|
||||
0xA0,
|
||||
0x17,
|
||||
0x80,
|
||||
0x1C,
|
||||
0x80,
|
||||
0xF0,
|
||||
0xFF,
|
||||
};
|
||||
static constexpr Bitmap bitmap_icon_soundboard{
|
||||
{16, 16},
|
||||
bitmap_icon_soundboard_data};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_speaker_data[] = {
|
||||
0x00,
|
||||
0x00,
|
||||
|
5
firmware/application/external/external.cmake
vendored
5
firmware/application/external/external.cmake
vendored
@@ -241,6 +241,10 @@ set(EXTCPPSRC
|
||||
#epirb_rx
|
||||
external/epirb_rx/main.cpp
|
||||
external/epirb_rx/ui_epirb_rx.cpp
|
||||
|
||||
#soundboard
|
||||
external/soundboard/main.cpp
|
||||
external/soundboard/soundboard_app.cpp
|
||||
)
|
||||
|
||||
set(EXTAPPLIST
|
||||
@@ -302,4 +306,5 @@ set(EXTAPPLIST
|
||||
battleship
|
||||
ert
|
||||
epirb_rx
|
||||
soundboard
|
||||
)
|
||||
|
16
firmware/application/external/external.ld
vendored
16
firmware/application/external/external.ld
vendored
@@ -81,6 +81,8 @@ MEMORY
|
||||
ram_external_app_battleship (rwx) : org = 0xADE80000, len = 32k
|
||||
ram_external_app_ert (rwx) : org = 0xADE90000, len = 32k
|
||||
ram_external_app_epirb_rx (rwx) : org = 0xADEA0000, len = 32k
|
||||
ram_external_app_soundboard (rwx) : org = 0xADEB0000, len = 32k
|
||||
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
@@ -409,29 +411,35 @@ SECTIONS
|
||||
*(*ui*external_app*spaceinv*);
|
||||
} > ram_external_app_spaceinv
|
||||
|
||||
.external_app_blackjack : ALIGN(4) SUBALIGN(4)
|
||||
.external_app_blackjack : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_blackjack.application_information));
|
||||
*(*ui*external_app*blackjack*);
|
||||
} > ram_external_app_blackjack
|
||||
|
||||
.external_app_battleship : ALIGN(4) SUBALIGN(4)
|
||||
.external_app_battleship : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_battleship.application_information));
|
||||
*(*ui*external_app*battleship*);
|
||||
} > ram_external_app_battleship
|
||||
|
||||
.external_app_ert : ALIGN(4) SUBALIGN(4)
|
||||
.external_app_ert : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_ert.application_information));
|
||||
*(*ui*external_app*ert*);
|
||||
} > ram_external_app_ert
|
||||
|
||||
.external_app_epirb_rx : ALIGN(4) SUBALIGN(4)
|
||||
.external_app_epirb_rx : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_epirb_rx.application_information));
|
||||
*(*ui*external_app*epirb_rx*);
|
||||
} > ram_external_app_epirb_rx
|
||||
|
||||
.external_app_soundboard : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_soundboard.application_information));
|
||||
*(*ui*external_app*soundboard*);
|
||||
} > ram_external_app_soundboard
|
||||
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace ui::external_app::shoppingcart_lock {
|
||||
void initialize_app(NavigationView& nav) {
|
||||
baseband::run_image(portapack::spi_flash::image_tag_audio_tx);
|
||||
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
|
||||
nav.push<ShoppingCartLock>();
|
||||
}
|
||||
} // namespace ui::external_app::shoppingcart_lock
|
||||
|
83
firmware/application/external/soundboard/main.cpp
vendored
Normal file
83
firmware/application/external/soundboard/main.cpp
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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 "soundboard_app.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "external_app.hpp"
|
||||
|
||||
namespace ui::external_app::soundboard {
|
||||
void initialize_app(ui::NavigationView& nav) {
|
||||
nav.push<SoundBoardView>();
|
||||
}
|
||||
} // namespace ui::external_app::soundboard
|
||||
|
||||
extern "C" {
|
||||
|
||||
__attribute__((section(".external_app.app_soundboard.application_information"), used)) application_information_t _application_information_soundboard = {
|
||||
/*.memory_location = */ (uint8_t*)0x00000000,
|
||||
/*.externalAppEntry = */ ui::external_app::soundboard::initialize_app,
|
||||
/*.header_version = */ CURRENT_HEADER_VERSION,
|
||||
/*.app_version = */ VERSION_MD5,
|
||||
|
||||
/*.app_name = */ "Soundbrd",
|
||||
/*.bitmap_data = */ {
|
||||
0xF0,
|
||||
0x0F,
|
||||
0x1C,
|
||||
0x18,
|
||||
0x17,
|
||||
0x38,
|
||||
0x15,
|
||||
0x78,
|
||||
0x15,
|
||||
0xF8,
|
||||
0x15,
|
||||
0x82,
|
||||
0x15,
|
||||
0x8B,
|
||||
0xD5,
|
||||
0x83,
|
||||
0xD5,
|
||||
0xBB,
|
||||
0xD5,
|
||||
0x83,
|
||||
0x15,
|
||||
0x8B,
|
||||
0x15,
|
||||
0x92,
|
||||
0x15,
|
||||
0xA0,
|
||||
0x17,
|
||||
0x80,
|
||||
0x1C,
|
||||
0x80,
|
||||
0xF0,
|
||||
0xFF,
|
||||
},
|
||||
/*.icon_color = */ ui::Color::orange().v,
|
||||
/*.menu_location = */ app_location_t::TX,
|
||||
/*.desired_menu_position = */ -1,
|
||||
|
||||
/*.m4_app_tag = portapack::spi_flash::image_tag_soundboard */ {'P', 'A', 'T', 'X'},
|
||||
/*.m4_app_offset = */ 0x00000000, // will be filled at compile time
|
||||
};
|
||||
}
|
@@ -33,7 +33,7 @@
|
||||
using namespace tonekey;
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
namespace ui::external_app::soundboard {
|
||||
|
||||
#define FILE_PER_PAGE 50
|
||||
|
||||
@@ -323,4 +323,4 @@ SoundBoardView::~SoundBoardView() {
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
} // namespace ui::external_app::soundboard
|
@@ -33,7 +33,7 @@
|
||||
#include "app_settings.hpp"
|
||||
#include "radio_state.hpp"
|
||||
|
||||
namespace ui {
|
||||
namespace ui::external_app::soundboard {
|
||||
|
||||
class SoundBoardView : public View {
|
||||
public:
|
||||
@@ -178,6 +178,6 @@ class SoundBoardView : public View {
|
||||
}};
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
} /* namespace ui::external_app::soundboard */
|
||||
|
||||
#endif /*__UI_SOUNDBOARD_H__*/
|
@@ -262,7 +262,7 @@ void ViewWavView::on_playback_progress(const uint32_t progress) {
|
||||
ViewWavView::ViewWavView(
|
||||
NavigationView& nav)
|
||||
: nav_(nav) {
|
||||
baseband::run_image(portapack::spi_flash::image_tag_audio_tx);
|
||||
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
|
||||
wav_reader = std::make_unique<WAVFileReader>();
|
||||
|
||||
add_children({&labels,
|
||||
|
@@ -71,7 +71,6 @@
|
||||
#include "ble_tx_app.hpp"
|
||||
#include "capture_app.hpp"
|
||||
#include "pocsag_app.hpp"
|
||||
#include "soundboard_app.hpp"
|
||||
|
||||
#include "core_control.hpp"
|
||||
#include "file.hpp"
|
||||
@@ -142,7 +141,6 @@ const NavigationView::AppList NavigationView::appList = {
|
||||
{"ooktx", "OOK", TX, ui::Color::yellow(), &bitmap_icon_remote, new ViewFactory<EncodersView>()},
|
||||
{"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>()},
|
||||
{"touchtune", "TouchTune", TX, ui::Color::green(), &bitmap_icon_touchtunes, new ViewFactory<TouchTunesView>()},
|
||||
{"signalgen", "SignalGen", TX, Color::green(), &bitmap_icon_cwgen, new ViewFactory<SigGenView>()},
|
||||
/* TRX ********************************************************************/
|
||||
|
@@ -369,13 +369,6 @@ set(MODE_CPPSRC
|
||||
DeclareTargets(PAMA am_audio)
|
||||
|
||||
|
||||
### Audio transmit
|
||||
|
||||
set(MODE_CPPSRC
|
||||
proc_audiotx.cpp
|
||||
)
|
||||
DeclareTargets(PATX audio_tx)
|
||||
|
||||
### Capture
|
||||
|
||||
set(MODE_CPPSRC
|
||||
@@ -690,6 +683,13 @@ set(MODE_CPPSRC
|
||||
)
|
||||
DeclareTargets(PNOA noaaapt_rx)
|
||||
|
||||
### Audio transmit
|
||||
|
||||
set(MODE_CPPSRC
|
||||
proc_audiotx.cpp
|
||||
)
|
||||
DeclareTargets(PATX audio_tx)
|
||||
|
||||
|
||||
### HackRF "factory" firmware
|
||||
|
||||
|
Reference in New Issue
Block a user