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

A method to halt/pause IRrecv? #1436

Closed
Duckle29 opened this issue Mar 22, 2021 · 2 comments
Closed

A method to halt/pause IRrecv? #1436

Duckle29 opened this issue Mar 22, 2021 · 2 comments
Assignees
Labels

Comments

@Duckle29
Copy link

Hi there. I've been looking through the doxygen and the code itself, and from what I can tell there is no method that's the inverse of resume

I'm working on a project that uses IRsend to send a state to an AC when it gets a message over MQTT. It however also listens for the stock remote using IRrecv to keep track of the latest state.

Because of this I'm not always decoding a message before sending one, and can't rely on the receiving being paused from that. is there any IRrecv::halt or similar, and if not what would it take to make one? Is it as simple as:

void IRrecv::halt(void) {
  params.recvstate = kStopState;
}

Or are there other things that have to be set like stopping interrupts and such?

@Duckle29
Copy link
Author

And after looking over while posting this I found disableIRIn() I'll use that for now. Is there any value in adding a halt() or would disableIRIn() always be preferable?

@crankyoldgit crankyoldgit self-assigned this Mar 22, 2021
@crankyoldgit
Copy link
Owner

or would disableIRIn() always be preferable?

You got it in one. disableIRIn() & enableIRIn() are the way to do this. They are preferred, as they free/set up the interrupts & timers etc.

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

No branches or pull requests

2 participants