blend result returns blend parameter value for TS UI

(cherry picked from commit 1bc1e76efa)
This commit is contained in:
Matthew Kennedy 2023-04-02 13:50:34 -07:00 committed by rusefi
parent 1b95021502
commit 2b6fd2315c
2 changed files with 5 additions and 2 deletions

View File

@ -456,7 +456,7 @@ BlendResult calculateBlend(blend_table_s& cfg, float rpm, float load) {
auto value = readGppwmChannel(cfg.blendParameter);
if (!value) {
return { 0, 0 };
return { 0, 0, 0 };
}
float tableValue = interpolate3d(
@ -467,7 +467,7 @@ BlendResult calculateBlend(blend_table_s& cfg, float rpm, float load) {
float blendFactor = interpolate2d(value.Value, cfg.blendBins, cfg.blendValues);
return { blendFactor, 0.01f * blendFactor * tableValue };
return { value.Value, blendFactor, 0.01f * blendFactor * tableValue };
}
#endif /* EFI_ENGINE_CONTROL */

View File

@ -70,6 +70,9 @@ angle_t getPerCylinderFiringOrderOffset(uint8_t cylinderIndex, uint8_t cylinderN
// Table blending helpers
struct BlendResult {
// Input blend parameter (lookup to bias table)
float BlendParameter;
// Bias in percent (0-100%)
float Bias;