Add TC duty cycle gauge

This commit is contained in:
David Holdeman 2024-04-10 15:47:29 -05:00 committed by rusefillc
parent bf93a7f7b5
commit 134c472d0c
3 changed files with 5 additions and 0 deletions

View File

@ -56,11 +56,14 @@ void Generic4TransmissionController::setTccState(gear_e gear) {
int lockSpeed = interpolate2d(tps.Value, config->tcu_tccTpsBins, config->tcu_tccLockSpeed);
int unlockSpeed = interpolate2d(tps.Value, config->tcu_tccTpsBins, config->tcu_tccUnlockSpeed);
if (vss.Value > lockSpeed) {
torqueConverterDuty = 100;
enginePins.tcuTccOnoffSolenoid.setValue(1);
} else if (vss.Value < unlockSpeed) {
torqueConverterDuty = 0;
enginePins.tcuTccOnoffSolenoid.setValue(1);
}
} else {
torqueConverterDuty = 0;
enginePins.tcuTccOnoffSolenoid.setValue(0);
}
}

View File

@ -4,5 +4,6 @@ struct_no_prefix tcu_controller_s
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
int8_t torqueConverterDuty;"TCU: TC Duty";"%",1,0,0,100,0
bit isShifting;
end_struct

View File

@ -1638,6 +1638,7 @@ gaugeCategory = Transmission
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
torqueConverterGauge = torqueConverterDuty, "TC 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