Skip to content
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
13 changes: 8 additions & 5 deletions firmware/application/external/hopper/ui_hopper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,19 +330,22 @@ HopperView::HopperView(
if (jamming || cooling) {
stop_tx();
} else {
// if hop speed is 0, alert the user that this will cause a freeze on UI
if (options_hop.selected_index_value() == 0) {
if (options_hop.selected_index_value() < 50) {
nav_.display_modal(
"Warning", "Hopping set to 0ms (fastest).\n\nTHIS WILL FREEZE THE HACKRF,\npress RESET button to stop\n\nAre you sure?", YESNO, [this](bool choice) {
"Warning",
"Hopping interval is\nbelow 50ms.\n\n"
"THIS WILL FREEZE\nTHE HACKRF.\n"
"Press RESET button\nto stop.\n\n"
"Are you sure?",
YESNO,
[this](bool choice) {
if (choice) {
// Wait for UI update before the freeze
chThdSleepMilliseconds(50);
start_tx();
}
},
TRUE);
} else {
// if hop speed is not 0, just start the transmission
start_tx();
}
}
Expand Down
22 changes: 20 additions & 2 deletions firmware/application/external/jammer/ui_jammer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,26 @@ JammerView::JammerView(NavigationView& nav)
button_transmit.on_select = [this](Button&) {
if (jamming || cooling)
stop_tx();
else
start_tx();
else {
if (options_hop.selected_index_value() * 10 < 50) {
nav_.display_modal(
"Warning",
"Hopping interval is\nbelow 50ms.\n\n"
"THIS WILL FREEZE\nTHE HACKRF.\n"
"Press RESET button\nto stop.\n\n"
"Are you sure?",
YESNO,
[this](bool choice) {
if (choice) {
chThdSleepMilliseconds(50);
start_tx();
}
},
TRUE);
} else {
start_tx();
}
}
};
}

Expand Down
Loading