-
Notifications
You must be signed in to change notification settings - Fork 836
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
refactor ir_Fujitsu #1419
refactor ir_Fujitsu #1419
Conversation
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.
I've already had a quick review of it after your second commit (i.e. fixing the fall thru warning.) and I saw the errors in model detection/creation etc.
It looked okay so far, but I need to spend some solid time reviewing this as you know, this is/was a complex beast of a IR class.
i.e. Expect a couple of days or so turn around on the review.
I see you've already fixed the mistakes that the IRac unit tests uncovered.
Anyway. Congrats for tackling this one, its about as tough/complex as they come.
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.
As usual, your work is great. Thanks ever so much for do this, and for tackling this horrible code monster.
// Enable bit for the Off/Sleep timer | ||
setBit(&remote_state[12], 3, getOffSleepTimer()); | ||
_.OffTimerEnable = _.OffTimer > 0; |
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.
Technically I think you can get away with:
_.OffTimerEnable = _.OffTimer;
As a non-zero value for a uint
is classed as true. But, this is probably safer/more readable ... so treat this is just a FYI. (i.e. no action required)
src/ir_Fujitsu.cpp
Outdated
result.quiet = (getFanSpeed() == kFujitsuAcFanQuiet); | ||
result.turbo = getCmd() == kFujitsuAcCmdPowerful; | ||
result.econo = getCmd() == kFujitsuAcCmdEcono; | ||
result.quiet = (_.Fan == kFujitsuAcFanQuiet); |
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.
Just to be consistent with the style of the next two statements:
result.quiet = _.Fan == kFujitsuAcFanQuiet;
This may be my last PR, and it's been a good time :-) |
I accidentally ordered revert, what do we do now? |
Revert was requested after merge, the revert is only in this PR and not in master correct? It could be just ignored? |
I believe @NiKiZe is correct. As it happened after the merge, it doesn't affect the |
_v2.7.16 (20210324)_ **[Features]** - ToshibaAC: Swing handling and `setRaw()` improvements. (#1423 #1424 #1425) - Support for XMP (Xfinity) protocol. (#1414 #1422) - ToshibaAC: Adjust inter-message gap timing to improve matching. (#1420 #1421) - Ecoclim: Add detailed A/C support (#1397 #1415) **[Misc]** - [ESP32] Fix `addApbChangeCallback(): duplicate func` kernel msgs (#1434 #1435) - refactor ir_Fujitsu (#1419) - refactor ir_Whirlpool (#1416) - refactor ir_Vestel (#1413) - refactor ir_Trotec (#1412)
## _v2.7.16 (20210324)_ **[Features]** - ToshibaAC: Swing handling and `setRaw()` improvements. (#1423 #1424 #1425) - Support for XMP (Xfinity) protocol. (#1414 #1422) - ToshibaAC: Adjust inter-message gap timing to improve matching. (#1420 #1421) - Ecoclim: Add detailed A/C support (#1397 #1415) **[Misc]** - [ESP32] Fix `addApbChangeCallback(): duplicate func` kernel msgs (#1434 #1435) - refactor ir_Fujitsu (#1419) - refactor ir_Whirlpool (#1416) - refactor ir_Vestel (#1413) - refactor ir_Trotec (#1412)
FYI, the aforementioned changes have been included in the new v2.7.16 release for the library. |
I use platformIO to build and compare the space size on wemos d1 mini,the configuration is as follows:
and the size(in unit Byte) of object file is as follows:
saving about 1KB.
Then I use platformIO inspect tools to analysis the memory use of examples, and the result(Ram and flash) is as follows:
saving about 400B.
Finally I use Then I use Arduino IDE (1.8.13) to compile the example TurnOnFujitsuAC, and the result is as follows:
save only 32B. I'm not very satisfied with the result.