mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-28 02:45:45 +03:00
Merge pull request #273 from darmiel/feat/playlist
feat[infrared]: allow disabling automatic signal decoding
This commit is contained in:
commit
7f09f5f616
@ -3,6 +3,7 @@
|
||||
enum SubmenuIndex {
|
||||
SubmenuIndexUniversalRemotes,
|
||||
SubmenuIndexLearnNewRemote,
|
||||
SubmenuIndexLearnNewRemoteRaw,
|
||||
SubmenuIndexSavedRemotes,
|
||||
SubmenuIndexDebug
|
||||
};
|
||||
@ -37,6 +38,12 @@ void infrared_scene_start_on_enter(void* context) {
|
||||
infrared);
|
||||
|
||||
if(infrared->app_state.is_debug_enabled) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Learn New Remote RAW",
|
||||
SubmenuIndexLearnNewRemoteRaw,
|
||||
infrared_scene_start_submenu_callback,
|
||||
infrared);
|
||||
submenu_add_item(
|
||||
submenu, "Debug", SubmenuIndexDebug, infrared_scene_start_submenu_callback, infrared);
|
||||
}
|
||||
@ -61,7 +68,15 @@ bool infrared_scene_start_on_event(void* context, SceneManagerEvent event) {
|
||||
if(submenu_index == SubmenuIndexUniversalRemotes) {
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneUniversal);
|
||||
consumed = true;
|
||||
} else if(submenu_index == SubmenuIndexLearnNewRemote) {
|
||||
} else if(
|
||||
submenu_index == SubmenuIndexLearnNewRemote ||
|
||||
submenu_index == SubmenuIndexLearnNewRemoteRaw) {
|
||||
|
||||
// enable automatic signal decoding if "Learn New Remote"
|
||||
// disable automatic signal decoding if "Learn New Remote (RAW)"
|
||||
infrared_worker_rx_enable_signal_decoding(
|
||||
infrared->worker, submenu_index == SubmenuIndexLearnNewRemote);
|
||||
|
||||
infrared->app_state.is_learning_new_remote = true;
|
||||
scene_manager_next_scene(scene_manager, InfraredSceneLearn);
|
||||
consumed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user