blend result returns blend parameter value for TS UI

This commit is contained in:
Matthew Kennedy 2023-04-02 13:50:34 -07:00
parent 416cfa1a92
commit 1bc1e76efa
2 changed files with 5 additions and 2 deletions

View File

@ -461,7 +461,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(
@ -472,7 +472,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 getCylinderAngle(uint8_t cylinderIndex, uint8_t cylinderNumber);
// Table blending helpers
struct BlendResult {
// Input blend parameter (lookup to bias table)
float BlendParameter;
// Bias in percent (0-100%)
float Bias;