mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 16:29:12 +00:00
fix[infrared]: clear records on remote switch
This commit is contained in:
parent
9bd6d956ca
commit
885bb0c730
3 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,10 @@ InfraredBruteForce* infrared_brute_force_alloc() {
|
||||||
return brute_force;
|
return brute_force;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void infrared_brute_force_clear_records(InfraredBruteForce* brute_force) {
|
||||||
|
InfraredBruteForceRecordDict_reset(brute_force->records);
|
||||||
|
}
|
||||||
|
|
||||||
void infrared_brute_force_free(InfraredBruteForce* brute_force) {
|
void infrared_brute_force_free(InfraredBruteForce* brute_force) {
|
||||||
furi_assert(!brute_force->ff);
|
furi_assert(!brute_force->ff);
|
||||||
InfraredBruteForceRecordDict_clear(brute_force->records);
|
InfraredBruteForceRecordDict_clear(brute_force->records);
|
||||||
|
|
|
@ -16,6 +16,7 @@ bool infrared_brute_force_start(
|
||||||
bool infrared_brute_force_is_started(InfraredBruteForce* brute_force);
|
bool infrared_brute_force_is_started(InfraredBruteForce* brute_force);
|
||||||
void infrared_brute_force_stop(InfraredBruteForce* brute_force);
|
void infrared_brute_force_stop(InfraredBruteForce* brute_force);
|
||||||
bool infrared_brute_force_send_next(InfraredBruteForce* brute_force);
|
bool infrared_brute_force_send_next(InfraredBruteForce* brute_force);
|
||||||
|
void infrared_brute_force_clear_records(InfraredBruteForce* brute_force);
|
||||||
void infrared_brute_force_add_record(
|
void infrared_brute_force_add_record(
|
||||||
InfraredBruteForce* brute_force,
|
InfraredBruteForce* brute_force,
|
||||||
uint32_t index,
|
uint32_t index,
|
||||||
|
|
|
@ -33,6 +33,7 @@ static void infrared_scene_universal_common_hide_popup(Infrared* infrared) {
|
||||||
|
|
||||||
void infrared_scene_universal_common_on_enter(void* context) {
|
void infrared_scene_universal_common_on_enter(void* context) {
|
||||||
Infrared* infrared = context;
|
Infrared* infrared = context;
|
||||||
|
infrared_brute_force_clear_records(infrared->brute_force);
|
||||||
button_panel_reset_selection(infrared->button_panel);
|
button_panel_reset_selection(infrared->button_panel);
|
||||||
view_stack_add_view(infrared->view_stack, button_panel_get_view(infrared->button_panel));
|
view_stack_add_view(infrared->view_stack, button_panel_get_view(infrared->button_panel));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue