Skip to content

Commit

Permalink
Update IRac.cpp
Browse files Browse the repository at this point in the history
Change argument order and remove unused parameters.
Fix a doxygen error
Fix a typo/error in the Ptr comment.
  • Loading branch information
crankyoldgit authored Jun 29, 2024
1 parent be0aa11 commit ac84bbb
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1279,29 +1279,21 @@ void IRac::fujitsu(IRFujitsuAC *ac, const fujitsu_ac_remote_model_t model,
#endif // SEND_FUJITSU_AC
#if SEND_FUNIKI
/// Send a Funiki A/C message with the supplied settings.
/// @param[in, out] ac A Ptr to an IRFujitsuAC object to use.
/// @param[in, out] ac A Ptr to an IRFunikiAC object to use.
/// @param[in] model The A/C model to use.
/// @param[in] on The power setting.
/// @param[in] mode The operation mode setting.
/// @param[in] celsius Temperature units. True is Celsius, False is Fahrenheit.
/// @param[in] degrees The temperature setting in degrees.
/// @param[in] fan The speed setting for the fan.
/// @param[in] swingv The vertical swing setting.
/// @param[in] swingh The horizontal swing setting.
/// @param[in] clock The clock setting.
/// @param[in] iFeel Whether to enable iFeel (remote temp) mode on the A/C unit.
/// @param[in] turbo Run the device in turbo/powerful mode.
/// @param[in] econo Run the device in economical mode.
/// @param[in] light Turn on the LED/Display mode.
/// @param[in] clean Turn on the self-cleaning mode. e.g. Mould, dry filters etc
/// @param[in] sleep Nr. of minutes for sleep mode. <= 0 is Off, > 0 is on.
/// @param[in] clock The clock setting.
void IRac::funiki(IRFunikiAC *ac, const funiki_ac_remote_model_t model,
const bool on, const stdAc::opmode_t mode, const bool celsius,
const float degrees, const stdAc::fanspeed_t fan,
const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
const int16_t clock,
const bool iFeel, const bool turbo, const bool econo,
const bool light, const bool clean, const int16_t sleep) {
const stdAc::swingv_t swingv,
const int16_t sleep, const int16_t clock) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
Expand All @@ -1310,19 +1302,14 @@ void IRac::funiki(IRFunikiAC *ac, const funiki_ac_remote_model_t model,
ac->setFan(ac->convertFan(fan));
ac->setSwingVertical(swingv == stdAc::swingv_t::kAuto, // Set auto flag.
ac->convertSwingV(swingv));
ac->setSleep(sleep >= 0); // Sleep on this A/C is either on or off.
// No Econo setting available.
(void)(swingh);
(void)(iFeel);
(void)(turbo);
(void)(econo);
(void)(light);
(void)(clean);

// No Horizontal Swing setting available.
// No Turbo setting available.
// No Light setting available.
// No Filter setting available.
// No Clean setting available.
// No Beep setting available.
// No Quiet setting available.
// No Clock setting available.
ac->setSleep(sleep >= 0); // Sleep on this A/C is either on or off.
if (clock >= 0) ac->setClock(clock);
ac->send();
}
Expand Down Expand Up @@ -3300,11 +3287,10 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case FUNIKI:
{
IRFunikiAC ac(_pin, (funiki_ac_remote_model_t)send.model, _inverted,
_modulation);
_modulation);
funiki(&ac, (funiki_ac_remote_model_t)send.model, send.power, send.mode,
send.celsius, send.degrees, send.fanspeed, send.swingv, send.swingh,
send.clock,
send.turbo, send.econo, send.light, send.clean, send.sleep);
send.celsius, send.degrees, send.fanspeed, send.swingv,
send.sleep, send.clock);
break;
}
#endif // SEND_FUNIKI
Expand Down

0 comments on commit ac84bbb

Please sign in to comment.