@@ -373,6 +373,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
373373#endif
374374#if SEND_WHIRLPOOL_AC
375375 case decode_type_t ::WHIRLPOOL_AC:
376+ #endif
377+ #if SEND_FUNIKI
378+ case decode_type_t ::FUNIKI:
376379#endif
377380 return true ;
378381 default :
@@ -1274,7 +1277,56 @@ void IRac::fujitsu(IRFujitsuAC *ac, const fujitsu_ac_remote_model_t model,
12741277 ac->send ();
12751278}
12761279#endif // SEND_FUJITSU_AC
1280+ #if SEND_FUNIKI
1281+ // / Send a Funiki A/C message with the supplied settings.
1282+ // / @param[in, out] ac A Ptr to an IRFujitsuAC object to use.
1283+ // / @param[in] model The A/C model to use.
1284+ // / @param[in] on The power setting.
1285+ // / @param[in] mode The operation mode setting.
1286+ // / @param[in] celsius Temperature units. True is Celsius, False is Fahrenheit.
1287+ // / @param[in] degrees The temperature setting in degrees.
1288+ // / @param[in] fan The speed setting for the fan.
1289+ // / @param[in] swingv The vertical swing setting.
1290+ // / @param[in] swingh The horizontal swing setting.
1291+ // / @param[in] clock The clock setting.
1292+ // / @param[in] iFeel Whether to enable iFeel (remote temp) mode on the A/C unit.
1293+ // / @param[in] turbo Run the device in turbo/powerful mode.
1294+ // / @param[in] econo Run the device in economical mode.
1295+ // / @param[in] light Turn on the LED/Display mode.
1296+ // / @param[in] clean Turn on the self-cleaning mode. e.g. Mould, dry filters etc
1297+ // / @param[in] sleep Nr. of minutes for sleep mode. <= 0 is Off, > 0 is on.
1298+ void IRac::funiki (IRFunikiAC *ac, const funiki_ac_remote_model_t model,
1299+ const bool on, const stdAc::opmode_t mode, const bool celsius,
1300+ const float degrees, const stdAc::fanspeed_t fan,
1301+ const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
1302+ const int16_t clock,
1303+ const bool iFeel, const bool turbo, const bool econo,
1304+ const bool light, const bool clean, const int16_t sleep) {
1305+ ac->begin ();
1306+ ac->setModel (model);
1307+ ac->setPower (on);
1308+ ac->setMode (ac->convertMode (mode));
1309+ ac->setTemp (degrees, !celsius);
1310+ ac->setFan (ac->convertFan (fan));
1311+ ac->setSwingVertical (swingv == stdAc::swingv_t ::kAuto , // Set auto flag.
1312+ ac->convertSwingV (swingv));
1313+ ac->setSleep (sleep >= 0 ); // Sleep on this A/C is either on or off.
1314+ // No Econo setting available.
1315+ (void )(swingh);
1316+ (void )(iFeel);
1317+ (void )(turbo);
1318+ (void )(econo);
1319+ (void )(light);
1320+ (void )(clean);
12771321
1322+ // No Filter setting available.
1323+ // No Beep setting available.
1324+ // No Quiet setting available.
1325+ // No Clock setting available.
1326+ if (clock >= 0 ) ac->setClock (clock);
1327+ ac->send ();
1328+ }
1329+ #endif // SEND_FUNIKI
12781330#if SEND_GOODWEATHER
12791331// / Send a Goodweather A/C message with the supplied settings.
12801332// / @param[in, out] ac A Ptr to an IRGoodweatherAc object to use.
@@ -3244,6 +3296,18 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
32443296 break ;
32453297 }
32463298#endif // SEND_FUJITSU_AC
3299+ #if SEND_FUNIKI
3300+ case FUNIKI:
3301+ {
3302+ IRFunikiAC ac (_pin, (funiki_ac_remote_model_t )send.model , _inverted,
3303+ _modulation);
3304+ funiki (&ac, (funiki_ac_remote_model_t )send.model , send.power , send.mode ,
3305+ send.celsius , send.degrees , send.fanspeed , send.swingv , send.swingh ,
3306+ send.clock ,
3307+ send.turbo , send.econo , send.light , send.clean , send.sleep );
3308+ break ;
3309+ }
3310+ #endif // SEND_FUNIKI
32473311#if SEND_GOODWEATHER
32483312 case GOODWEATHER:
32493313 {
@@ -4215,6 +4279,13 @@ namespace IRAcUtils {
42154279 return ac.toString ();
42164280 }
42174281#endif // DECODE_FUJITSU_AC
4282+ #if DECODE_FUNIKI
4283+ case decode_type_t ::FUNIKI: {
4284+ IRFunikiAC ac (kGpioUnused );
4285+ ac.setRaw (result->state );
4286+ return ac.toString ();
4287+ }
4288+ #endif // DECODE_FUNIKI
42184289#if DECODE_GOODWEATHER
42194290 case decode_type_t ::GOODWEATHER: {
42204291 IRGoodweatherAc ac (kGpioUnused );
@@ -4716,6 +4787,14 @@ namespace IRAcUtils {
47164787 break ;
47174788 }
47184789#endif // DECODE_FUJITSU_AC
4790+ #if DECODE_FUNIKI
4791+ case decode_type_t ::FUNIKI: {
4792+ IRFunikiAC ac (kGpioUnused );
4793+ ac.setRaw (decode->state );
4794+ *result = ac.toCommon ();
4795+ break ;
4796+ }
4797+ #endif // DECODE_FUNIKI
47194798#if DECODE_GOODWEATHER
47204799 case decode_type_t ::GOODWEATHER: {
47214800 IRGoodweatherAc ac (kGpioUnused );
0 commit comments