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

rewrite ir_Corona #1274

Merged
merged 2 commits into from
Sep 20, 2020
Merged

rewrite ir_Corona #1274

merged 2 commits into from
Sep 20, 2020

Conversation

siriuslzx
Copy link
Collaborator

rewrite ir_Corona by using bit field.
PS: The ir_Coolix seems difficult to refactor, I'm not sure whether it will be better or worse after modifying it, so I decided to modify it at last.

@siriuslzx
Copy link
Collaborator Author

oh no, I find some errors myself just after this PR.

  uint8_t d1invinv = ~p->Data1;
  if (p->Data1Inv != d1invinv) {

this should be

  uint8_t d1invinv = ~p->Data1Inv;
  if (p->Data1 != d1invinv) {

@crankyoldgit
Copy link
Owner

PS: The ir_Coolix seems difficult to refactor, I'm not sure whether it will be better or worse after modifying it, so I decided to modify it at last.

No worries. This isn't a job. You are not paid to do it. You didn't sign a contract. ;-) Take your time. Some improvement is better than none! ;-)

@crankyoldgit crankyoldgit self-requested a review September 19, 2020 14:41
@crankyoldgit crankyoldgit self-assigned this Sep 19, 2020
@crankyoldgit
Copy link
Owner

oh no, I find some errors myself just after this PR.

  uint8_t d1invinv = ~p->Data1;
  if (p->Data1Inv != d1invinv) {

this should be

  uint8_t d1invinv = ~p->Data1Inv;
  if (p->Data1 != d1invinv) {

Just commit & push the new changes, it will update the PR automatically.

src/ir_Corona.cpp Outdated Show resolved Hide resolved
src/ir_Corona.cpp Outdated Show resolved Hide resolved
src/ir_Corona.cpp Outdated Show resolved Hide resolved
@NiKiZe
Copy link
Collaborator

NiKiZe commented Sep 19, 2020

Could this be broken up into multiple levels of structs instead?
Base has the union with raw which then has the 3 sections, one for settings and then 2 timers ? Maybe the timers could be in an array?

@siriuslzx
Copy link
Collaborator Author

Could this be broken up into multiple levels of structs instead?
Base has the union with raw which then has the 3 sections, one for settings and then 2 timers ? Maybe the timers could be in an array?

good idea

@crankyoldgit crankyoldgit self-requested a review September 20, 2020 14:16
Copy link
Owner

@crankyoldgit crankyoldgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Going to leave it to @NiKiZe to give it the final "approve" assuming he's happy too.

@crankyoldgit crankyoldgit self-requested a review September 20, 2020 14:51
@siriuslzx siriuslzx merged commit a49527f into crankyoldgit:master Sep 20, 2020
crankyoldgit added a commit that referenced this pull request Oct 2, 2020
_v2.7.11 (20200902)_

**[Features]**
- Transcold: Add detailed support. (#1256 #1278)
- Airwell/Whirlpool: Add handling of previous state to `.toCommon()` (#1275 #1276)
- IRMQTTServer: Change how MQTT packet/buffer size is set. (#1271)
- Fujitsu: Add support for timers. (#1255 #1261 #1262)
- Neoclima: Add Economy & Fahrenheit support (#1260 #1265)
- Technibel: Cleanup and code fixes/improvements. (#1259 #1266)
- Technibel: Add detailed A/C support (#1259)
- Transcold: Add basic support. (#1256 #1258)

**[Misc]**
- refactor ir_Delonghi (#1285)
- Whirlpool: Change default mode in `convertMode()` (#1283 #1284)
- SamsungAC: Unit tests to help debug poor signal (#1277 #1280)
- Add question & note about VS1838b use to issue template. (#1281)
- rewrite ir_Corona (#1274)
- tools/mkkeywords: Fix minor parsing issue. (#1272)
- Add Zhongxian Li to Contributers.md (#1270)
- rewrite Carrier (#1269)
- rewrite ir_Argo by using bit field (#1264)
- rewrite ir_Amcor by using bit field (#1263)
- Update Fujitsu supported model info.
- Clarify the scope of the LittleFS breaking change.
crankyoldgit added a commit that referenced this pull request Oct 2, 2020
_v2.7.11 (20201002)_

**[Features]**
- Transcold: Add detailed support. (#1256 #1278)
- Airwell/Whirlpool: Add handling of previous state to `.toCommon()` (#1275 #1276)
- IRMQTTServer: Change how MQTT packet/buffer size is set. (#1271)
- Fujitsu: Add support for timers. (#1255 #1261 #1262)
- Neoclima: Add Economy & Fahrenheit support (#1260 #1265)
- Technibel: Cleanup and code fixes/improvements. (#1259 #1266)
- Technibel: Add detailed A/C support (#1259)
- Transcold: Add basic support. (#1256 #1258)

**[Misc]**
- refactor ir_Delonghi (#1285)
- Whirlpool: Change default mode in `convertMode()` (#1283 #1284)
- SamsungAC: Unit tests to help debug poor signal (#1277 #1280)
- Add question & note about VS1838b use to issue template. (#1281)
- rewrite ir_Corona (#1274)
- tools/mkkeywords: Fix minor parsing issue. (#1272)
- Add Zhongxian Li to Contributers.md (#1270)
- rewrite Carrier (#1269)
- rewrite ir_Argo by using bit field (#1264)
- rewrite ir_Amcor by using bit field (#1263)
- Update Fujitsu supported model info.
- Clarify the scope of the LittleFS breaking change.
@crankyoldgit crankyoldgit mentioned this pull request Oct 2, 2020
siriuslzx pushed a commit that referenced this pull request Oct 4, 2020
* Regenerate Doxygen documentation

* v2.7.11 release
_v2.7.11 (20201002)_

**[Features]**
- Transcold: Add detailed support. (#1256 #1278)
- Airwell/Whirlpool: Add handling of previous state to `.toCommon()` (#1275 #1276)
- IRMQTTServer: Change how MQTT packet/buffer size is set. (#1271)
- Fujitsu: Add support for timers. (#1255 #1261 #1262)
- Neoclima: Add Economy & Fahrenheit support (#1260 #1265)
- Technibel: Cleanup and code fixes/improvements. (#1259 #1266)
- Technibel: Add detailed A/C support (#1259)
- Transcold: Add basic support. (#1256 #1258)

**[Misc]**
- refactor ir_Delonghi (#1285)
- Whirlpool: Change default mode in `convertMode()` (#1283 #1284)
- SamsungAC: Unit tests to help debug poor signal (#1277 #1280)
- Add question & note about VS1838b use to issue template. (#1281)
- rewrite ir_Corona (#1274)
- tools/mkkeywords: Fix minor parsing issue. (#1272)
- Add Zhongxian Li to Contributers.md (#1270)
- rewrite Carrier (#1269)
- rewrite ir_Argo by using bit field (#1264)
- rewrite ir_Amcor by using bit field (#1263)
- Update Fujitsu supported model info.
- Clarify the scope of the LittleFS breaking change.
@crankyoldgit
Copy link
Owner

FYI, the changes mentioned above have now been included in the new v2.7.11 release of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants