Add EPC gauge, fix airflow variable

This commit is contained in:
David Holdeman 2024-04-08 22:06:31 -05:00 committed by rusefillc
parent c76dbb8a98
commit 57352718a7
3 changed files with 4 additions and 2 deletions

View File

@ -112,8 +112,8 @@ void Generic4TransmissionController::setPcState(gear_e gear) {
}
if (pcts) {
float duty = 0.01f * interpolate2d(engine->fuelComputer.sdAirMassInOneCylinder, config->tcu_pcAirmassBins, *pcts);
pcPwm.setSimplePwmDutyCycle(duty);
pressureControlDuty = interpolate2d(engine->engineState.airflowEstimate, config->tcu_pcAirmassBins, *pcts);
pcPwm.setSimplePwmDutyCycle(0.01f * pressureControlDuty);
}
}

View File

@ -3,4 +3,5 @@ struct_no_prefix tcu_controller_s
uint16_t autoscale tcRatio;@@GAUGE_NAME_TC_RATIO@@;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
float lastShiftTime
uint8_t tcu_currentRange;"TCU: Current Range";"", 1, 0, 0, 0, 0
int8_t pressureControlDuty;"TCU: EPC Duty";"%",1,0,0,100,0
end_struct

View File

@ -1637,6 +1637,7 @@ gaugeCategory = Transmission
tcRatioGauge = tcRatio, @@GAUGE_NAME_TC_RATIO@@, "", 0, 100, 0, 0, 100, 100, 4, 4
shiftTimeGauge = lastShiftTime, "Last Shift Time", "S", 0, 2, 0, 0, 2, 2, 4, 4
idealEngineTorqueGauge = idealEngineTorque, "idealEngineTorque", "", 0, 100, 0, 0, 100, 100, 4, 4
pressureControlGauge = pressureControlDuty, "EPC Duty Cycle", "%", 0, 100, 0, 0, 100, 100, 0, 0
gaugeCategory = Knock
knock1Gauge = m_knockCyl1, "Knock Cyl 1", "dBv", -60, 10, -60, -60, 10, 10, 0, 0