mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 06:49:24 -05:00
bring keyfob app back (#1794)
* bring keyfob app back * format * cleanup * format * remove committed line from original list
This commit is contained in:
parent
ce1084abc7
commit
3314001205
6
firmware/application/external/external.cmake
vendored
6
firmware/application/external/external.cmake
vendored
@ -54,6 +54,11 @@ set(EXTCPPSRC
|
||||
external/spainter/ui_spectrum_painter.cpp
|
||||
external/spainter/ui_spectrum_painter_text.cpp
|
||||
external/spainter/ui_spectrum_painter_image.cpp
|
||||
|
||||
#keyfob
|
||||
external/keyfob/main.cpp
|
||||
external/keyfob/ui_keyfob.cpp
|
||||
external/keyfob/ui_keyfob.hpp
|
||||
)
|
||||
|
||||
set(EXTAPPLIST
|
||||
@ -70,4 +75,5 @@ set(EXTAPPLIST
|
||||
jammer
|
||||
gpssim
|
||||
spainter
|
||||
keyfob
|
||||
)
|
||||
|
7
firmware/application/external/external.ld
vendored
7
firmware/application/external/external.ld
vendored
@ -30,6 +30,7 @@ MEMORY
|
||||
ram_external_app_jammer(rwx) : org = 0xEEF30000, len = 32k
|
||||
ram_external_app_gpssim(rwx) : org = 0xEEF40000, len = 32k
|
||||
ram_external_app_spainter(rwx) : org = 0xEEF50000, len = 32k
|
||||
ram_external_app_keyfob(rwx) : org = 0xEEF60000, len = 32k
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
@ -116,4 +117,10 @@ SECTIONS
|
||||
*(*ui*external_app*spainter*);
|
||||
} > ram_external_app_spainter
|
||||
|
||||
.external_app_keyfob : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.external_app.app_keyfob.application_information));
|
||||
*(*ui*external_app*keyfob*);
|
||||
} > ram_external_app_keyfob
|
||||
|
||||
}
|
||||
|
82
firmware/application/external/keyfob/main.cpp
vendored
Normal file
82
firmware/application/external/keyfob/main.cpp
vendored
Normal 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_keyfob.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "external_app.hpp"
|
||||
|
||||
namespace ui::external_app::keyfob {
|
||||
void initialize_app(ui::NavigationView& nav) {
|
||||
nav.push<KeyfobView>();
|
||||
}
|
||||
} // namespace ui::external_app::keyfob
|
||||
|
||||
extern "C" {
|
||||
|
||||
__attribute__((section(".external_app.app_keyfob.application_information"), used)) application_information_t _application_information_keyfob = {
|
||||
/*.memory_location = */ (uint8_t*)0x00000000,
|
||||
/*.externalAppEntry = */ ui::external_app::keyfob::initialize_app,
|
||||
/*.header_version = */ CURRENT_HEADER_VERSION,
|
||||
/*.app_version = */ VERSION_MD5,
|
||||
|
||||
/*.app_name = */ "Keyfob",
|
||||
/*.bitmap_data = */ {
|
||||
0x30,
|
||||
0x00,
|
||||
0x30,
|
||||
0x00,
|
||||
0x30,
|
||||
0x00,
|
||||
0x30,
|
||||
0x00,
|
||||
0x30,
|
||||
0x00,
|
||||
0x30,
|
||||
0x00,
|
||||
0xFC,
|
||||
0x00,
|
||||
0xCE,
|
||||
0x01,
|
||||
0x86,
|
||||
0x01,
|
||||
0xFE,
|
||||
0x01,
|
||||
0x86,
|
||||
0x31,
|
||||
0x86,
|
||||
0x49,
|
||||
0xCE,
|
||||
0x87,
|
||||
0xFC,
|
||||
0x84,
|
||||
0xFC,
|
||||
0x4B,
|
||||
0x78,
|
||||
0x30,
|
||||
},
|
||||
/*.icon_color = */ ui::Color::orange().v,
|
||||
/*.menu_location = */ app_location_t::TX,
|
||||
|
||||
/*.m4_app_tag = portapack::spi_flash::image_tag_keyfob */ {'P', 'O', 'O', 'K'},
|
||||
/*.m4_app_offset = */ 0x00000000, // will be filled at compile time
|
||||
};
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
namespace ui::external_app::keyfob {
|
||||
|
||||
uint8_t KeyfobView::subaru_get_checksum() {
|
||||
uint8_t checksum = 0;
|
||||
@ -239,4 +239,4 @@ KeyfobView::KeyfobView(
|
||||
};
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
} /* namespace ui::external_app::keyfob */
|
@ -29,7 +29,7 @@
|
||||
|
||||
using namespace encoders;
|
||||
|
||||
namespace ui {
|
||||
namespace ui::external_app::keyfob {
|
||||
|
||||
class KeyfobView : public View {
|
||||
public:
|
||||
@ -126,4 +126,4 @@ class KeyfobView : public View {
|
||||
}};
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
} /* namespace ui::external_app::keyfob */
|
@ -48,7 +48,7 @@
|
||||
#include "ui_fsk_rx.hpp"
|
||||
#include "ui_iq_trim.hpp"
|
||||
// #include "ui_jammer.hpp" //moved to ext
|
||||
// #include "ui_keyfob.hpp"
|
||||
// #include "ui_keyfob.hpp" //moved to ext
|
||||
// #include "ui_lcr.hpp"
|
||||
#include "ui_level.hpp"
|
||||
#include "ui_looking_glass_app.hpp"
|
||||
@ -178,7 +178,6 @@ const NavigationView::AppList NavigationView::appList = {
|
||||
{"aprstx", "APRS TX", TX, ui::Color::green(), &bitmap_icon_aprs, new ViewFactory<APRSTXView>()},
|
||||
{"bht", "BHT Xy/EP", TX, ui::Color::green(), &bitmap_icon_bht, new ViewFactory<BHTView>()},
|
||||
{"bletx", "BLE Tx", TX, ui::Color::green(), &bitmap_icon_btle, new ViewFactory<BLETxView>()},
|
||||
//{"keyfob", "Key fob", TX, ui::Color::orange(), &bitmap_icon_keyfob, new ViewFactory<KeyfobView>()},
|
||||
{"morse", "Morse", TX, ui::Color::green(), &bitmap_icon_morse, new ViewFactory<MorseView>()},
|
||||
//{"nuoptixdtmf", "Nuoptix DTMF", TX, ui::Color::green(), &bitmap_icon_nuoptix, new ViewFactory<NuoptixView>()},
|
||||
{"ooktx", "OOK", TX, ui::Color::yellow(), &bitmap_icon_remote, new ViewFactory<EncodersView>()},
|
||||
|
Loading…
Reference in New Issue
Block a user