Issue #10161 was closed two years ago, and I feel that a lot has changed since then.
I was able to add gyro support to my Apex 4 simply by following the code for the Vader 3 Pro. I think the reason is that the Apex 4 has a lot in common with both the Vader 3 and Vader 4. I assume that the problem now is not reading the gyro data, but determining whether the gyro is actually working or not.
I couldn't find a way to force-enable the gyro (perhaps this is possible through the controller's software). However, the standard air mouse mode, which can be enabled with a button, sends raw gyro data. It has to be enabled again every time the controller is powered on. If the air mouse is turned off, the bytes remain stuck at their last values, which is a problem.
I had an idea to read the gyro and accelerometer data and check whether they have changed or not. If they remain unchanged, increment a counter. If the counter reaches N, forcibly zero out the data to prevent it from getting stuck. If the values start changing again, that would mean the gyro is active again, and the counter can be reset. These values contain a lot of noise and change very frequently when the air mouse mode is enabled.
At a polling rate of 1000 Hz, I think N = 100 should be sufficient. Would this be enough to add gyro support to SDL?
Issue #10161 was closed two years ago, and I feel that a lot has changed since then.
I was able to add gyro support to my Apex 4 simply by following the code for the Vader 3 Pro. I think the reason is that the Apex 4 has a lot in common with both the Vader 3 and Vader 4. I assume that the problem now is not reading the gyro data, but determining whether the gyro is actually working or not.
I couldn't find a way to force-enable the gyro (perhaps this is possible through the controller's software). However, the standard air mouse mode, which can be enabled with a button, sends raw gyro data. It has to be enabled again every time the controller is powered on. If the air mouse is turned off, the bytes remain stuck at their last values, which is a problem.
I had an idea to read the gyro and accelerometer data and check whether they have changed or not. If they remain unchanged, increment a counter. If the counter reaches N, forcibly zero out the data to prevent it from getting stuck. If the values start changing again, that would mean the gyro is active again, and the counter can be reset. These values contain a lot of noise and change very frequently when the air mouse mode is enabled.
At a polling rate of 1000 Hz, I think N = 100 should be sufficient. Would this be enough to add gyro support to SDL?