mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
CLI: Fix missing cleanup for subghz chat on region restricted
frequencies
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user