Improve how we blend the stored and current joystick value.
Before this commit, when in mode 1, a stored assist value was
overridden by any joystick use. This means that increasing a joystick
assist value requires us to reduce from stored down to manually
requested value, creating a small jerk as power is instantly changed.
Now, combine the joystick and stored value if they are in the same
direction. If a stored value is (absolutely) greater than the current
joystick position, the stored value takes precedence. This allows us
to carefully adjust-up or adjust-down assist without jerking the
drivetrain around.
Out-of-scope
Blending with OEM ECM values; this PR is an incremental improvement.
WIP:
[ ] Fix bug in implementation of "feat: mode1: Use live or stored joystick value, whichever is greater":
WIP, because: failed testing: when using this code, pressing the
joystick just past the neutral position range in the assist direction
causes it to override [the stored value] if you're close to the neutral range. I believe
this comes from JOYSTICKNEUTRAL{MAX,MIN}_PERCENT not adequately
filtering out cases?
Improve how we blend the stored and current joystick value.
Before this commit, when in mode 1, a stored assist value was overridden by any joystick use. This means that increasing a joystick assist value requires us to reduce from stored down to manually requested value, creating a small jerk as power is instantly changed.
Now, combine the joystick and stored value if they are in the same direction. If a stored value is (absolutely) greater than the current joystick position, the stored value takes precedence. This allows us to carefully adjust-up or adjust-down assist without jerking the drivetrain around.
Out-of-scope
Blending with OEM ECM values; this PR is an incremental improvement.
WIP: