2021-09-10 03:29:57 +03:00
|
|
|
#include "../subghz_i.h"
|
2022-10-26 18:13:00 +03:00
|
|
|
#include <lib/toolbox/value_index.h>
|
2021-09-10 03:29:57 +03:00
|
|
|
|
2022-07-03 19:03:36 +03:00
|
|
|
enum SubGhzSettingIndex {
|
|
|
|
SubGhzSettingIndexFrequency,
|
|
|
|
SubGhzSettingIndexHopping,
|
|
|
|
SubGhzSettingIndexModulation,
|
2023-02-09 07:48:06 +03:00
|
|
|
SubGhzSettingIndexBinRAW,
|
2022-12-17 01:20:10 +03:00
|
|
|
SubGhzSettingIndexSound,
|
2022-07-03 19:03:36 +03:00
|
|
|
SubGhzSettingIndexLock,
|
2022-10-26 18:13:00 +03:00
|
|
|
SubGhzSettingIndexRAWThesholdRSSI,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define RAW_THRESHOLD_RSSI_COUNT 11
|
|
|
|
const char* const raw_theshold_rssi_text[RAW_THRESHOLD_RSSI_COUNT] = {
|
|
|
|
"-----",
|
|
|
|
"-85.0",
|
|
|
|
"-80.0",
|
|
|
|
"-75.0",
|
|
|
|
"-70.0",
|
|
|
|
"-65.0",
|
|
|
|
"-60.0",
|
|
|
|
"-55.0",
|
|
|
|
"-50.0",
|
|
|
|
"-45.0",
|
|
|
|
"-40.0",
|
|
|
|
|
|
|
|
};
|
|
|
|
const float raw_theshold_rssi_value[RAW_THRESHOLD_RSSI_COUNT] = {
|
|
|
|
-90.0f,
|
|
|
|
-85.0f,
|
|
|
|
-80.0f,
|
|
|
|
-75.0f,
|
|
|
|
-70.0f,
|
|
|
|
-65.0f,
|
|
|
|
-60.0f,
|
|
|
|
-55.0f,
|
|
|
|
-50.0f,
|
|
|
|
-45.0f,
|
|
|
|
-40.0f,
|
2022-07-03 19:03:36 +03:00
|
|
|
};
|
|
|
|
|
2021-09-10 03:29:57 +03:00
|
|
|
#define HOPPING_COUNT 2
|
|
|
|
const char* const hopping_text[HOPPING_COUNT] = {
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
};
|
|
|
|
const uint32_t hopping_value[HOPPING_COUNT] = {
|
|
|
|
SubGhzHopperStateOFF,
|
|
|
|
SubGhzHopperStateRunnig,
|
|
|
|
};
|
|
|
|
|
2022-12-17 01:20:10 +03:00
|
|
|
#define SPEAKER_COUNT 2
|
|
|
|
const char* const speaker_text[SPEAKER_COUNT] = {
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
};
|
|
|
|
const uint32_t speaker_value[SPEAKER_COUNT] = {
|
|
|
|
SubGhzSpeakerStateShutdown,
|
|
|
|
SubGhzSpeakerStateEnable,
|
|
|
|
};
|
2023-02-09 07:48:06 +03:00
|
|
|
#define BIN_RAW_COUNT 2
|
|
|
|
const char* const bin_raw_text[BIN_RAW_COUNT] = {
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
};
|
|
|
|
const uint32_t bin_raw_value[BIN_RAW_COUNT] = {
|
|
|
|
SubGhzProtocolFlag_Decodable,
|
|
|
|
SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_BinRAW,
|
|
|
|
};
|
2022-12-17 01:20:10 +03:00
|
|
|
|
2022-07-26 17:16:59 +03:00
|
|
|
uint8_t subghz_scene_receiver_config_next_frequency(const uint32_t value, void* context) {
|
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
|
|
|
|
2021-09-10 03:29:57 +03:00
|
|
|
uint8_t index = 0;
|
2023-05-04 06:04:26 +03:00
|
|
|
for(uint8_t i = 0; i < subghz_setting_get_frequency_count(setting); i++) {
|
|
|
|
if(value == subghz_setting_get_frequency(setting, i)) {
|
2021-09-10 03:29:57 +03:00
|
|
|
index = i;
|
|
|
|
break;
|
2022-07-26 17:16:59 +03:00
|
|
|
} else {
|
2023-05-04 06:04:26 +03:00
|
|
|
index = subghz_setting_get_frequency_default_index(setting);
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return index;
|
|
|
|
}
|
|
|
|
|
2022-07-26 17:16:59 +03:00
|
|
|
uint8_t subghz_scene_receiver_config_next_preset(const char* preset_name, void* context) {
|
2022-04-14 17:05:40 +03:00
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
|
|
|
|
2022-04-14 17:05:40 +03:00
|
|
|
uint8_t index = 0;
|
2023-05-04 06:04:26 +03:00
|
|
|
for(uint8_t i = 0; i < subghz_setting_get_preset_count(setting); i++) {
|
|
|
|
if(!strcmp(subghz_setting_get_preset_name(setting, i), preset_name)) {
|
2022-04-14 17:05:40 +03:00
|
|
|
index = i;
|
|
|
|
break;
|
2022-06-09 10:39:12 +03:00
|
|
|
} else {
|
2023-05-04 06:04:26 +03:00
|
|
|
// index = subghz_setting_get_frequency_default_index(subghz_txrx_get_setting(subghz->txrx));
|
2022-04-14 17:05:40 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return index;
|
|
|
|
}
|
|
|
|
|
2021-09-10 03:29:57 +03:00
|
|
|
uint8_t subghz_scene_receiver_config_hopper_value_index(
|
|
|
|
const uint32_t value,
|
|
|
|
const uint32_t values[],
|
|
|
|
uint8_t values_count,
|
|
|
|
void* context) {
|
|
|
|
furi_assert(context);
|
2022-05-06 16:37:10 +03:00
|
|
|
UNUSED(values_count);
|
2021-09-10 03:29:57 +03:00
|
|
|
SubGhz* subghz = context;
|
|
|
|
|
|
|
|
if(value == values[0]) {
|
|
|
|
return 0;
|
|
|
|
} else {
|
|
|
|
variable_item_set_current_value_text(
|
|
|
|
(VariableItem*)scene_manager_get_scene_state(
|
|
|
|
subghz->scene_manager, SubGhzSceneReceiverConfig),
|
|
|
|
" -----");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void subghz_scene_receiver_config_set_frequency(VariableItem* item) {
|
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
2021-09-10 03:29:57 +03:00
|
|
|
|
2023-05-04 06:04:26 +03:00
|
|
|
if(subghz_txrx_hopper_get_state(subghz->txrx) == SubGhzHopperStateOFF) {
|
2022-04-14 17:05:40 +03:00
|
|
|
char text_buf[10] = {0};
|
2023-05-04 06:04:26 +03:00
|
|
|
uint32_t frequency = subghz_setting_get_frequency(setting, index);
|
|
|
|
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
|
|
|
|
2022-08-03 19:00:17 +03:00
|
|
|
snprintf(
|
2022-04-14 17:05:40 +03:00
|
|
|
text_buf,
|
2022-08-03 19:00:17 +03:00
|
|
|
sizeof(text_buf),
|
2022-04-14 17:05:40 +03:00
|
|
|
"%lu.%02lu",
|
2023-05-04 06:04:26 +03:00
|
|
|
frequency / 1000000,
|
|
|
|
(frequency % 1000000) / 10000);
|
2022-04-14 17:05:40 +03:00
|
|
|
variable_item_set_current_value_text(item, text_buf);
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_txrx_set_preset(
|
|
|
|
subghz->txrx,
|
|
|
|
furi_string_get_cstr(preset.name),
|
|
|
|
frequency,
|
|
|
|
preset.data,
|
|
|
|
preset.data_size);
|
2021-10-25 17:37:14 +03:00
|
|
|
} else {
|
2022-04-14 17:05:40 +03:00
|
|
|
variable_item_set_current_value_index(
|
2023-05-04 06:04:26 +03:00
|
|
|
item, subghz_setting_get_frequency_default_index(setting));
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void subghz_scene_receiver_config_set_preset(VariableItem* item) {
|
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
|
|
|
|
|
|
|
variable_item_set_current_value_text(item, subghz_setting_get_preset_name(setting, index));
|
|
|
|
|
|
|
|
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
|
|
|
subghz_txrx_set_preset(
|
|
|
|
subghz->txrx,
|
|
|
|
subghz_setting_get_preset_name(setting, index),
|
|
|
|
preset.frequency,
|
|
|
|
subghz_setting_get_preset_data(setting, index),
|
|
|
|
subghz_setting_get_preset_data_size(setting, index));
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
|
2022-08-17 19:40:09 +03:00
|
|
|
static void subghz_scene_receiver_config_set_hopping_running(VariableItem* item) {
|
2021-09-10 03:29:57 +03:00
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
|
|
|
VariableItem* frequency_item = (VariableItem*)scene_manager_get_scene_state(
|
|
|
|
subghz->scene_manager, SubGhzSceneReceiverConfig);
|
2021-09-10 03:29:57 +03:00
|
|
|
|
|
|
|
variable_item_set_current_value_text(item, hopping_text[index]);
|
|
|
|
if(hopping_value[index] == SubGhzHopperStateOFF) {
|
2022-04-14 17:05:40 +03:00
|
|
|
char text_buf[10] = {0};
|
2023-05-04 06:04:26 +03:00
|
|
|
uint32_t frequency = subghz_setting_get_default_frequency(setting);
|
|
|
|
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
|
|
|
|
2022-08-03 19:00:17 +03:00
|
|
|
snprintf(
|
2022-04-14 17:05:40 +03:00
|
|
|
text_buf,
|
2022-08-03 19:00:17 +03:00
|
|
|
sizeof(text_buf),
|
2022-04-14 17:05:40 +03:00
|
|
|
"%lu.%02lu",
|
2023-05-04 06:04:26 +03:00
|
|
|
frequency / 1000000,
|
|
|
|
(frequency % 1000000) / 10000);
|
|
|
|
variable_item_set_current_value_text(frequency_item, text_buf);
|
|
|
|
|
|
|
|
subghz_txrx_set_preset(
|
|
|
|
subghz->txrx,
|
|
|
|
furi_string_get_cstr(preset.name),
|
|
|
|
frequency,
|
|
|
|
preset.data,
|
|
|
|
preset.data_size);
|
2021-10-25 17:37:14 +03:00
|
|
|
variable_item_set_current_value_index(
|
2023-05-04 06:04:26 +03:00
|
|
|
frequency_item, subghz_setting_get_frequency_default_index(setting));
|
2021-09-10 03:29:57 +03:00
|
|
|
} else {
|
2023-05-04 06:04:26 +03:00
|
|
|
variable_item_set_current_value_text(frequency_item, " -----");
|
2021-10-25 17:37:14 +03:00
|
|
|
variable_item_set_current_value_index(
|
2023-05-04 06:04:26 +03:00
|
|
|
frequency_item, subghz_setting_get_frequency_default_index(setting));
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_txrx_hopper_set_state(subghz->txrx, hopping_value[index]);
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
|
2022-12-17 01:20:10 +03:00
|
|
|
static void subghz_scene_receiver_config_set_speaker(VariableItem* item) {
|
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
|
variable_item_set_current_value_text(item, speaker_text[index]);
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_txrx_speaker_set_state(subghz->txrx, speaker_value[index]);
|
2022-12-17 01:20:10 +03:00
|
|
|
}
|
|
|
|
|
2023-02-09 07:48:06 +03:00
|
|
|
static void subghz_scene_receiver_config_set_bin_raw(VariableItem* item) {
|
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
|
variable_item_set_current_value_text(item, bin_raw_text[index]);
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz->filter = bin_raw_value[index];
|
|
|
|
subghz_txrx_receiver_set_filter(subghz->txrx, subghz->filter);
|
2023-02-09 07:48:06 +03:00
|
|
|
}
|
|
|
|
|
2022-10-26 18:13:00 +03:00
|
|
|
static void subghz_scene_receiver_config_set_raw_threshold_rssi(VariableItem* item) {
|
|
|
|
SubGhz* subghz = variable_item_get_context(item);
|
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
|
variable_item_set_current_value_text(item, raw_theshold_rssi_text[index]);
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_threshold_rssi_set(subghz->threshold_rssi, raw_theshold_rssi_value[index]);
|
2022-10-26 18:13:00 +03:00
|
|
|
}
|
|
|
|
|
2022-07-03 19:03:36 +03:00
|
|
|
static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
|
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
|
|
|
if(index == SubGhzSettingIndexLock) {
|
|
|
|
view_dispatcher_send_custom_event(
|
|
|
|
subghz->view_dispatcher, SubGhzCustomEventSceneSettingLock);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-21 12:34:16 +03:00
|
|
|
void subghz_scene_receiver_config_on_enter(void* context) {
|
2021-09-10 03:29:57 +03:00
|
|
|
SubGhz* subghz = context;
|
|
|
|
VariableItem* item;
|
|
|
|
uint8_t value_index;
|
2023-05-04 06:04:26 +03:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
|
|
|
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
2021-09-10 03:29:57 +03:00
|
|
|
|
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"Frequency:",
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_setting_get_frequency_count(setting),
|
2021-09-10 03:29:57 +03:00
|
|
|
subghz_scene_receiver_config_set_frequency,
|
|
|
|
subghz);
|
2023-05-04 06:04:26 +03:00
|
|
|
value_index = subghz_scene_receiver_config_next_frequency(preset.frequency, subghz);
|
2021-09-10 03:29:57 +03:00
|
|
|
scene_manager_set_scene_state(
|
|
|
|
subghz->scene_manager, SubGhzSceneReceiverConfig, (uint32_t)item);
|
|
|
|
variable_item_set_current_value_index(item, value_index);
|
2022-04-14 17:05:40 +03:00
|
|
|
char text_buf[10] = {0};
|
2023-05-04 06:04:26 +03:00
|
|
|
uint32_t frequency = subghz_setting_get_frequency(setting, value_index);
|
2022-08-03 19:00:17 +03:00
|
|
|
snprintf(
|
2022-04-14 17:05:40 +03:00
|
|
|
text_buf,
|
2022-08-03 19:00:17 +03:00
|
|
|
sizeof(text_buf),
|
2022-04-14 17:05:40 +03:00
|
|
|
"%lu.%02lu",
|
2023-05-04 06:04:26 +03:00
|
|
|
frequency / 1000000,
|
|
|
|
(frequency % 1000000) / 10000);
|
2022-04-14 17:05:40 +03:00
|
|
|
variable_item_set_current_value_text(item, text_buf);
|
2021-09-10 03:29:57 +03:00
|
|
|
|
2021-10-27 20:37:11 +03:00
|
|
|
if(scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) !=
|
2022-03-03 12:48:56 +03:00
|
|
|
SubGhzCustomEventManagerSet) {
|
2021-10-25 17:37:14 +03:00
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"Hopping:",
|
|
|
|
HOPPING_COUNT,
|
2022-08-17 19:40:09 +03:00
|
|
|
subghz_scene_receiver_config_set_hopping_running,
|
2021-10-25 17:37:14 +03:00
|
|
|
subghz);
|
|
|
|
value_index = subghz_scene_receiver_config_hopper_value_index(
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_txrx_hopper_get_state(subghz->txrx), hopping_value, HOPPING_COUNT, subghz);
|
2021-10-25 17:37:14 +03:00
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
|
|
variable_item_set_current_value_text(item, hopping_text[value_index]);
|
|
|
|
}
|
2021-09-10 03:29:57 +03:00
|
|
|
|
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"Modulation:",
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_setting_get_preset_count(setting),
|
2021-09-10 03:29:57 +03:00
|
|
|
subghz_scene_receiver_config_set_preset,
|
|
|
|
subghz);
|
2023-05-04 06:04:26 +03:00
|
|
|
value_index =
|
|
|
|
subghz_scene_receiver_config_next_preset(furi_string_get_cstr(preset.name), subghz);
|
2021-09-10 03:29:57 +03:00
|
|
|
variable_item_set_current_value_index(item, value_index);
|
2022-07-26 17:16:59 +03:00
|
|
|
variable_item_set_current_value_text(
|
2023-05-04 06:04:26 +03:00
|
|
|
item, subghz_setting_get_preset_name(setting, value_index));
|
2021-09-10 03:29:57 +03:00
|
|
|
|
2023-02-09 07:48:06 +03:00
|
|
|
if(scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) !=
|
|
|
|
SubGhzCustomEventManagerSet) {
|
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"Bin_RAW:",
|
|
|
|
BIN_RAW_COUNT,
|
|
|
|
subghz_scene_receiver_config_set_bin_raw,
|
|
|
|
subghz);
|
2023-05-04 06:04:26 +03:00
|
|
|
value_index = value_index_uint32(subghz->filter, bin_raw_value, BIN_RAW_COUNT);
|
2023-02-09 07:48:06 +03:00
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
|
|
variable_item_set_current_value_text(item, bin_raw_text[value_index]);
|
|
|
|
}
|
|
|
|
|
2022-12-17 01:20:10 +03:00
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"Sound:",
|
|
|
|
SPEAKER_COUNT,
|
|
|
|
subghz_scene_receiver_config_set_speaker,
|
|
|
|
subghz);
|
2023-05-04 06:04:26 +03:00
|
|
|
value_index = value_index_uint32(
|
|
|
|
subghz_txrx_speaker_get_state(subghz->txrx), speaker_value, SPEAKER_COUNT);
|
2022-12-17 01:20:10 +03:00
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
|
|
variable_item_set_current_value_text(item, speaker_text[value_index]);
|
|
|
|
|
2022-07-03 19:03:36 +03:00
|
|
|
if(scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) !=
|
|
|
|
SubGhzCustomEventManagerSet) {
|
|
|
|
variable_item_list_add(subghz->variable_item_list, "Lock Keyboard", 1, NULL, NULL);
|
|
|
|
variable_item_list_set_enter_callback(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
subghz_scene_receiver_config_var_list_enter_callback,
|
|
|
|
subghz);
|
|
|
|
}
|
2022-10-26 18:13:00 +03:00
|
|
|
if(scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) ==
|
|
|
|
SubGhzCustomEventManagerSet) {
|
|
|
|
item = variable_item_list_add(
|
|
|
|
subghz->variable_item_list,
|
|
|
|
"RSSI Threshold:",
|
|
|
|
RAW_THRESHOLD_RSSI_COUNT,
|
|
|
|
subghz_scene_receiver_config_set_raw_threshold_rssi,
|
|
|
|
subghz);
|
|
|
|
value_index = value_index_float(
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_threshold_rssi_get(subghz->threshold_rssi),
|
|
|
|
raw_theshold_rssi_value,
|
|
|
|
RAW_THRESHOLD_RSSI_COUNT);
|
2022-10-26 18:13:00 +03:00
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
|
|
variable_item_set_current_value_text(item, raw_theshold_rssi_text[value_index]);
|
|
|
|
}
|
2022-03-03 12:48:56 +03:00
|
|
|
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
|
2021-09-21 12:34:16 +03:00
|
|
|
bool subghz_scene_receiver_config_on_event(void* context, SceneManagerEvent event) {
|
2022-07-03 19:03:36 +03:00
|
|
|
SubGhz* subghz = context;
|
|
|
|
bool consumed = false;
|
|
|
|
|
|
|
|
if(event.type == SceneManagerEventTypeCustom) {
|
|
|
|
if(event.event == SubGhzCustomEventSceneSettingLock) {
|
2023-05-04 06:04:26 +03:00
|
|
|
subghz_lock(subghz);
|
2022-07-03 19:03:36 +03:00
|
|
|
scene_manager_previous_scene(subghz->scene_manager);
|
|
|
|
consumed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return consumed;
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|
|
|
|
|
2021-09-21 12:34:16 +03:00
|
|
|
void subghz_scene_receiver_config_on_exit(void* context) {
|
2021-09-10 03:29:57 +03:00
|
|
|
SubGhz* subghz = context;
|
2022-09-25 17:34:52 +03:00
|
|
|
variable_item_list_set_selected_item(subghz->variable_item_list, 0);
|
2022-01-21 20:32:03 +03:00
|
|
|
variable_item_list_reset(subghz->variable_item_list);
|
2021-10-27 20:37:11 +03:00
|
|
|
scene_manager_set_scene_state(
|
2022-03-03 12:48:56 +03:00
|
|
|
subghz->scene_manager, SubGhzSceneReadRAW, SubGhzCustomEventManagerNoSet);
|
2021-09-10 03:29:57 +03:00
|
|
|
}
|