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

Rework matchData() to handle equal total data bit time protocols. #408

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

crankyoldgit
Copy link
Owner

  • Give up on specific cpu-time optimised for matching data to save on overall
    code space/usage.
  • Improves readablity & simplicty of the function.
  • Now supports two more protocol types. More generic now.
    e.g. equal total data bit time, and arbitary mark/space timing for bit values.
  • Unit tests to cover those cases & supported protocol types.

Ref #406

* Give up on specific cpu-time optimised for matching data to save on overall
  code space/usage.
* Improves readablity & simplicty of the function.
* Now supports two more protocol types. More generic now.
  e.g. equal total data bit time, and arbitary mark/space timing for bit values.
* Unit tests to cover those cases & supported protocol types.

Ref #406
Copy link
Collaborator

@darshkpatel darshkpatel left a comment

Choose a reason for hiding this comment

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

Haven't tested it, but looks promising

@crankyoldgit crankyoldgit merged commit 6f13468 into master Feb 2, 2018
@crankyoldgit
Copy link
Owner Author

@darshkpatel Thanks for the prompt review.

FYI, it is tested/covered by the new unit tests here: https://github.com/markszabo/IRremoteESP8266/blob/master/test/IRrecv_test.cpp#L451

Plus all the existing tests for other protocols (which use matchData()) also test/confirm it's work. That's the beauty of unit tests and test coverage. If it broke something when I re-wrote it, it would complain with errors in the Travis build process. Thankfully, you hardly see them. I see them as I write the code and I run the tests before it's committed (and fix it if it did break something. Oh yes, the tests pick up lots of bugs in my code before I submit ;-)

@crankyoldgit crankyoldgit deleted the equal_total_data_bit_time branch March 2, 2018 12:32
crankyoldgit added a commit that referenced this pull request Mar 2, 2018
**[Bug Fixes]**
- Ensure the IR LED is off before we start. (#405)

**[Features]**
- Experimental decode support for Gree HVAC units (#397)
- Initial support for Haier A/Cs. (#409)
- Improve timing accuracy of unit tests. (#403)
- Rework matchData() to handle equal total data bit time protocols. (#408)

**[Misc]**
- Add startup text to IRrecvDumpV2 and IRrecvDemo (#412)
- Tweak timings on Fujitsu A/C header (#418)
- AutoAnalyseRawData.sh: Add some support for handling larger than 64 bit codes. (#419)
- Use better comments for send GPIO in examples. (#425)
@crankyoldgit crankyoldgit mentioned this pull request Mar 2, 2018
crankyoldgit added a commit that referenced this pull request Mar 2, 2018
**[Bug Fixes]**
- Ensure the IR LED is off before we start. (#405)

**[Features]**
- Experimental decode support for Gree HVAC units (#397)
- Initial support for Haier A/Cs. (#409)
- Improve timing accuracy of unit tests. (#403)
- Rework matchData() to handle equal total data bit time protocols. (#408)

**[Misc]**
- Add startup text to IRrecvDumpV2 and IRrecvDemo (#412)
- Tweak timings on Fujitsu A/C header (#418)
- AutoAnalyseRawData.sh: Add some support for handling larger than 64 bit codes. (#419)
- Use better comments for send GPIO in examples. (#425)
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.

2 participants