#101 Ballu should implement the HeatpumpIR interface
This commit is contained in:
parent
304db4f7d6
commit
5a12bd2d0e
|
@ -10,16 +10,16 @@ BalluHeatpumpIR::BalluHeatpumpIR()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BalluHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd)
|
void BalluHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd)
|
||||||
{
|
{
|
||||||
// Sensible defaults for the heat pump mode
|
// Sensible defaults for the heat pump mode
|
||||||
|
|
||||||
uint8_t operatingMode = BALLU_AIRCON_MODE_COOL;
|
uint8_t operatingMode = BALLU_AIRCON_MODE_COOL;
|
||||||
uint8_t fanSpeed = BALLU_AIRCON_FAN_AUTO;
|
uint8_t fanSpeed = BALLU_AIRCON_FAN_AUTO;
|
||||||
uint8_t temperature = 21;
|
uint8_t temperature = 21;
|
||||||
uint8_t powerMode = 00;
|
uint8_t powerMode = 00;
|
||||||
|
|
||||||
|
|
||||||
if (powerModeCmd == POWER_OFF)
|
if (powerModeCmd == POWER_OFF)
|
||||||
{
|
{
|
||||||
powerMode = BALLU_AIRCON_MODE_OFF;
|
powerMode = BALLU_AIRCON_MODE_OFF;
|
||||||
|
@ -43,7 +43,7 @@ void BalluHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operating
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fanSpeedCmd)
|
switch (fanSpeedCmd)
|
||||||
{
|
{
|
||||||
case FAN_AUTO:
|
case FAN_AUTO:
|
||||||
|
@ -59,12 +59,11 @@ void BalluHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operating
|
||||||
fanSpeed = BALLU_AIRCON_FAN3;
|
fanSpeed = BALLU_AIRCON_FAN3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temperatureCmd > 15 && temperatureCmd < 31)
|
if (temperatureCmd > 15 && temperatureCmd < 31)
|
||||||
{
|
{
|
||||||
temperature = temperatureCmd;
|
temperature = temperatureCmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendBallu(IR, powerMode, operatingMode, fanSpeed, temperature);
|
sendBallu(IR, powerMode, operatingMode, fanSpeed, temperature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class BalluHeatpumpIR : public HeatpumpIR
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BalluHeatpumpIR();
|
BalluHeatpumpIR();
|
||||||
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd);
|
void send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sendBallu(IRSender& IR, uint8_t powerMode, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature);
|
void sendBallu(IRSender& IR, uint8_t powerMode, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature);
|
||||||
|
|
Loading…
Reference in New Issue