mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 00:37:21 +00:00
[FL-2848] Universal Remote fix (#1770)
* Reset BruteForce on exit from Universal Remote * Reset current button in ButtonPanel
This commit is contained in:
parent
e70121e20f
commit
17d01f5c29
4 changed files with 8 additions and 0 deletions
|
@ -153,3 +153,7 @@ void infrared_brute_force_add_record(
|
|||
InfraredBruteForceRecordDict_set_at(brute_force->records, key, value);
|
||||
string_clear(key);
|
||||
}
|
||||
|
||||
void infrared_brute_force_reset(InfraredBruteForce* brute_force) {
|
||||
InfraredBruteForceRecordDict_reset(brute_force->records);
|
||||
}
|
||||
|
|
|
@ -20,3 +20,4 @@ void infrared_brute_force_add_record(
|
|||
InfraredBruteForce* brute_force,
|
||||
uint32_t index,
|
||||
const char* name);
|
||||
void infrared_brute_force_reset(InfraredBruteForce* brute_force);
|
||||
|
|
|
@ -87,5 +87,6 @@ void infrared_scene_universal_common_on_exit(void* context) {
|
|||
Infrared* infrared = context;
|
||||
ButtonPanel* button_panel = infrared->button_panel;
|
||||
view_stack_remove_view(infrared->view_stack, button_panel_get_view(button_panel));
|
||||
infrared_brute_force_reset(infrared->brute_force);
|
||||
button_panel_reset(button_panel);
|
||||
}
|
||||
|
|
|
@ -133,6 +133,8 @@ void button_panel_reset(ButtonPanel* button_panel) {
|
|||
}
|
||||
model->reserve_x = 0;
|
||||
model->reserve_y = 0;
|
||||
model->selected_item_x = 0;
|
||||
model->selected_item_y = 0;
|
||||
LabelList_reset(model->labels);
|
||||
ButtonMatrix_reset(model->button_matrix);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue