Jump to content

Recommended Posts

Posted (edited)

So I bought a ICS comm panel for a UH-60M trainer and because it doesn't report as a regular input device(its a HID Input) I've spent the last couple weeks wrestling AI to write python code to read the input reports from it and send it to Vjoy so that it can be used in any program. Next, I worked on controlling the LEDs which was another hurtle as there's zero documents for this so luckily once I dumped the HID descriptors and gave it to the AI it was able to get them turning on and after some troubleshooting I was able to control everything individually. Coming to today, I was able to connect it to DCSBios using UDP server and was able to have it control the LEDs. one of the features I added in my code was to set the brightness of the indicator lights(one of them is flashing) to be max if the backlighting is off but then matches when its on so that it could be seen in a lit environment(may be unnecessary once the 47 comes out)

I've still got some GUI work to do but all of the tough stuff is finished. for context I have very little coding knowledge but with the mighty ChatGPT4o I was able to get what was pretty much a brick to me into a working device! once the CH-47 comes out(it has the same panel) and DCS Bios has a module for it ill be getting this fully working in game, cant wait!

some features I've been able to implement:

-GUI to control lighting w/ ability to adjust PID/VID if necessary(mainly for testing)
-A sort of filtering as the device I got had a rotary encoder which would give weird outputs when rotating it.
-Button and gauge indicators to show button presses
-Ability to set Vjoy device numbers used(needs two due to amount of Pots)
-selector switch reports 11 possible values to one report which are sent as 11 different buttons in Vjoy

TODO:

-Ability to edit in the GUI what exports control what LEDs
-GUI improvements
-Make the program self contained so Python doesn't need to be installed
-probably random other stuff top keep me busy haha

Edited by TrevorMcNeill
  • Like 1
Posted

Nice work with the help of AI. Can't wait to see more from you. The clip is a little to dark to see what's really going on.

Does it run on another Windows PC or a Raspberry Pi?

Regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted (edited)
6 hours ago, Vinc_Vega said:

Nice work with the help of AI. Can't wait to see more from you. The clip is a little to dark to see what's really going on.

Does it run on another Windows PC or a Raspberry Pi?

Regards, Vinc

Yeah, I tried to get it to show the best I could. in it, the lights dim til the backlighting shuts off making the indicator light go to max brightness all of which was done using the a-10c console light brightness and master caution exports. It runs on USB on the same computer but doesn't report as a input device, UDP was the only way to get it to interface with DCS Bios. I can try to explain more if needed, I'm terrible at explaining things 😂😂

Edited by TrevorMcNeill
Posted (edited)

Thank’s for the update!

I asked because still planning to get panels working based on Raspberry Pi, but still am at the beginning of the steep learning curve for Python and Pygame. As I’m old-fashioned, I probably need to read more books on that topic – using AI is no option to me.     😉

My sketches are based on reverse engineering FSIan’s example for the CDU display

https://github.com/jboecker/python-dcs-bios-example/tree/master

Parts of the A-10C HSI already are working. Thereby, the Pi is connected by a LAN cable to the PC in UDP mode. I didn’t get a TCP connection between my Laptop and the Pi yet. Haven’t tried the Wi-Fi option as well.

Still trying to iron out some issues. For example, when pausing the sim or exiting the mission the HSI still turns a few seconds. My impression is, that the values are stored somewhere in a buffer and that slows down the display. You may see some delay between hearing the clicks in the above clip and the response of the arrows. The longer the online time, the more is the delay.

 

Best Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted (edited)
1 hour ago, Vinc_Vega said:

The longer the online time, the more is the delay.

Can you send the code? Also one way you could troubleshoot the delay is by looking at the respective export values in the DCSBios web display(or whatever it's called) and see if it's delayed there as well or just to the display.

 

I'm note super smart with all of this but I've become decent at trouleshooting. If it starts with it being very responsive and then is getting slower over time it sounds like maybe there's something like a memory leak or something clogging up the PIs memory making it slower to respond

Edited by TrevorMcNeill
  • 2 weeks later...
Posted

@TrevorMcNeill

I've found the issue.

Uncommenting the "print all addresses and values to the monitor" function solved the buffering problem for me  😉

 

Best regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted
On 6/2/2024 at 8:40 PM, Vinc_Vega said:

@TrevorMcNeill

I've found the issue.

Uncommenting the "print all addresses and values to the monitor" function solved the buffering problem for me  😉

 

Best regards, Vinc

Ha! Yeah that would cause a memory leak for sure!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...