Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LG] Add support for AKB73757604 model #1545

Merged
merged 5 commits into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,22 +1335,26 @@ void IRac::kelvinator(IRKelvinatorAC *ac,
/// @param[in] fan The speed setting for the fan.
/// @param[in] swingv The vertical swing setting.
/// @param[in] swingv_prev The previous vertical swing setting.
/// @param[in] swingh The horizontal swing setting.
/// @param[in] light Turn on the LED/Display mode.
void IRac::lg(IRLgAc *ac, const lg_ac_remote_model_t model,
const bool on, const stdAc::opmode_t mode,
const float degrees, const stdAc::fanspeed_t fan,
const stdAc::swingv_t swingv, const stdAc::swingv_t swingv_prev,
const bool light) {
const stdAc::swingh_t swingh, const bool light) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
ac->setMode(ac->convertMode(mode));
ac->setTemp(degrees);
ac->setFan(ac->convertFan(fan));
ac->setSwingV(ac->convertSwingV(swingv_prev));
ac->updateSwingVPrev();
ac->updateSwingPrev();
ac->setSwingV(ac->convertSwingV(swingv));
// No Horizontal swing setting available.
const uint8_t pos = ac->convertVaneSwingV(swingv);
for (uint8_t vane = 0; vane < kLgAcSwingVMaxVanes; vane++)
ac->setVaneSwingV(vane, pos);
ac->setSwingH(swingh != stdAc::swingh_t::kOff);
// No Quiet setting available.
// No Turbo setting available.
ac->setLight(light);
Expand Down Expand Up @@ -2650,7 +2654,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
{
IRLgAc ac(_pin, _inverted, _modulation);
lg(&ac, (lg_ac_remote_model_t)send.model, send.power, send.mode,
send.degrees, send.fanspeed, send.swingv, prev_swingv, send.light);
send.degrees, send.fanspeed, send.swingv, prev_swingv, send.swingh,
send.light);
break;
}
#endif // SEND_LG
Expand Down Expand Up @@ -3071,6 +3076,8 @@ int16_t IRac::strToModel(const char *str, const int16_t def) {
return lg_ac_remote_model_t::AKB75215403;
} else if (!strcasecmp(str, "AKB74955603")) {
return lg_ac_remote_model_t::AKB74955603;
} else if (!strcasecmp(str, "AKB73757604")) {
return lg_ac_remote_model_t::AKB73757604;
// Panasonic A/C families
} else if (!strcasecmp(str, "LKE") || !strcasecmp(str, "PANASONICLKE")) {
return panasonic_ac_remote_model_t::kPanasonicLke;
Expand Down
2 changes: 1 addition & 1 deletion src/IRac.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void electra(IRElectraAc *ac,
const bool on, const stdAc::opmode_t mode,
const float degrees, const stdAc::fanspeed_t fan,
const stdAc::swingv_t swingv, const stdAc::swingv_t swingv_prev,
const bool light);
const stdAc::swingh_t swingh, const bool light);
#endif // SEND_LG
#if SEND_MIDEA
void midea(IRMideaAC *ac,
Expand Down
1 change: 1 addition & 0 deletions src/IRsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ enum lg_ac_remote_model_t {
GE6711AR2853M = 1, // (1) LG 28-bit Protocol (default)
AKB75215403, // (2) LG2 28-bit Protocol
AKB74955603, // (3) LG2 28-bit Protocol variant
AKB73757604, // (4) LG2 Variant of AKB74955603
};


Expand Down
1 change: 1 addition & 0 deletions src/IRtext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const PROGMEM char* k6thSenseStr = D_STR_6THSENSE; ///< "6th Sense"
const PROGMEM char* kTypeStr = D_STR_TYPE; ///< "Type"
const PROGMEM char* kSpecialStr = D_STR_SPECIAL; ///< "Special"
const PROGMEM char* kIdStr = D_STR_ID; ///< "Id" / Device Identifier
const PROGMEM char* kVaneStr = D_STR_VANE; ///< "Vane"

const PROGMEM char* kAutoStr = D_STR_AUTO; ///< "Auto"
const PROGMEM char* kAutomaticStr = D_STR_AUTOMATIC; ///< "Automatic"
Expand Down
1 change: 1 addition & 0 deletions src/IRtext.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ extern const char* kTypeStr;
extern const char* kUnknownStr;
extern const char* kUpperStr;
extern const char* kUpStr;
extern const char* kVaneStr;
extern const char* kWallStr;
extern const char* kWeeklyTimerStr;
extern const char* kWideStr;
Expand Down
5 changes: 3 additions & 2 deletions src/IRutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,9 @@ namespace irutils {
case decode_type_t::LG2:
switch (model) {
case lg_ac_remote_model_t::GE6711AR2853M: return F("GE6711AR2853M");
case lg_ac_remote_model_t::AKB75215403: return F("AKB75215403");
case lg_ac_remote_model_t::AKB74955603: return F("AKB74955603");
case lg_ac_remote_model_t::AKB75215403: return F("AKB75215403");
case lg_ac_remote_model_t::AKB74955603: return F("AKB74955603");
case lg_ac_remote_model_t::AKB73757604: return F("AKB73757604");
default: return kUnknownStr;
}
break;
Expand Down
Loading