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

How the ISR function handle the filtering out first high pulse in SYNC bit #487

Open
HuynhKhuong opened this issue Apr 9, 2023 · 0 comments

Comments

@HuynhKhuong
Copy link

HuynhKhuong commented Apr 9, 2023

Hello, I have one concern when analyzing source code, In function handling the reception side.

Specifically, in source code RCSwitch.cpp - function receiveProtocol() line 639:

*  ______________
     * |              |____________|XXXXXXXXXXXXX|
     *
     * |-filtered out-|--1st dur--|--Start data--|
     *
     * The 2nd saved duration starts the data
     */

The author mentioned that the first high pulse in SYNC phase is filtered out and not stored in timing[] array. I assumed that this point is done in the ISR function, which would be invoked anytime there's a change in signal level in a configured Input pin. (check RCSwitch.cpp - function handleInterrupt - 671). However, I didn't find any LOC that do the filtering logic.

Can someone clarify this point for me? Where the filtering stuff is done?

Thanks in advance!

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

No branches or pull requests

1 participant