-
Notifications
You must be signed in to change notification settings - Fork 835
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
Add basic support for YX1F8F remote #2005
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,16 @@ void IRGreeAC::stateReset(void) { | |
std::memset(_.remote_state, 0, sizeof _.remote_state); | ||
_.Temp = 9; // _.remote_state[1] = 0x09; | ||
_.Light = true; // _.remote_state[2] = 0x20; | ||
_.unknown1 = 5; // _.remote_state[3] = 0x50; | ||
_.unknown2 = 4; // _.remote_state[5] = 0x20; | ||
|
||
if (_model == gree_ac_remote_model_t::YX1F8F) { | ||
_.unknown1 = 10; // _.remote_state[3] = 0x0A; | ||
_.unknown2 = 0; // _.remote_state[5] = 0x01; | ||
_.unknown3 = 1; // _.remote_state[5] = 0x01; | ||
} else { | ||
_.unknown1 = 5; // _.remote_state[3] = 0x50; | ||
_.unknown2 = 4; // _.remote_state[5] = 0x20; | ||
_.unknown3 = 0; // _.remote_state[5] = 0x20; | ||
} | ||
Comment on lines
+126
to
+134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation seems of |
||
} | ||
|
||
/// Fix up the internal state so it is correct. | ||
|
@@ -188,7 +196,8 @@ void IRGreeAC::setModel(const gree_ac_remote_model_t model) { | |
switch (model) { | ||
case gree_ac_remote_model_t::YAW1F: | ||
case gree_ac_remote_model_t::YBOFB: | ||
case gree_ac_remote_model_t::YX1FSF: _model = model; break; | ||
case gree_ac_remote_model_t::YX1FSF: | ||
case gree_ac_remote_model_t::YX1F8F: _model = model; break; | ||
default: _model = gree_ac_remote_model_t::YAW1F; | ||
} | ||
} | ||
|
@@ -209,7 +218,8 @@ void IRGreeAC::off(void) { setPower(false); } | |
void IRGreeAC::setPower(const bool on) { | ||
_.Power = on; | ||
// May not be needed. See #814 | ||
_.ModelA = (on && _model == gree_ac_remote_model_t::YAW1F); | ||
_.ModelA = (on && (_model == gree_ac_remote_model_t::YAW1F | ||
|| _model == gree_ac_remote_model_t::YX1F8F)); | ||
} | ||
|
||
/// Get the value of the current power setting. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
// Brand: Vailland, Model: YACIFB remote | ||
// Brand: Vailland, Model: VAI5-035WNI A/C | ||
// Brand: Soleus Air, Model: window A/C (YX1FSF) | ||
// Brand: Frigidaire, Model: YX1F8F remote | ||
|
||
#ifndef IR_GREE_H_ | ||
#define IR_GREE_H_ | ||
|
@@ -76,7 +77,7 @@ union GreeProtocol{ | |
uint8_t IFeel :1; | ||
uint8_t unknown2 :3; // value = 0b100 | ||
uint8_t WiFi :1; | ||
uint8_t :1; | ||
uint8_t unknown3 :1; // value = 0b0 | ||
Comment on lines
78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that I think this can be a more useful comment. Perhaps all the comments for unknowns should be updated to something like "Value depends on remote model, see stateReset". Thinking ahead I could potentially see listing the model names on the comments becoming a tedious list to maintain in a comment, so I don't think we should list the initial values for the respective models in the comment. This would only be an issue if more models were supported that required different values here though, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I'm thinking |
||
// Byte 6 | ||
uint8_t :8; | ||
// Byte 7 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything that differs?
As a reader of just the comment I wonder why it is needed, hopefully this can be improved on to help other readers understand it. Maybe: "Mostly identical to YX1FSF but different identification"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hard part with explaining why the model is different is because the parts of the protocol that are identified and named in the code remain the same for this model. The only differences are that this particular remote has a different set of static "unknowns" than the other models, along with the addition of the ModelA bit needing to be set like the YAW1F remote.
I don't know if it adds benefit to explain that the model is "Similiar to YX1FSF, except for different unknowns". Seems it would add more confusion than clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "same as YAW1F, model bits differs"