Open Hurricos opened 8 months ago
48dea11 -> c1c56df cleaned up some whitespace issues.
c1c56df -> b90c773 renamed map_suggestedCMDPWR_VS_TPS
to map_suggestedCMDPWR_TPS_VSS
.
Note that the top commit of this PR increases:
RAM: +90B ROM: +552B
The ROM increase is primarily due to the size of 2d_map.cpp, but each uint8_t of each of map_TPS
, map_VSS
, map_suggestedCMDPWR_TPS_VSS
takes up 2B of RAM and ROM. Believe it's possible to move these to PROGMEM to avoid the RAM side.
Corrections needed in order of concern:
BRAKE does not, but should, override all other inputs.
There is no error detection for TPS.
Neutral is not considered.
Bug somewhere in blending: https://github.com/doppelhub/MuddersMIMA/pull/6#issue-2062548544
With this commit, blend a mapped "suggested" CMDPWR value based on the vehicle speed and TPS into the actual CMDPWR in LiControl mode 1.
The mapping is constructed so as to promote the use of IMA power at low throttle. This reduces the fatigue of using the IMA joystick, essentially allows regen to occur (for driving comfort) as soon as driving begins, and (for the CVT specifically) generates a driving habit which links IMA torque to engine torque, sparing the CVT from miscalculating total torque.
Work-in-progress, as it probably needs to be gated behind TRANSMISSION_IS_CVT.
Also, I need to find out why brake detection isn't working consistently.
Notes
This also requires the vehicle-speed PR, as we rely on knowing the vehicle speed in order to feed the map.