-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support IR in the simulator with FLIRC #93
base: main
Are you sure you want to change the base?
Conversation
This allows the simulator to send and receive ir remote codes by leveraging a relatively cheap off the shelf USB device. https://flirc.tv/products/flirc-usb-receiver https://www.amazon.com/dp/B01NBRBWS6 Currently the msys2 package repo doesn't have a i686 build available of libusb https://packages.msys2.org/base/mingw-w64-libusb
Opened as a draft as it needs a little more cleanup, but I wanted to judge interest before I finished it up. |
@@ -0,0 +1,11 @@ | |||
unsigned long reverseBits(unsigned long n) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some wild reason the remote codes in the flirc sdk are backwards from the arudino library
Do I understand correctly: you are using the FLIRC for sending IR codes, and the FLIRC needs to be connected to the PC where the simulator is running on? So this is a little bit different to the way this device is intended to be used. Normally it will be connected e.g. to a Fire TV and receives IR codes. Correct? Edit: according to the code and your very first message, the PR is both for sending and receiving IR codes. Cool. |
I ordered a FLIRC. Sounds interesting. Didn't know of this device before. |
For me the file
What it probably should be:
Otherwise the submodule will not be cloned. |
I have a problem compiling with Windows 64 bit. Maybe you can help out.
BTW: Although not listed here https://packages.msys2.org/base/mingw-w64-libusb , I succesfully could install Edit: the problem was the missing index. Deleting the stamp files fixed the error. Edit 2: The underlying problem is something different. It is fine that
Isn't the .stamp file dangerous? If you pull a new version of flirc/sdk, |
I think
should be
Otherwise you get
instead of
|
When turning on the IR receiver, the FLIRC seems to get into trouble when sending. If you try to send after the receiver was on, you often get
After that, the FLIRC seems to stay in a broken state or at least in the wrong state. You have to unplug it to get it working again. Maybe you explicitely have to leave the receive modus?
|
When sending with FLIRC, there always seems to be one additional (empty?) message to be sent. I changed
With that, sending looks like this.
|
I suppose we can just remove the .stamp file if running the index on that archive every build is fine. I'm using the ir library that flirc provides to generate the waveform data from the scan codes and I wonder if it's doing something slightly different than what the arudino library is doing. |
Also that git module thing just depends on how you have git setup, but yeah the http will work in more environments |
https://github.com/DDRBoxman/OMOTE/actions/runs/12538772245/job/34964259865#step:5:226 Looks like the msys2 installer step can't find that libusb package. Do you know if |
Ok,
To get it running in the workflow, I did not find a better solution than this: Replace (delete the last two lines)
with
On https://packages.msys2.org/base/mingw-w64-libusb they reference the new https://packages.msys2.org/base/mingw-w64-libusb-win32, but it seems it cannot simply be replaced. Do you know more about it? References: |
I think https://packages.msys2.org/base/mingw-w64-libusb-win32 is for the libusb 0.1 api but we want the 1.0+ api |
@DDRBoxman are you waiting for more feedback from my side? And I think the first two todos from your list in the first post are still open, right? |
Yeah, still working on this one hopefully I'll have some time soon to clean it up some more. |
This allows the simulator to send and receive ir remote codes by leveraging a relatively cheap off the shelf USB device.
https://flirc.tv/products/flirc-usb-receiver
https://www.amazon.com/dp/B01NBRBWS6
Simulator continues to work as expected without a device
Todo: