Skip to content

Commit

Permalink
FUJITSU: Improve handling of short (command only) messages. (#1784)
Browse files Browse the repository at this point in the history
* add previous state support to `toCommon()`
Try to better keep the settings if we can when using the `IRac` class interface, if supplied a previous state. This better handles the short commands that don't have most of the settings in them.
Add unit tests to ensure it works as expected.
* Change `toString()` behaviour.
If we only have info from a _real_ short (command only) message, don't report other settings.
This makes text for single messages more accurate.
If the Class's state has been modified synthetically, report all the settings.

For #1780
  • Loading branch information
crankyoldgit authored Apr 14, 2022
1 parent 1e2c1d8 commit a2f7955
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 121 deletions.
2 changes: 1 addition & 1 deletion src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4252,7 +4252,7 @@ namespace IRAcUtils {
case decode_type_t::FUJITSU_AC: {
IRFujitsuAC ac(kGpioUnused);
ac.setRaw(decode->state, decode->bits / 8);
*result = ac.toCommon();
*result = ac.toCommon(prev);
break;
}
#endif // DECODE_FUJITSU_AC
Expand Down
Loading

0 comments on commit a2f7955

Please sign in to comment.