mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-16 13:42:16 -04:00
Added frequency manager skeleton, LCR alt encoding, GPS jammer
This commit is contained in:
parent
e15f659a6a
commit
966a758a0b
31 changed files with 485 additions and 110 deletions
80
firmware/application/ui_freqman.cpp
Normal file
80
firmware/application/ui_freqman.cpp
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* 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_freqman.hpp"
|
||||
|
||||
#include "ch.h"
|
||||
|
||||
#include "ff.h"
|
||||
#include "portapack.hpp"
|
||||
#include "event_m0.hpp"
|
||||
#include "hackrf_hal.hpp"
|
||||
#include "portapack_shared_memory.hpp"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
void FreqManView::paint(Painter& painter) {
|
||||
(void)painter;
|
||||
}
|
||||
|
||||
FreqManView::FreqManView(
|
||||
NavigationView& nav
|
||||
) {
|
||||
|
||||
add_children({ {
|
||||
&button_ok
|
||||
} });
|
||||
|
||||
size_t n = 0;
|
||||
for(auto& text : text_list) {
|
||||
add_child(&text);
|
||||
text.set_parent_rect({
|
||||
static_cast<Coord>(0),
|
||||
static_cast<Coord>(16 + (n * 16)),
|
||||
240, 16
|
||||
});
|
||||
const std::string label {
|
||||
(char)(n + 0x30)
|
||||
};
|
||||
text.set(label);
|
||||
n++;
|
||||
}
|
||||
|
||||
button_ok.on_select = [this, &nav](Button&) {
|
||||
nav.pop();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
void FreqManView::on_show() {
|
||||
|
||||
}
|
||||
|
||||
void FreqManView::on_hide() {
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue