CLI: Fix missing cleanup for subghz chat on region restricted

frequencies
This commit is contained in:
WillyJL
2025-12-31 23:04:48 +01:00
parent 95401473f8
commit 42630e9130
2 changed files with 8 additions and 7 deletions
+1
View File
@@ -192,6 +192,7 @@
- Fix slashes in prefilled filename (by @WillyJL)
- Handle PPS request in ISO14443-4 layer (by @WillyJL)
- FBT: Fix redundant decl for apps using an icon disabled in API (by @WillyJL)
- CLI: Fix missing cleanup for subghz chat on region restricted frequencies (by @WillyJL)
- UL: Sub-GHz: Fix crash in add manually menu (by @xMasterX)
- Clangd: Add clangd parameters in IDE agnostic config file (by @WillyJL)
- OFW: GUI: Fix Number Input Save Icon (by @zinongli)
+7 -7
View File
@@ -941,6 +941,13 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) {
return;
}
}
if(!furi_hal_region_is_frequency_allowed(frequency)) {
printf(
"In your settings/region, only reception on this frequency (%lu) is allowed,\r\n"
"the actual operation of the application is not possible\r\n ",
frequency);
return;
}
subghz_devices_init();
const SubGhzDevice* device = subghz_cli_command_get_device(&device_ind);
if(!subghz_devices_is_frequency_valid(device, frequency)) {
@@ -950,13 +957,6 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) {
subghz_cli_radio_device_power_off();
return;
}
if(!furi_hal_region_is_frequency_allowed(frequency)) {
printf(
"In your settings/region, only reception on this frequency (%lu) is allowed,\r\n"
"the actual operation of the application is not possible\r\n ",
frequency);
return;
}
SubGhzChatWorker* subghz_chat = subghz_chat_worker_alloc(pipe);