Merge branch 'console-request-race'

copilot/add-multi-platform-rf-scan-exports
erikkaashoek 2 weeks ago
commit 67a40bad54

@ -1,3 +1,6 @@
V1.4266 2026-10-29 For all tinySA models
- Fixed a console command sent right after "output", "modulation" or a touch (e.g. by a script) hanging in output mode until "Command timeout" after 20 s
V1.4263 2026-10-28 For all tinySA Ultra models
- PRESET > STORE > STORE 1-4 prefills the name keypad with the name of the active preset (the SD file it was loaded from, else the name it was stored under), so a single ENTER keeps it

@ -268,6 +268,9 @@ static THD_FUNCTION(Thread1, arg)
chSysLock();
local_func = shell_function;
shell_function = 0;
// The shell sets OP_CONSOLE together with shell_function, a request without a
// command (direct command, timed out command) has done its job: the sweep stopped
operation_requested &= ~OP_CONSOLE;
chSysUnlock();
if (local_func) {
@ -3255,7 +3258,9 @@ static void VNAShell_executeLine(char *line)
#else
if (dirty) {
#endif
operation_requested = true; // ensure output is updated
chSysLock();
operation_requested |= OP_CONSOLE; // ensure output is updated: stop the sweep, not a lever event
chSysUnlock();
if (MODE_OUTPUT(setting.mode))
draw_menu(); // update screen if in output mode and dirty
else

@ -755,7 +755,9 @@ void SI4432_Listen(int s)
uint16_t sel = SI_nSEL[SI4432_Sel];
uint8_t max = 0;
uint16_t count = 0;
operation_requested = OP_NONE;
chSysLock();
operation_requested &= ~(OP_LEVER|OP_TOUCH); // keep a console request, its command is waiting
chSysUnlock();
do {
uint8_t v;
palClearPad(GPIOC, sel);

@ -2132,7 +2132,9 @@ void SI4432_Listen(int s)
(void) s;
uint8_t max = 0;
uint16_t count = 0;
operation_requested = OP_NONE;
chSysLock();
operation_requested &= ~(OP_LEVER|OP_TOUCH); // keep a console request, its command is waiting
chSysUnlock();
// SI4463_WAIT_CTS; // Wait for CTS
do {
uint8_t v = Si446x_readRSSI();

10
ui.c

@ -8687,14 +8687,20 @@ ui_process(void)
selection = -1; // hide keyboard mode selection
ui_mode_menu();
}
// Clear only the handled request: the shell may have set OP_CONSOLE meanwhile for a
// waiting command, without it an output mode sweep never stops to run that command
if ((operation_requested&OP_LEVER) || previous_button_state != button_state) {
ui_process_lever();
previous_button_state = button_state;
operation_requested = OP_NONE;
chSysLock();
operation_requested &= ~OP_LEVER;
chSysUnlock();
}
if (operation_requested&OP_TOUCH) {
ui_process_touch();
operation_requested = OP_NONE;
chSysLock();
operation_requested &= ~OP_TOUCH;
chSysUnlock();
}
touch_start_watchdog();
}

Loading…
Cancel
Save

Powered by TurnKey Linux.