Skip to content

Conversation

@GarryBGoode
Copy link

@GarryBGoode GarryBGoode commented Jun 7, 2025

Added idle timeout to wireless mode - controller will automatically go to sleep after 2 minutes.

Added variance and standard deviation as a new measurement value during calibration.
Standard deviation is saved to NVM config - this is why config version is updated.
Variance (standard deviation squared) is used for optimal balance between IMU0 and IMU1.
User needs to re-calibrate after SW update.

Added extra reporting in wired mode - this is for fixing a reported issue that the thumbstick value can get stuck outside of center. The thumbstick would reset to center at the next button press, this shows some reports ended up lost. So the extra reporting steps help with the issue - though not sure about any side effects.

Removed gyro oversampling, perform 1 read per update.
Enabled internal LPF1 (cutoff at 223Hz) for gyro and accel to compensate oversampling.

Increased tick frequency to 1kHz - and then down to 500Hz frequency.
It is able to run in 1kHz in wired mode, but not in wireless mode.
Note: XINPUT on Ubuntu might be limited to 500Hz on PC - this took way too long to debug.
Wireless can reach about 480Hz as measured by poll-tester app, so there is still a bit of packet loss somewhere.

Added compensation math for tick frequency, overall sensitivity should not change with frequency change.
This also applies to thumbstick smoothing, delay from smoothing should not change with tick frequency change.

Added rotation_fast.c and .h, which is an approximate rotation math setup, this is used for gyro absolute reporting.
This was necessary to be able to reach 1kHz update rate.

Removed tick frequency from Dongle software, dongle should just run as fast as it can.
Alpakka and Dongle sw update needed.
Tried updating wireless_submodule (llama), but in the end it is not necessary. SW works with wireless submodule for official SW ver. 1.1.0.

Tested on alpakka v1.0, both wired and wireless mode.

GarryBGoode and others added 24 commits June 7, 2025 13:28
Removed oversampling, perform 1 read per update. Enabled internal LPF1 for gyro and accel. Increased tick frequency to 1kHz. Added compensation math for tick frequency, overall sensitivity should not change with frequency change.
Added large number of gyro defines to be used later.
Added rotation_fast.c and .h, which is an approximate rotation math setup, this can be used later for absolute angle tracking at 1kHz.
Changed gyro report absolue  to use actual elapsed microseconds in hopes of better accuracy.
Added calibration routine for std. deviations of accelearation and gyro.
Std deviation (or variance) is used in IMU processing to make optimal balance between 2 gyros.
…ased now. If gyro rate is higher than 100dps as a vector, measurement switches to the 500dps range IMU. Small refinement of fast rotation.
…de that's preventing 1kHz. Lowered IMU filter frequency to accomodate 500Hz. Added compensator for thumbstick smoothing so that percieved speed of smoothing is the same while changing tick frequency.
…lly go to sleep after 2 minutes of inactivity.
… can. It will update USB as soon as it receives anything.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant