[FL-2735] IR green LED fix (#1591)

* Fix incorrect LED behaviour
* Turn green LED off before blinking
This commit is contained in:
Georgii Surkov 2022-08-12 17:40:26 +03:00 committed by GitHub
parent 1655366ef4
commit 9e452d2b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,11 +86,11 @@ bool infrared_scene_learn_success_on_event(void* context, SceneManagerEvent even
} }
consumed = true; consumed = true;
} else if(event.event == DialogExPressCenter) { } else if(event.event == DialogExPressCenter) {
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
infrared_tx_start_received(infrared); infrared_tx_start_received(infrared);
consumed = true; consumed = true;
} else if(event.event == DialogExReleaseCenter) { } else if(event.event == DialogExReleaseCenter) {
infrared_tx_stop(infrared); infrared_tx_stop(infrared);
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
consumed = true; consumed = true;
} }
} }
@ -101,4 +101,5 @@ bool infrared_scene_learn_success_on_event(void* context, SceneManagerEvent even
void infrared_scene_learn_success_on_exit(void* context) { void infrared_scene_learn_success_on_exit(void* context) {
Infrared* infrared = context; Infrared* infrared = context;
dialog_ex_reset(infrared->dialog_ex); dialog_ex_reset(infrared->dialog_ex);
infrared_play_notification_message(infrared, InfraredNotificationMessageGreenOff);
} }