for app jammer failure fix (#3303)

* for app jammer failure
* copy hup warning code from hopper to jammer
* remove my PR RECORD FILE
* copy hup warning code from hopper to jammer
This commit is contained in:
qwer123
2026-09-02 20:42:57 +08:00
committed by GitHub
parent ca9ca93fa2
commit 31b25a445b
2 changed files with 28 additions and 7 deletions
+8 -5
View File
@@ -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();
}
}
+20 -2
View File
@@ -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();
}
}
};
}