change it back temporarily

This commit is contained in:
MX
2022-09-15 19:59:00 +03:00
parent 5bbb13c5c9
commit 72de4af6db
2 changed files with 12 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ typedef enum {
SubGhzLoadKeyStateUnknown,
SubGhzLoadKeyStateOK,
SubGhzLoadKeyStateParseErr,
SubGhzLoadKeyStateOnlyRx,
} SubGhzLoadKeyState;
/** SubGhzLock */

View File

@@ -274,6 +274,11 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog) {
break;
}
if(!furi_hal_subghz_is_tx_allowed(temp_data32)) {
FURI_LOG_E(TAG, "This frequency can only be used for RX");
load_key_state = SubGhzLoadKeyStateOnlyRx;
break;
}
subghz->txrx->preset->frequency = temp_data32;
if(!flipper_format_read_string(fff_data_file, "Preset", temp_str)) {
@@ -345,6 +350,12 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog) {
}
return false;
case SubGhzLoadKeyStateOnlyRx:
if(show_dialog) {
subghz_dialog_message_show_only_rx(subghz);
}
return false;
case SubGhzLoadKeyStateOK:
return true;