Ultrawipf / OpenFFBoard

OpenFFBoard is a universal force feedback interface for DIY simulation devices
https://hackaday.io/project/163904-open-ffboard
MIT License
558 stars 117 forks source link

Splitting FFBWheel mainclass for 1 and 2 axes #59

Closed Ultrawipf closed 2 years ago

Ultrawipf commented 2 years ago

This adds a second HID descriptor reporting only 1 FFB axis and 2 separate mainclasses implementing the previous FFBWheel functions using 1 axis and 2 axis descriptors. This removes the axis command from the mainclass and the axis manager does not store the axis count anymore because the mainclass sets it at startup.

Fixes LFS force feedback which does modulate constant force correctly when a 2 axis device is detected.

LFS has published a patch for 2 axis devices and it seems like a 2 axis descriptor has better compatibility with old directinput apis like used by fedit and possible some games so for now the single axis mainclass still uses the 2 axis descriptor with the option to change to the single axis descriptor by commenting out the FFBWHEEL_USE_2AXIS_DESC in target_constants which might be done in the future if a fix is found making a single axis descriptor work fully.

Changes: Added CAN button source Added CAN analog source CAN port has commands to change speed and send data Removed CAN settings from vesc and odrive -> moved to CAN port Split FFBWheel mainclass into 1 and 2 axis Added I2C fast mode 400kHz