mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-04-22 15:11:27 +00:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
commit
86c841c525
@ -129,7 +129,7 @@ static int8_t move_unit(uint8_t axis) {
|
|||||||
|
|
||||||
// x**2 acceleration (quadratic, more precise for short movements)
|
// x**2 acceleration (quadratic, more precise for short movements)
|
||||||
int16_t percent = (inertia << 8) / mk_time_to_max;
|
int16_t percent = (inertia << 8) / mk_time_to_max;
|
||||||
percent = (percent * percent) >> 8;
|
percent = ((int32_t)percent * percent) >> 8;
|
||||||
if (inertia < 0) percent = -percent;
|
if (inertia < 0) percent = -percent;
|
||||||
|
|
||||||
// unit = sign(inertia) + (percent of max speed)
|
// unit = sign(inertia) + (percent of max speed)
|
||||||
|
Loading…
Reference in New Issue
Block a user