cruwaller / rc_receiver_to_usb_hid

STM32F1xx based USB HID for SBUS/CRSF/GHST/ELRS receivers.
MIT License
56 stars 11 forks source link

8 analog channels and 32 buttons #8

Open relaxibus opened 1 year ago

relaxibus commented 1 year ago

Hi, your project is awesome! Would you add more analog channels and buttons?

cruwaller commented 1 year ago

Wow, which receiver has 40 channels? 👀

relaxibus commented 1 year ago

Just map different buttons on a single channel using different pwm values, same we do on our RC TX with the toggle switches. Example CH5 = flight modes with 5 to 6 different values.

cruwaller commented 1 year ago

Yeah, but my point is that receiver has to send 40 to make your requirement possible from conversion pov :)

I dont wanna include a special scenario into firmware itself. It is up to application to map channels as you stated (similar to FC). Receiver just send its native amount of channels to converter which then map those to USB packet and sends packet to PC...

Which receiver are you using?

relaxibus commented 1 year ago

TBS Nano

relaxibus commented 1 year ago

"Yeah, but my point is that receiver has to send 40 to make your requirement possible from conversion pov :)" not really, and yes, you're right, 32 buttons are too much for RC ;-) But lets take a standard Radiomaster RC TX16S Mark II as an example: 8 analog channels and at least 19 buttons. If you have Flight Modes, Flaps or other functions that uses more buttons values on a single channel, it would be good to reflect this also in the simulator.

cruwaller commented 1 year ago

CRSF can have up to 16 channels. I will make a version with full 16 channels and your application can then map those. This is similar case to flight controller or pwm receivers.

relaxibus commented 1 year ago

Cool, but can you map multiple PWM values on a single channel? Lets say Channel 8 = Flight Mode (1000 = Horizon, 1500 = Acro, 2000 = Manual).

cruwaller commented 1 year ago

That is up to your application to handle. This converter does not care about a function... Just pushes received channel values to PC using the USB game controller packet :)

relaxibus commented 1 year ago

yes, but you must assign the different PWM values to the different HID buttons. As now you just have a 1:1 mapping of the channels. If in the HID descriptor you need to define as many buttons related from the channels and PWM values inside a single channel, no? Was not able to find your HID descriptor for the axis and buttons.