-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix knock retard table init #419
fix knock retard table init #419
Conversation
column and row definition were swapped w/re: value lookup fixes FOME-Tech#246, FOME-Tech#417
While you are fixing this defect root cause is order of arguments on the method. See rusefi changes flipping it. |
I haven't confirmed this; this statement might be an overreach. I'm also not sure this mistake explains how
I'll check that out soon; had looked at it just a little before. As well, the type system should be able to save us from mistakes like this somehow. "traits" naively come to mind but I'm admittedly unfamiliar; the standard kit (pre-traits) should be able to do it though too if I'm not mistaken. |
@rk-iv has effected this change by altering the TS maxKnockRetardTable = array, U08, 19556, [6x6], "deg", 0.25, 0, 0, 30, 2
-maxKnockRetardLoadBins = array, U08, 19592, [6], "%", 1, 0, 0, 250, 0
-maxKnockRetardRpmBins = array, U08, 19598, [6], "RPM", 100.0, 0, 0, 25000, 0
+maxKnockRetardRpmBins = array, U08, 19592, [6], "%", 1, 0, 0, 250, 0
+maxKnockRetardLoadBins = array, U08, 19598, [6], "RPM", 100.0, 0, 0, 25000, 0 table = maxKnockRetardTbl, maxKnockRetardMap, "Max knock retard", 1
- xBins = maxKnockRetardRpmBins, RPMValue
- yBins = maxKnockRetardLoadBins, ignitionLoad
+ xBins = maxKnockRetardLoadBins, RPMValue
+ yBins = maxKnockRetardRpmBins, ignitionLoad
zBins = maxKnockRetardTable
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. It doesn't fully solve the problem; the CLFC off->on dance is still required to achieve desired effect. |
5d7be9a
to
dbe240b
Compare
I found that |
@@ -8,10 +8,14 @@ | |||
#include "pch.h" | |||
#include "knock_logic.h" | |||
|
|||
void KnockController::init(engine_configuration_s const * const previousConfig) { | |||
m_maxRetardTable.init(config->maxKnockRetardTable, config->maxKnockRetardLoadBins, config->maxKnockRetardRpmBins); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note this flips the load/rpm bins to match the current implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the minimal diff to fix the bug, sigh
if that's the case, and it seems to be the case, I assume the most important next step is to make sure such a defect never occurs again? rusefi/rusefi#6461 |
no need for previousConfig (or any config ref); use the current config
column and row definition were swapped w/re: value lookup
fixes #246, #417
Andrey was right: #417 (comment)
Comparison to boost; RPM is columns:
boost:
knock: