mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Subghz signal settings counter edit in progress.....
This commit is contained in:
@@ -52,6 +52,15 @@ void subghz_scene_signal_settings_counter_mode_changed(VariableItem * item) {
|
|||||||
counter_mode = counter_mode_value[index];
|
counter_mode = counter_mode_value[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void subghz_scene_signal_settings_variable_item_list_enter_callback(void* context, uint32_t index) {
|
||||||
|
UNUSED(context);
|
||||||
|
SubGhz* subghz = context;
|
||||||
|
|
||||||
|
if(index == 1) {
|
||||||
|
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void subghz_scene_signal_settings_on_enter(void* context) {
|
void subghz_scene_signal_settings_on_enter(void* context) {
|
||||||
// when we open saved file we do some check and fill up subghz->file_path. So now we use it to check is there CounterMode in file or not
|
// when we open saved file we do some check and fill up subghz->file_path. So now we use it to check is there CounterMode in file or not
|
||||||
SubGhz* subghz = context;
|
SubGhz* subghz = context;
|
||||||
@@ -99,7 +108,8 @@ void subghz_scene_signal_settings_on_enter(void* context) {
|
|||||||
VariableItemList* variable_item_list = subghz->variable_item_list;
|
VariableItemList* variable_item_list = subghz->variable_item_list;
|
||||||
int32_t value_index;
|
int32_t value_index;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
//int32_t available_count = COUNTER_MODE_COUNT;
|
|
||||||
|
variable_item_list_set_enter_callback (variable_item_list,subghz_scene_signal_settings_variable_item_list_enter_callback,subghz);
|
||||||
|
|
||||||
item = variable_item_list_add(
|
item = variable_item_list_add(
|
||||||
variable_item_list,
|
variable_item_list,
|
||||||
@@ -114,6 +124,14 @@ void subghz_scene_signal_settings_on_enter(void* context) {
|
|||||||
variable_item_set_locked(
|
variable_item_set_locked(
|
||||||
item, (counter_mode == 0xff), " Not available \n for this \nprotocol !");
|
item, (counter_mode == 0xff), " Not available \n for this \nprotocol !");
|
||||||
|
|
||||||
|
item = variable_item_list_add(
|
||||||
|
variable_item_list,
|
||||||
|
"Counter Value",
|
||||||
|
1,
|
||||||
|
NULL,
|
||||||
|
subghz);
|
||||||
|
variable_item_set_current_value_text(item, "FFFFFF");
|
||||||
|
|
||||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
|
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user