-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSendCommand.ino
More file actions
30 lines (26 loc) · 1.19 KB
/
Copy pathSendCommand.ino
File metadata and controls
30 lines (26 loc) · 1.19 KB
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
void SendCommand(int Temp, bool Turbo, String Mode, bool Swing, String FanSpeed)
{
ac.next.protocol = decode_type_t::Protocolo; //Protocolo
ac.next.model = 1;
ac.next.celsius = true; //Use Degrees Celsius
if (FanSpeed == "low")
ac.next.fanspeed = stdAc::fanspeed_t::kLow; //Velocidade do Ventilador
if (FanSpeed == "medium")
ac.next.fanspeed = stdAc::fanspeed_t::kMedium;
if (FanSpeed == "high")
ac.next.fanspeed = stdAc::fanspeed_t::kHigh;
if (Mode == "Cool")
ac.next.mode = stdAc::opmode_t::kCool; //Modo de Operação
if (Mode == "Dry")
ac.next.mode = stdAc::opmode_t::kDry;
if (Swing)
ac.next.swingv = stdAc::swingv_t::kAuto; //Movimento das Aletas
else
ac.next.swingv = stdAc::swingv_t::kOff;
ac.next.light = true; //Define se as luzes do Aparelho ficam acesas
ac.next.turbo = Turbo; //Turbo ON/OFF
ac.next.degrees = Temp; //Temperaura
ac.next.power = true; //Ligado/Desligado
ac.next.fanspeed = stdAc::fanspeed_t::kHigh;
ac.sendAc(); //Envia o Comando
}