Crate kiibohd_hall_effect
source ·Structs
Stores incoming raw samples
Calculations:
d = linearized(adc sample) –> distance
v = (d - d_prev) / 1 –> velocity
a = (v - v_prev) / 2 –> acceleration
j = (a - a_prev) / 3 –> jerk
Sense data is store per ADC source element (e.g. per key)
The analysis is stored in a queue, where old values expire out
min/max is used to handle offsets from the distance lookups
Higher order calculations assume a constant unit of time between measurements
Any division is left to compile-time comparisions as it’s not necessary
to actually compute the final higher order values in order to make a decision.
This diagram can give a sense of how the incoming data is used.
The number represents the last ADC sample required to calculate the value.
Sense stats include statistically information about the sensor data
Enums
Calibration status indicates if a sensor position is ready to send
analysis for a particular key.