ToniA / arduino-heatpumpir

An Arduino library to control split-unit heatpumps over Infrared
GNU General Public License v2.0
395 stars 140 forks source link

Fujitsu ECO mode error #111

Closed xfarre closed 4 years ago

xfarre commented 4 years ago

Hello community.

I am an user of arduino & ESP8266 and I am using heatpumpir libraries for a long time to manage my Fujitsu AA device.

It works so well, but I am unable to set ECO mode. When I try to execute following function:

heatpumpIR[0]->send(irSender, POWER_ON, MODE_AUTO, FAN_AUTO, 24, VDIR_MANUAL, HDIR_MANUAL, true); I always get: no matching function for call to 'HeatpumpIR::send(IRSenderBitBang&, int, int, int, int, int, int, bool)'

I tried with:

heatpumpIR[0]->send(irSender, POWER_ON, MODE_AUTO, FAN_AUTO, 24, VDIR_MANUAL, HDIR_MANUAL, FUJITSU_AIRCON1_ECO_ON);

But same issue.

Checking FujitsuHeatpumpIR.cpp I can see two function definition:

`void FujitsuHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd) { send(IR, powerModeCmd, operatingModeCmd, fanSpeedCmd, temperatureCmd, swingVCmd, swingHCmd, false); }

void FujitsuHeatpumpIR::send(IRSender& IR, uint8_t powerModeCmd, uint8_t operatingModeCmd, uint8_t fanSpeedCmd, uint8_t temperatureCmd, uint8_t swingVCmd, uint8_t swingHCmd, bool ecoModeCmd) {`

I' m fully sure there is a error from my side. Could you help me please?

Thanks in advance.

ToniA commented 4 years ago

Instead of the generic HeatpumpIR instance, you need to create an instance of FujitsuHeatpumpIR. Like this:

FujitsuHeatpumpIR *heatpumpIR = new FujitsuHeatpumpIR();