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

Add ability to load config from lirc remote file #15

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ajuniper
Copy link

I added a program irsling.cpp that uses irslinger.h to transmit codes loaded from a lirc remote control config file. I've only tested it with an NEC remote and a raw remote but believe it should work with RC5 too. (Apologies for using c++ but there were so many things which would have been a PITA in c but easy in c++).

g++ -o irsling irsling.cpp -lpigpio -lm -lpthread
sudo ./irsling -p pinnumber -f lircconfigfile buttonname buttonname buttonname ...

It can load multiple remotes and you can combine transmissions to >1 remote:

sudo ./irsling -p pinnumber -f lircconfigfile -f lircconfigfile remotename.buttonname remotename.buttonname remotename.buttonname ...

To make this work I had to break the existing transmission functions down in to distinct components but have kept the existing APIs unchanged, with the exception that you can now also pass a hex string e.g. 0x1ee1f30c instead of a binary string for the codes.

I also fixed a couple of type mismatches which caused compile failures with c++.

@bschwind
Copy link
Owner

Thanks for the PR! It'll take me some time to look over, and I'm starting to think I should re-work this library to be a bit cleaner. I wrote this almost 4 years ago, and I probably have more C experience now to make it better.

I'd also like to move all the non-C versions to another directory so it's more clear where other language implementations should go. When I have some free time I'll make that change, as I'd like to add a Rust port as well.

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

Successfully merging this pull request may close these issues.

2 participants