Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming Ook to OOK #2379

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firmware/application/external/ookbrute/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace ui::external_app::ookbrute {
void initialize_app(ui::NavigationView& nav) {
nav.push<OokBruteView>();
nav.push<OOKBruteView>();
}
} // namespace ui::external_app::ookbrute

Expand All @@ -38,7 +38,7 @@ __attribute__((section(".external_app.app_ookbrute.application_information"), us
/*.header_version = */ CURRENT_HEADER_VERSION,
/*.app_version = */ VERSION_MD5,

/*.app_name = */ "OokBrute",
/*.app_name = */ "OOKBrute",
/*.bitmap_data = */ {
0x20,
0x00,
Expand Down
20 changes: 10 additions & 10 deletions firmware/application/external/ookbrute/ui_ookbrute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ using namespace ui;

namespace ui::external_app::ookbrute {

void OokBruteView::focus() {
void OOKBruteView::focus() {
button_startstop.focus();
}

OokBruteView::OokBruteView(NavigationView& nav)
OOKBruteView::OOKBruteView(NavigationView& nav)
: nav_{nav} {
add_children({
&button_startstop,
Expand Down Expand Up @@ -69,7 +69,7 @@ OokBruteView::OokBruteView(NavigationView& nav)
update_start_stop(0);
}

void OokBruteView::update_start_stop(uint32_t proto) {
void OOKBruteView::update_start_stop(uint32_t proto) {
uint8_t bits = 12;
switch (proto) {
default:
Expand All @@ -91,7 +91,7 @@ void OokBruteView::update_start_stop(uint32_t proto) {
field_stop.set_value(max);
}

void OokBruteView::validate_start_stop() {
void OOKBruteView::validate_start_stop() {
if (field_start.value() > field_stop.value()) {
field_start.set_value(field_stop.value());
}
Expand All @@ -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();
uint8_t byte = 0;
size_t bitstream_length = 0;
Expand Down Expand Up @@ -210,21 +210,21 @@ void OokBruteView::generate_packet() {
0);
}

void OokBruteView::stop() {
void OOKBruteView::stop() {
transmitter_model.disable();
baseband::shutdown();
button_startstop.set_text(LanguageHelper::currentMessages[LANG_START]);
}

void OokBruteView::start() {
void OOKBruteView::start() {
counter = field_start.value();
baseband::run_prepared_image(portapack::memory::map::m4_code.base());
transmitter_model.enable();
button_startstop.set_text(LanguageHelper::currentMessages[LANG_STOP]);
generate_packet();
}

void OokBruteView::on_tx_progress(const bool done) {
void OOKBruteView::on_tx_progress(const bool done) {
if (done) {
if (is_running) {
counter++;
Expand All @@ -238,7 +238,7 @@ void OokBruteView::on_tx_progress(const bool done) {
}
}

OokBruteView::~OokBruteView() {
OOKBruteView::~OOKBruteView() {
is_running = false;
stop();
}
Expand All @@ -250,4 +250,4 @@ OokBruteView::~OokBruteView() {
https://web.archive.org/web/20230331125843/https://phreakerclub.com/447


*/
*/
8 changes: 4 additions & 4 deletions firmware/application/external/ookbrute/ui_ookbrute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ namespace ui::external_app::ookbrute {

#define OOK_SAMPLERATE 2280000U

class OokBruteView : public View {
class OOKBruteView : public View {
public:
OokBruteView(NavigationView& nav);
~OokBruteView();
OOKBruteView(NavigationView& nav);
~OOKBruteView();

void focus() override;

std::string title() const override {
return "OokBrute";
return "OOKBrute";
};

private:
Expand Down
Loading