-
Notifications
You must be signed in to change notification settings - Fork 7
/
ac_commands.c
248 lines (220 loc) · 26.1 KB
/
ac_commands.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
//#include <task.h>
#include <ir/ir.h>
#include <ir/raw.h>
#include "ac_commands.h"
//Below codes are for TOYOTOMI AC
static const int16_t Fan[] = {9000,-4000,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-620,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_16[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620};
static const int16_t Cool_17[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_18[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_19[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_20[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_21[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_22[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_23[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_24[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_25[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_26[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_27[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_28[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_29[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Cool_30[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620}; //AnalysIR Batch Export (IRremote) - RAW
static const int16_t Heat_16[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620};
static const int16_t Heat_17[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-1600,620};
static const int16_t Heat_18[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,1600,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620};
static const int16_t Heat_19[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620};
static const int16_t Heat_20[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620};
static const int16_t Heat_21[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-1600,620};
static const int16_t Heat_22[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620};
static const int16_t Heat_23[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-1600,620};
static const int16_t Heat_24[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620};
static const int16_t Heat_25[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620};
static const int16_t Heat_26[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620};
static const int16_t Heat_27[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620};
static const int16_t Heat_28[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620};
static const int16_t Heat_29[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620};
static const int16_t Heat_30[] = {9000,-4000,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620};
static const int16_t Off[] = {9000,-4000,620,-1600,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-1600,620,-540,620,-540,620,-1600,620,-540,620,-19000,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-540,620,-1600,620,-1600,620,-540,620,-1600,620}; //AnalysIR Batch Export (IRremote) - RAW
void ac_button_off(){
//ir_tx_init();
printf("...Sending OFF command...\n");
ir_raw_send(Off, sizeof(Off) / sizeof(*Off));
}
void ac_button_aut(){
//ir_tx_init();
printf("Sending Fan command\n");
ir_raw_send(Fan, sizeof(Fan) / sizeof(*Fan));
}
void ac_command(int target_state, float target_temp){
int16_t *RawData;
uint16_t length1;
if(target_state == 2)
{
//Cool mode
if (target_temp == 16.0)
{
RawData = Cool_16;
length1 = sizeof(Cool_16)/ sizeof(*Cool_16);
}
else if (target_temp == 17.0)
{
RawData = Cool_17;
length1 =sizeof(Cool_17)/ sizeof(*Cool_17);
}
else if (target_temp == 18.0)
{
RawData = Cool_18;
length1 = sizeof(Cool_18)/sizeof(*Cool_18);
}
else if (target_temp == 19.0)
{
RawData = Cool_19;
length1 = sizeof(Cool_19)/sizeof(*Cool_19);
}
else if (target_temp == 20.0)
{
RawData = Cool_20;
length1 = sizeof(Cool_20)/sizeof(*Cool_20);
}
else if (target_temp == 21.0)
{
RawData = Cool_21;
length1 = sizeof(Cool_21)/sizeof(*Cool_21);
}
else if (target_temp == 22.0)
{
RawData = Cool_22;
length1 =sizeof(Cool_22)/ sizeof(*Cool_22);
}
else if (target_temp == 23.0)
{
RawData = Cool_23;
length1 = sizeof(Cool_23)/sizeof(*Cool_23);
}
else if (target_temp == 24.0)
{
RawData = Cool_24;
length1 = sizeof(Cool_24)/sizeof(*Cool_24);
}
else if (target_temp == 25.0)
{
RawData = Cool_25;
length1 = sizeof(Cool_25)/sizeof(*Cool_25);
}
else if (target_temp == 26.0)
{
RawData = Cool_26;
length1 = sizeof(Cool_26)/sizeof(*Cool_26);
}
else if (target_temp == 27.0)
{
RawData = Cool_27;
length1 = sizeof(Cool_27)/sizeof(*Cool_27);
}
else if (target_temp == 28.0)
{
RawData = Cool_28;
length1 =sizeof(Cool_28)/ sizeof(*Cool_28);
}
else if (target_temp == 29.0)
{
RawData = Cool_29;
length1 = sizeof(Cool_29)/sizeof(*Cool_29);
}
else if (target_temp == 30.0)
{
RawData = Cool_30;
length1 = sizeof(Cool_30)/sizeof(*Cool_30);
}
}
if( target_state == 1)
{
//Heat mode
if (target_temp == 16.0)
{
RawData = Heat_16;
length1 = sizeof(Heat_16)/sizeof(*Heat_16);
}
else if (target_temp == 17.0)
{
RawData = Heat_17;
length1 = sizeof(Heat_17)/sizeof(*Heat_17);
}
else if (target_temp == 18.0)
{
RawData = Heat_18;
length1 = sizeof(Heat_18)/sizeof(*Heat_18);
}
else if (target_temp == 19.0)
{
RawData = Heat_19;
length1 = sizeof(Heat_19)/sizeof(*Heat_19);
}
else if (target_temp == 20.0)
{
RawData = Heat_20;
length1 = sizeof(Heat_20)/sizeof(*Heat_20);
}
else if (target_temp == 21.0)
{
RawData = Heat_21;
length1 = sizeof(Heat_21)/sizeof(*Heat_21);
}
else if (target_temp == 22.0)
{
RawData = Heat_22;
length1 = sizeof(Heat_22)/sizeof(*Heat_22);
}
else if (target_temp == 23.0)
{
RawData = Heat_23;
length1 = sizeof(Heat_23)/sizeof(*Heat_23);
}
else if (target_temp == 24.0)
{
RawData = Heat_24;
length1 = sizeof(Heat_24)/sizeof(*Heat_24);
}
else if (target_temp == 25.0)
{
RawData = Heat_25;
length1 = sizeof(Heat_25)/sizeof(*Heat_25);
}
else if (target_temp == 26.0)
{
RawData = Heat_26;
length1 = sizeof(Heat_26)/sizeof(*Heat_26);
}
else if (target_temp == 27.0)
{
RawData = Heat_27;
length1 = sizeof(Heat_27)/sizeof(*Heat_27);
}
else if (target_temp == 28.0)
{
RawData = Heat_28;
length1 = sizeof(Heat_28)/sizeof(*Heat_28);
}
else if (target_temp == 29.0)
{
RawData = Heat_29;
length1 = sizeof(Heat_29)/sizeof(*Heat_29);
}
else if (target_temp == 30.0)
{
RawData = Heat_30;
length1 = sizeof(Heat_30)/sizeof(*Heat_30);
}
}
if( target_state == 0)
{
//printf("Fan mode\n", 30 );
RawData = Off;
length1 = sizeof(Off)/sizeof(*Off);
}
//ir_tx_init();
ir_raw_send(RawData, length1);
}