[FL-2700] Fix IR hangup with short signals (#1535)

* Do not use infrared worker callback for notifications
* Remove tx callback
* Port Infrared notifications to hardware blinker
* Move all blink message definitions to notification_messages.h
* Fix potential hangup after leaving debug scene
This commit is contained in:
Georgii Surkov
2022-08-04 15:11:01 +03:00
committed by GitHub
parent 4460010e76
commit 8a370d70dc
15 changed files with 81 additions and 94 deletions

View File

@@ -33,8 +33,6 @@ void infrared_scene_remote_on_enter(void* context) {
infrared_worker_tx_set_get_signal_callback(
infrared->worker, infrared_worker_tx_get_signal_steady_callback, infrared);
infrared_worker_tx_set_signal_sent_callback(
infrared->worker, infrared_signal_sent_callback, infrared);
size_t button_count = infrared_remote_get_button_count(remote);
for(size_t i = 0; i < button_count; ++i) {
@@ -112,7 +110,7 @@ bool infrared_scene_remote_on_event(void* context, SceneManagerEvent event) {
void infrared_scene_remote_on_exit(void* context) {
Infrared* infrared = context;
infrared_tx_stop(infrared);
infrared_worker_tx_set_get_signal_callback(infrared->worker, NULL, NULL);
infrared_worker_tx_set_signal_sent_callback(infrared->worker, NULL, NULL);
button_menu_reset(infrared->button_menu);
}