forked from ToniA/arduino-heatpumpir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CarrierHeatpumpIR.h
107 lines (88 loc) · 3.55 KB
/
CarrierHeatpumpIR.h
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
/*
Carrier 42NQV035G / 38NYV035H2 heatpump control (remote control P/N WH-L05SE)
Carrier 42MCA009515LS A/C control (remote control P/N R11CG/E)
* Qlima (remote control P/N ABS10FP)
*/
#ifndef CarrierHeatpumpIR_h
#define CarrierHeatpumpIR_h
#include <HeatpumpIR.h>
// Carrier (42NQV035G / 38NYV035H2) timing constants (remote control P/N WH-L05SE)
#define CARRIER_AIRCON1_HDR_MARK 4320
#define CARRIER_AIRCON1_HDR_SPACE 4350
#define CARRIER_AIRCON1_BIT_MARK 500
#define CARRIER_AIRCON1_ONE_SPACE 1650
#define CARRIER_AIRCON1_ZERO_SPACE 550
#define CARRIER_AIRCON1_MSG_SPACE 7400
// Carrier codes
#define CARRIER_AIRCON1_MODE_AUTO 0x00 // Operating mode
#define CARRIER_AIRCON1_MODE_HEAT 0xC0
#define CARRIER_AIRCON1_MODE_COOL 0x80
#define CARRIER_AIRCON1_MODE_DRY 0x40
#define CARRIER_AIRCON1_MODE_FAN 0x20
#define CARRIER_AIRCON1_MODE_OFF 0xE0 // Power OFF
#define CARRIER_AIRCON1_FAN_AUTO 0x00 // Fan speed
#define CARRIER_AIRCON1_FAN1 0x02
#define CARRIER_AIRCON1_FAN2 0x06
#define CARRIER_AIRCON1_FAN3 0x01
#define CARRIER_AIRCON1_FAN4 0x05
#define CARRIER_AIRCON1_FAN5 0x03
// Carrier (42MCA009515LS) timing constants (remote control P/N R11CG/E)
#define CARRIER_AIRCON2_HDR_MARK 4510
#define CARRIER_AIRCON2_HDR_SPACE 4470
#define CARRIER_AIRCON2_BIT_MARK 600
#define CARRIER_AIRCON2_ONE_SPACE 1560
#define CARRIER_AIRCON2_ZERO_SPACE 500
#define CARRIER_AIRCON2_MODE_AUTO 0x10 // Operating mode
#define CARRIER_AIRCON2_MODE_COOL 0x00
#define CARRIER_AIRCON2_MODE_DRY 0x20
#define CARRIER_AIRCON2_MODE_FAN 0x20
#define CARRIER_AIRCON2_MODE_HEAT 0x30
#define CARRIER_AIRCON2_MODE_OFF 0x00 // Power OFF
#define CARRIER_AIRCON2_MODE_ON 0x20 // Power ON
#define CARRIER_AIRCON2_FAN_DRY_AUTO 0x00 // Fan speed, AUTO or DRY modes
#define CARRIER_AIRCON2_FAN1 0x01
#define CARRIER_AIRCON2_FAN2 0x02
#define CARRIER_AIRCON2_FAN3 0x04
#define CARRIER_AIRCON2_FAN_AUTO 0x05
#define CARRIER_AIRCON2_FAN_OFF 0x06
#define MODEL_CARRIER_MCA 1
#define MODEL_QLIMA_1 2
#define MODEL_QLIMA_2 3
class CarrierHeatpumpIR : public HeatpumpIR
{
protected:
CarrierHeatpumpIR();
uint8_t _carrierModel;
public:
virtual void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd);
};
class CarrierNQVHeatpumpIR : public CarrierHeatpumpIR
{
public:
CarrierNQVHeatpumpIR();
public:
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd);
private:
void sendCarrier(IRSender& IR, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature);
};
class CarrierMCAHeatpumpIR : public CarrierHeatpumpIR
{
public:
CarrierMCAHeatpumpIR();
public:
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd);
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd, bool turboMode);
private:
void sendCarrier(IRSender& IR, uint8_t powerMode, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature, bool maintenanceMode, bool turboMode);
};
class Qlima1HeatpumpIR : public CarrierMCAHeatpumpIR
{
public:
Qlima1HeatpumpIR();
};
class Qlima2HeatpumpIR : public CarrierMCAHeatpumpIR
{
public:
Qlima2HeatpumpIR();
};
#endif