Skip to content

Commit 92db5e1

Browse files
committed
Merge remote-tracking branch 'origin/fix/infrared-buttons' into fix/infrared-buttons
2 parents 885bb0c + 71f4bd0 commit 92db5e1

20 files changed

+1406
-199
lines changed

.drone.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ steps:
4444
- cp assets/resources/nfc/assets/mf_classic_dict.nfc sd-card/nfc/assets/mf_classic_dict.nfc
4545
- cp assets/resources/infrared/assets/tv.ir sd-card/infrared/assets/tv.ir
4646
- cp assets/resources/infrared/assets/ac.ir sd-card/infrared/assets/ac.ir
47+
- cp assets/resources/infrared/assets/fans.ir sd-card/infrared/assets/fans.ir
4748
- cp assets/resources/infrared/assets/projectors.ir sd-card/infrared/assets/projectors.ir
4849
- cp assets/resources/infrared/assets/audio.ir sd-card/infrared/assets/audio.ir
4950
- cp assets/resources/unirf/unirf_map_example.txt sd-card/unirf/unirf_map_example.txt
@@ -115,9 +116,7 @@ steps:
115116
116117
[-Install via Web Updater-](https://my.flipp.dev/?url=https://unleashedflip.com/builds/flipper-z-f7-update-${DRONE_TAG}.tgz&channel=dev-cfw&version=${DRONE_TAG})"
117118
document:
118-
- artifacts-default/flipper-z-f7-full-${DRONE_TAG}.dfu
119-
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.zip
120-
- artifacts-default/sd-card-${DRONE_TAG}.zip
119+
- artifacts-default/flipper-z-f7-update-${DRONE_TAG}.tgz
121120

122121
- name: "Send discord notification"
123122
image: appleboy/drone-discord

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
### New changes
22
* UniRF (Sub-GHz Remote) - All protocols support, long button press support (by @darmiel & @xMasterX) (PR #47)
3+
* Universal remote for Fans, new buttons for universal AC remote, icons by @Svaarich
34
* Frequency Analyzer feedback modes (by @darmiel) (PR #49)
45
* RFID EM4100 Fuzzer plugin (by @Ganapati & some fixes by @xMasterX) (PR #48)
56
* Updated universal remote assets (by @Amec0e)
6-
* New UniRF Animated icon (by @Svaarich)
7+
* New UniRF Animated icon & New Spectrum Analyzer icon (by @Svaarich)
78
* Fixed Keeloq seed display
9+
* OFW: nfc: Change furi_assert to furi_crash for default switch cases
810
* OFW: SubGhz: fix CAME, Chamberlain protocol
911
* OFW: LFRFID RC fixes
1012

1113
**Note: Prefer installing using web updater or by self update package, all needed assets will be installed**
1214

13-
**Build naming has been changed - all same as before but `cg - codegrabber` changed to `un - unleashed`**
14-
15-
Self-update package (update from microSD) - `flipper-z-f7-update-(version).zip`
15+
Self-update package (update from microSD) - `flipper-z-f7-update-(version).zip` or `.tgz` for iOS mobile app
1616

1717
DFU for update using qFlipper - `flipper-z-f7-full-(version).dfu`
1818

applications/infrared/scenes/infrared_scene_config.h

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ADD_SCENE(infrared, remote_list, RemoteList)
1616
ADD_SCENE(infrared, universal, Universal)
1717
ADD_SCENE(infrared, universal_tv, UniversalTV)
1818
ADD_SCENE(infrared, universal_ac, UniversalAC)
19+
ADD_SCENE(infrared, universal_fan, UniversalFan)
1920
ADD_SCENE(infrared, universal_audio, UniversalAudio)
2021
ADD_SCENE(infrared, universal_projector, UniversalProjector)
2122
ADD_SCENE(infrared, debug, Debug)

applications/infrared/scenes/infrared_scene_universal.c

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ typedef enum {
44
SubmenuIndexUniversalTV,
55
SubmenuIndexUniversalAudio,
66
SubmenuIndexUniversalProjector,
7+
SubmenuIndexUniversalFan,
78
SubmenuIndexUniversalAirConditioner,
89
} SubmenuIndex;
910

@@ -38,6 +39,13 @@ void infrared_scene_universal_on_enter(void* context) {
3839
infrared_scene_universal_submenu_callback,
3940
context);
4041

42+
submenu_add_item(
43+
submenu,
44+
"Fans",
45+
SubmenuIndexUniversalFan,
46+
infrared_scene_universal_submenu_callback,
47+
context);
48+
4149
submenu_add_item(
4250
submenu,
4351
"ACs",
@@ -63,6 +71,9 @@ bool infrared_scene_universal_on_event(void* context, SceneManagerEvent event) {
6371
} else if(event.event == SubmenuIndexUniversalProjector) {
6472
scene_manager_next_scene(scene_manager, InfraredSceneUniversalProjector);
6573
consumed = true;
74+
} else if(event.event == SubmenuIndexUniversalFan) {
75+
scene_manager_next_scene(scene_manager, InfraredSceneUniversalFan);
76+
consumed = true;
6677
} else if(event.event == SubmenuIndexUniversalAirConditioner) {
6778
scene_manager_next_scene(scene_manager, InfraredSceneUniversalAC);
6879
consumed = true;

applications/infrared/scenes/infrared_scene_universal_ac.c

+28-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void infrared_scene_universal_ac_on_enter(void* context) {
1212
infrared_brute_force_set_db_filename(brute_force, EXT_PATH("infrared/assets/ac.ir"));
1313

1414
//TODO Improve A/C universal remote
15-
button_panel_reserve(button_panel, 2, 2);
15+
button_panel_reserve(button_panel, 2, 3);
1616
uint32_t i = 0;
1717
button_panel_add_item(
1818
button_panel,
@@ -44,7 +44,7 @@ void infrared_scene_universal_ac_on_enter(void* context) {
4444
0,
4545
1,
4646
3,
47-
69,
47+
66,
4848
&I_Vol_up_25x27,
4949
&I_Vol_up_hvr_25x27,
5050
infrared_scene_universal_common_item_callback,
@@ -56,15 +56,39 @@ void infrared_scene_universal_ac_on_enter(void* context) {
5656
1,
5757
1,
5858
36,
59-
69,
59+
66,
6060
&I_Vol_down_25x27,
6161
&I_Vol_down_hvr_25x27,
6262
infrared_scene_universal_common_item_callback,
6363
context);
6464
infrared_brute_force_add_record(brute_force, i++, "TEMP-");
65+
button_panel_add_item(
66+
button_panel,
67+
i,
68+
0,
69+
2,
70+
3,
71+
98,
72+
&I_Swing_25x27,
73+
&I_Swing_hvr_25x27,
74+
infrared_scene_universal_common_item_callback,
75+
context);
76+
infrared_brute_force_add_record(brute_force, i++, "SWING");
77+
button_panel_add_item(
78+
button_panel,
79+
i,
80+
1,
81+
2,
82+
36,
83+
98,
84+
&I_Timer_25x27,
85+
&I_Timer_hvr_25x27,
86+
infrared_scene_universal_common_item_callback,
87+
context);
88+
infrared_brute_force_add_record(brute_force, i++, "TIMER");
6589

6690
button_panel_add_label(button_panel, 6, 11, FontPrimary, "AC remote");
67-
button_panel_add_label(button_panel, 20, 66, FontSecondary, "Temp");
91+
button_panel_add_label(button_panel, 20, 63, FontSecondary, "Temp");
6892
button_panel_add_label(button_panel, 8, 23, FontSecondary, "Pwr");
6993
button_panel_add_label(button_panel, 40, 23, FontSecondary, "Mod");
7094

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#include "../infrared_i.h"
2+
3+
#include "common/infrared_scene_universal_common.h"
4+
5+
void infrared_scene_universal_fan_on_enter(void* context) {
6+
infrared_scene_universal_common_on_enter(context);
7+
8+
Infrared* infrared = context;
9+
ButtonPanel* button_panel = infrared->button_panel;
10+
InfraredBruteForce* brute_force = infrared->brute_force;
11+
12+
infrared_brute_force_set_db_filename(brute_force, EXT_PATH("infrared/assets/fans.ir"));
13+
14+
//TODO Improve Fan universal remote
15+
button_panel_reserve(button_panel, 2, 3);
16+
uint32_t i = 0;
17+
button_panel_add_item(
18+
button_panel,
19+
i,
20+
0,
21+
0,
22+
3,
23+
24,
24+
&I_Power_25x27,
25+
&I_Power_hvr_25x27,
26+
infrared_scene_universal_common_item_callback,
27+
context);
28+
infrared_brute_force_add_record(brute_force, i++, "POWER");
29+
button_panel_add_item(
30+
button_panel,
31+
i,
32+
1,
33+
0,
34+
36,
35+
24,
36+
&I_Mode_25x27,
37+
&I_Mode_hvr_25x27,
38+
infrared_scene_universal_common_item_callback,
39+
context);
40+
infrared_brute_force_add_record(brute_force, i++, "MODE");
41+
button_panel_add_item(
42+
button_panel,
43+
i,
44+
0,
45+
1,
46+
3,
47+
66,
48+
&I_Vol_up_25x27,
49+
&I_Vol_up_hvr_25x27,
50+
infrared_scene_universal_common_item_callback,
51+
context);
52+
infrared_brute_force_add_record(brute_force, i++, "SPEED+");
53+
button_panel_add_item(
54+
button_panel,
55+
i,
56+
1,
57+
1,
58+
36,
59+
66,
60+
&I_Vol_down_25x27,
61+
&I_Vol_down_hvr_25x27,
62+
infrared_scene_universal_common_item_callback,
63+
context);
64+
infrared_brute_force_add_record(brute_force, i++, "SPEED-");
65+
button_panel_add_item(
66+
button_panel,
67+
i,
68+
0,
69+
2,
70+
3,
71+
98,
72+
&I_Rotate_25x27,
73+
&I_Rotate_hvr_25x27,
74+
infrared_scene_universal_common_item_callback,
75+
context);
76+
infrared_brute_force_add_record(brute_force, i++, "ROTATE");
77+
button_panel_add_item(
78+
button_panel,
79+
i,
80+
1,
81+
2,
82+
36,
83+
98,
84+
&I_Timer_25x27,
85+
&I_Timer_hvr_25x27,
86+
infrared_scene_universal_common_item_callback,
87+
context);
88+
infrared_brute_force_add_record(brute_force, i++, "TIMER");
89+
90+
button_panel_add_label(button_panel, 5, 11, FontPrimary, "Fan remote");
91+
button_panel_add_label(button_panel, 20, 63, FontSecondary, "Speed");
92+
button_panel_add_label(button_panel, 8, 23, FontSecondary, "Pwr");
93+
button_panel_add_label(button_panel, 40, 23, FontSecondary, "Mod");
94+
95+
view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical);
96+
view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack);
97+
98+
infrared_show_loading_popup(infrared, true);
99+
bool success = infrared_brute_force_calculate_messages(brute_force);
100+
infrared_show_loading_popup(infrared, false);
101+
102+
if(!success) {
103+
scene_manager_next_scene(infrared->scene_manager, InfraredSceneErrorDatabases);
104+
}
105+
}
106+
107+
bool infrared_scene_universal_fan_on_event(void* context, SceneManagerEvent event) {
108+
return infrared_scene_universal_common_on_event(context, event);
109+
}
110+
111+
void infrared_scene_universal_fan_on_exit(void* context) {
112+
infrared_scene_universal_common_on_exit(context);
113+
}

applications/nfc/helpers/nfc_generators.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static void
254254
session_register_page = 234;
255255
break;
256256
default:
257-
furi_assert(false);
257+
furi_crash("Unknown MFUL");
258258
break;
259259
}
260260

1.65 KB
Loading
1.63 KB
Loading

assets/icons/Infrared/Swing_25x27.png

1.67 KB
Loading
1.65 KB
Loading

assets/icons/Infrared/Timer_25x27.png

1.89 KB
Loading
1.87 KB
Loading

assets/resources/Manifest

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
V:0
2-
T:1661394663
2+
T:1661527982
33
D:badusb
44
D:dolphin
55
D:infrared
@@ -241,10 +241,11 @@ F:33b8fde22f34ef556b64b77164bc19b0:578:dolphin/L3_Lab_research_128x54/frame_8.bm
241241
F:f267f0654781049ca323b11bb4375519:581:dolphin/L3_Lab_research_128x54/frame_9.bm
242242
F:41106c0cbc5144f151b2b2d3daaa0527:727:dolphin/L3_Lab_research_128x54/meta.txt
243243
D:infrared/assets
244-
F:ed61e6f4adc7972bde0e7b5028effac3:101928:infrared/assets/ac.ir
245-
F:229a87b90c1890c5ec6d9e3b0f4695fb:48062:infrared/assets/audio.ir
244+
F:379d21e5faf46466e6cad85eddb074a3:108241:infrared/assets/ac.ir
245+
F:5bdb39269623772d93c2dd6f5e946bd5:48419:infrared/assets/audio.ir
246+
F:9ce3babecb5fab4cca66422c5542bb38:81486:infrared/assets/fans.ir
246247
F:63ca357ca0b85a6ad900539e7b6a0fed:5086:infrared/assets/projectors.ir
247-
F:8920a0548ec658a546a8c6476298e0db:128166:infrared/assets/tv.ir
248+
F:fa586695d245aecdd0b3669e75defdcf:127999:infrared/assets/tv.ir
248249
F:a157a80f5a668700403d870c23b9567d:470:music_player/Marble_Machine.fmf
249250
D:nfc/assets
250251
F:81dc04c7b181f94b644079a71476dff4:4742:nfc/assets/aid.nfc

0 commit comments

Comments
 (0)