mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 07:02:01 +00:00
remove my notes
This commit is contained in:
parent
85b26762ee
commit
8cdfdc2e10
@ -1,54 +0,0 @@
|
||||
matrix scanning:
|
||||
|
||||
scan values
|
||||
put values in SMA filter:
|
||||
for each key, there is a sma filter instance
|
||||
the filter takes in a 2^4=16 values in a circular buffer
|
||||
3 variables: 4 -> 2^4 -> uint16_t[2^4]
|
||||
state variable: is filter initialized for this key?
|
||||
pointer: where in the circular buffer are we?
|
||||
sum: sum of values in the circular buffer, so that we don't have to access the whole buffer, just 2 elements.
|
||||
|
||||
special case: initialization
|
||||
return unfiltered value if the buffer is not filled yet
|
||||
|
||||
get value out, update sensor boundaries only if sma initialized
|
||||
|
||||
on minipad, TRAVEL_DISTANCE_IN_0_01MM is set to 400, which is the range of motion switches have.
|
||||
i.e. at rest - bottomed out = 4mm
|
||||
|
||||
sensor calibration logic:
|
||||
on rephlex, the sensors are updated only when they are at their highest, at the start and in a maintaince task that runs periodically:
|
||||
|
||||
|
||||
on minipad, the sensors are updated dynamically when they are actuated on an ougoing basis:
|
||||
There is an up deadzone and a down deadzone
|
||||
|
||||
|
||||
|
||||
|
||||
calebrate key if this is first pass
|
||||
|
||||
|
||||
run algos on the key:
|
||||
regular(look at the methods already implemented)
|
||||
rapid trigger:
|
||||
1.
|
||||
default boundaries are hysteresis values, reset state once reached
|
||||
(if continuous rapid trigger, reset state only if fully released)
|
||||
2.
|
||||
when rapid trigger state is false
|
||||
if value is in rapid trigger zone, press and set rapid trigger state
|
||||
if state is false && lower than lower hysteresis, press key and set rapid trigger state
|
||||
3.
|
||||
when rapid trigger state is true
|
||||
if pressed && left rt zone or value is 'sensitivity' above peak, release
|
||||
if not pressed and key is in trigger zone and value is sensitivity below peak, press
|
||||
|
||||
4. if a new peak is observed, update it in the key structure
|
||||
peak here is a up or down, since keeping track of both doesn't make sense
|
||||
|
||||
https://www.desmos.com/calculator/qtbbjbsyvi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user