mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-21 04:01:19 -05:00
renaming Ook to OOK (#2379)
This commit is contained in:
parent
07cae4a298
commit
fc08d4ead9
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
namespace ui::external_app::ookbrute {
|
namespace ui::external_app::ookbrute {
|
||||||
void initialize_app(ui::NavigationView& nav) {
|
void initialize_app(ui::NavigationView& nav) {
|
||||||
nav.push<OokBruteView>();
|
nav.push<OOKBruteView>();
|
||||||
}
|
}
|
||||||
} // namespace ui::external_app::ookbrute
|
} // namespace ui::external_app::ookbrute
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ __attribute__((section(".external_app.app_ookbrute.application_information"), us
|
|||||||
/*.header_version = */ CURRENT_HEADER_VERSION,
|
/*.header_version = */ CURRENT_HEADER_VERSION,
|
||||||
/*.app_version = */ VERSION_MD5,
|
/*.app_version = */ VERSION_MD5,
|
||||||
|
|
||||||
/*.app_name = */ "OokBrute",
|
/*.app_name = */ "OOKBrute",
|
||||||
/*.bitmap_data = */ {
|
/*.bitmap_data = */ {
|
||||||
0x20,
|
0x20,
|
||||||
0x00,
|
0x00,
|
||||||
|
@ -31,11 +31,11 @@ using namespace ui;
|
|||||||
|
|
||||||
namespace ui::external_app::ookbrute {
|
namespace ui::external_app::ookbrute {
|
||||||
|
|
||||||
void OokBruteView::focus() {
|
void OOKBruteView::focus() {
|
||||||
button_startstop.focus();
|
button_startstop.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
OokBruteView::OokBruteView(NavigationView& nav)
|
OOKBruteView::OOKBruteView(NavigationView& nav)
|
||||||
: nav_{nav} {
|
: nav_{nav} {
|
||||||
add_children({
|
add_children({
|
||||||
&button_startstop,
|
&button_startstop,
|
||||||
@ -69,7 +69,7 @@ OokBruteView::OokBruteView(NavigationView& nav)
|
|||||||
update_start_stop(0);
|
update_start_stop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::update_start_stop(uint32_t proto) {
|
void OOKBruteView::update_start_stop(uint32_t proto) {
|
||||||
uint8_t bits = 12;
|
uint8_t bits = 12;
|
||||||
switch (proto) {
|
switch (proto) {
|
||||||
default:
|
default:
|
||||||
@ -91,7 +91,7 @@ void OokBruteView::update_start_stop(uint32_t proto) {
|
|||||||
field_stop.set_value(max);
|
field_stop.set_value(max);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::validate_start_stop() {
|
void OOKBruteView::validate_start_stop() {
|
||||||
if (field_start.value() > field_stop.value()) {
|
if (field_start.value() > field_stop.value()) {
|
||||||
field_start.set_value(field_stop.value());
|
field_start.set_value(field_stop.value());
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ void OokBruteView::validate_start_stop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::generate_packet() {
|
void OOKBruteView::generate_packet() {
|
||||||
uint32_t protocol = options_atkmode.selected_index_value();
|
uint32_t protocol = options_atkmode.selected_index_value();
|
||||||
uint8_t byte = 0;
|
uint8_t byte = 0;
|
||||||
size_t bitstream_length = 0;
|
size_t bitstream_length = 0;
|
||||||
@ -210,13 +210,13 @@ void OokBruteView::generate_packet() {
|
|||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::stop() {
|
void OOKBruteView::stop() {
|
||||||
transmitter_model.disable();
|
transmitter_model.disable();
|
||||||
baseband::shutdown();
|
baseband::shutdown();
|
||||||
button_startstop.set_text(LanguageHelper::currentMessages[LANG_START]);
|
button_startstop.set_text(LanguageHelper::currentMessages[LANG_START]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::start() {
|
void OOKBruteView::start() {
|
||||||
counter = field_start.value();
|
counter = field_start.value();
|
||||||
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
|
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
|
||||||
transmitter_model.enable();
|
transmitter_model.enable();
|
||||||
@ -224,7 +224,7 @@ void OokBruteView::start() {
|
|||||||
generate_packet();
|
generate_packet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OokBruteView::on_tx_progress(const bool done) {
|
void OOKBruteView::on_tx_progress(const bool done) {
|
||||||
if (done) {
|
if (done) {
|
||||||
if (is_running) {
|
if (is_running) {
|
||||||
counter++;
|
counter++;
|
||||||
@ -238,7 +238,7 @@ void OokBruteView::on_tx_progress(const bool done) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OokBruteView::~OokBruteView() {
|
OOKBruteView::~OOKBruteView() {
|
||||||
is_running = false;
|
is_running = false;
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
@ -24,15 +24,15 @@ namespace ui::external_app::ookbrute {
|
|||||||
|
|
||||||
#define OOK_SAMPLERATE 2280000U
|
#define OOK_SAMPLERATE 2280000U
|
||||||
|
|
||||||
class OokBruteView : public View {
|
class OOKBruteView : public View {
|
||||||
public:
|
public:
|
||||||
OokBruteView(NavigationView& nav);
|
OOKBruteView(NavigationView& nav);
|
||||||
~OokBruteView();
|
~OOKBruteView();
|
||||||
|
|
||||||
void focus() override;
|
void focus() override;
|
||||||
|
|
||||||
std::string title() const override {
|
std::string title() const override {
|
||||||
return "OokBrute";
|
return "OOKBrute";
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user