[FL-2998] IR TV Universal Remote refactor and docs (#2052)
* Rename signals for IR TV universal remote * Update UniversalRemotes.md Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		| @@ -24,7 +24,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Power_hvr_25x27, |         &I_Power_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "POWER"); |     infrared_brute_force_add_record(brute_force, i++, "Power"); | ||||||
|     button_panel_add_item( |     button_panel_add_item( | ||||||
|         button_panel, |         button_panel, | ||||||
|         i, |         i, | ||||||
| @@ -36,7 +36,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Mute_hvr_25x27, |         &I_Mute_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "MUTE"); |     infrared_brute_force_add_record(brute_force, i++, "Mute"); | ||||||
|     button_panel_add_item( |     button_panel_add_item( | ||||||
|         button_panel, |         button_panel, | ||||||
|         i, |         i, | ||||||
| @@ -48,7 +48,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Vol_up_hvr_25x27, |         &I_Vol_up_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "VOL+"); |     infrared_brute_force_add_record(brute_force, i++, "Vol_up"); | ||||||
|     button_panel_add_item( |     button_panel_add_item( | ||||||
|         button_panel, |         button_panel, | ||||||
|         i, |         i, | ||||||
| @@ -60,7 +60,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Up_hvr_25x27, |         &I_Up_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "CH+"); |     infrared_brute_force_add_record(brute_force, i++, "Ch_next"); | ||||||
|     button_panel_add_item( |     button_panel_add_item( | ||||||
|         button_panel, |         button_panel, | ||||||
|         i, |         i, | ||||||
| @@ -72,7 +72,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Vol_down_hvr_25x27, |         &I_Vol_down_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "VOL-"); |     infrared_brute_force_add_record(brute_force, i++, "Vol_dn"); | ||||||
|     button_panel_add_item( |     button_panel_add_item( | ||||||
|         button_panel, |         button_panel, | ||||||
|         i, |         i, | ||||||
| @@ -84,7 +84,7 @@ void infrared_scene_universal_tv_on_enter(void* context) { | |||||||
|         &I_Down_hvr_25x27, |         &I_Down_hvr_25x27, | ||||||
|         infrared_scene_universal_common_item_callback, |         infrared_scene_universal_common_item_callback, | ||||||
|         context); |         context); | ||||||
|     infrared_brute_force_add_record(brute_force, i++, "CH-"); |     infrared_brute_force_add_record(brute_force, i++, "Ch_prev"); | ||||||
|  |  | ||||||
|     button_panel_add_label(button_panel, 6, 11, FontPrimary, "TV remote"); |     button_panel_add_label(button_panel, 6, 11, FontPrimary, "TV remote"); | ||||||
|     button_panel_add_label(button_panel, 9, 64, FontSecondary, "Vol"); |     button_panel_add_label(button_panel, 9, 64, FontSecondary, "Vol"); | ||||||
|   | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,7 +1,19 @@ | |||||||
| # Universal Remotes | # Universal Remotes | ||||||
|  | ## Televisions | ||||||
|  | Adding your TV set to the universal remote is quite straightforward. Up to 6 signals can be recorded: `Power`, `Mute`, `Vol_up`, `Vol_dn`, `Ch_next`, `Ch_prev`. Any of them can be omitted if not supported by the TV. | ||||||
|  |  | ||||||
|  | Each signal is recorded using the following algorithm: | ||||||
|  | 1. Get the remote and point it to Flipper's IR receiver. | ||||||
|  | 2. Start learning a new remote if it's the first button or press `+` to add a new button otherwise. | ||||||
|  | 3. Press a remote button and save it under a corresponding name. | ||||||
|  | 4. Repeat steps 2-3 until all required signals are saved. | ||||||
|  |  | ||||||
|  | The signal names are self-explanatory. Don't forget to make sure that every recorded signal does what it's supposed to. | ||||||
|  |  | ||||||
|  | If everything checks out, append these signals **to the end** of the [TV universal remote file](/assets/resources/infrared/assets/tv.ir). | ||||||
|  |  | ||||||
| ## Audio Players | ## Audio Players | ||||||
| ### Recording signals | Adding your audio player to the universal remote is done in the same manner as described above. Up to 8 signals can be recorded: `Power`, `Play`, `Pause`, `Vol_up`, `Vol_dn`, `Next`, `Prev`, `Mute`. Any of them can be omitted if not supported by the player.  | ||||||
| Adding your audio player to the universal remote is quite straightforward. 8 signals can be recorded: `Power`, `Play`, `Pause`, `Vol_up`, `Vol_dn`, `Next`, `Prev`, `Mute`. Any of them can be omitted if it is not supported by the device.  |  | ||||||
|  |  | ||||||
| The signal names are self-explanatory.  | The signal names are self-explanatory.  | ||||||
| On many remotes, the `Play` button doubles as `Pause`. In this case record it as `Play` omitting the `Pause`. | On many remotes, the `Play` button doubles as `Pause`. In this case record it as `Play` omitting the `Pause`. | ||||||
| @@ -9,12 +21,7 @@ Make sure that every signal does what it's supposed to. | |||||||
|  |  | ||||||
| If everything checks out, append these signals **to the end** of the [Audio players universal remote file](/assets/resources/infrared/assets/audio.ir). | If everything checks out, append these signals **to the end** of the [Audio players universal remote file](/assets/resources/infrared/assets/audio.ir). | ||||||
|  |  | ||||||
| The order of signals is not important, but they must be preceded by a following comment: `# Model: <Your model name>` in order to keep the library organised. |  | ||||||
|  |  | ||||||
| When done, open a pull request containing the changed file. |  | ||||||
|  |  | ||||||
| ## Air Conditioners | ## Air Conditioners | ||||||
| ### Recording signals |  | ||||||
| Air conditioners differ from most other infrared-controlled devices because their state is tracked by the remote. | Air conditioners differ from most other infrared-controlled devices because their state is tracked by the remote. | ||||||
| The majority of A/C remotes have a small display which shows current mode, temperature and other settings. | The majority of A/C remotes have a small display which shows current mode, temperature and other settings. | ||||||
| When the user presses a button, a whole set of parameters is transmitted to the device, which must be recorded and used as a whole. | When the user presses a button, a whole set of parameters is transmitted to the device, which must be recorded and used as a whole. | ||||||
| @@ -49,6 +56,7 @@ Test the file against the actual device. Make sure that every signal does what i | |||||||
|  |  | ||||||
| If everything checks out, append these signals **to the end** of the [A/C universal remote file](/assets/resources/infrared/assets/ac.ir). | If everything checks out, append these signals **to the end** of the [A/C universal remote file](/assets/resources/infrared/assets/ac.ir). | ||||||
|  |  | ||||||
|  | ## Final steps | ||||||
| The order of signals is not important, but they must be preceded by a following comment: `# Model: <Your model name>` in order to keep the library organised. | The order of signals is not important, but they must be preceded by a following comment: `# Model: <Your model name>` in order to keep the library organised. | ||||||
|  |  | ||||||
| When done, open a pull request containing the changed file. | When done, open a pull request containing the changed file. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user