diff --git a/applications/main/subghz/scenes/subghz_scene_receiver_info.c b/applications/main/subghz/scenes/subghz_scene_receiver_info.c index 99765ee16..58e428785 100644 --- a/applications/main/subghz/scenes/subghz_scene_receiver_info.c +++ b/applications/main/subghz/scenes/subghz_scene_receiver_info.c @@ -115,6 +115,9 @@ void subghz_scene_receiver_info_draw_widget(SubGhz* subghz) { void subghz_scene_receiver_info_on_enter(void* context) { SubGhz* subghz = context; + keeloq_reset_original_btn(); + subghz_custom_btns_reset(); + subghz_scene_receiver_info_draw_widget(subghz); } diff --git a/applications/main/subghz/scenes/subghz_scene_transmitter.c b/applications/main/subghz/scenes/subghz_scene_transmitter.c index 4ee3854da..ab9155fb7 100644 --- a/applications/main/subghz/scenes/subghz_scene_transmitter.c +++ b/applications/main/subghz/scenes/subghz_scene_transmitter.c @@ -52,6 +52,10 @@ bool subghz_scene_transmitter_update_data_show(void* context) { void subghz_scene_transmitter_on_enter(void* context) { SubGhz* subghz = context; + + keeloq_reset_original_btn(); + subghz_custom_btns_reset(); + if(!subghz_scene_transmitter_update_data_show(subghz)) { view_dispatcher_send_custom_event( subghz->view_dispatcher, SubGhzCustomEventViewTransmitterError); diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index 6698f54fe..4900e7e49 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -393,7 +393,6 @@ static bool uint8_t custom_btn_id = subghz_custom_btn_get(); uint8_t original_btn_num = subghz_custom_btn_get_original(); - // Set custom button if(custom_btn_id == 1) { switch(original_btn_num) { @@ -499,11 +498,9 @@ static bool break; } } - if((custom_btn_id == 0) && (original_btn_num != 0)) { btn = original_btn_num; } - // Generate new key if(subghz_protocol_keeloq_gen_data(instance, btn, true)) {