etb rev limit indicator (#4483)
This commit is contained in:
parent
80a1c25512
commit
65d7abc162
|
@ -332,8 +332,13 @@ expected<percent_t> EtbController::getSetpointEtb() {
|
||||||
auto etbRpmLimit = engineConfiguration->etbRevLimitStart;
|
auto etbRpmLimit = engineConfiguration->etbRevLimitStart;
|
||||||
if (etbRpmLimit != 0) {
|
if (etbRpmLimit != 0) {
|
||||||
auto fullyLimitedRpm = etbRpmLimit + engineConfiguration->etbRevLimitRange;
|
auto fullyLimitedRpm = etbRpmLimit + engineConfiguration->etbRevLimitRange;
|
||||||
|
|
||||||
|
float targetPositionBefore = targetPosition;
|
||||||
// Linearly taper throttle to closed from the limit across the range
|
// Linearly taper throttle to closed from the limit across the range
|
||||||
targetPosition = interpolateClamped(etbRpmLimit, targetPosition, fullyLimitedRpm, 0, rpm);
|
targetPosition = interpolateClamped(etbRpmLimit, targetPosition, fullyLimitedRpm, 0, rpm);
|
||||||
|
|
||||||
|
// rev limit active if the position was changed by rev limiter
|
||||||
|
etbRevLimitActive = absF(targetPosition - targetPositionBefore) > 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
float minPosition = engineConfiguration->etbMinimumPosition;
|
float minPosition = engineConfiguration->etbMinimumPosition;
|
||||||
|
|
|
@ -10,5 +10,6 @@ float luaAdjustment
|
||||||
float etbIntegralError;;"", 1, 0, -10000, 10000, 3
|
float etbIntegralError;;"", 1, 0, -10000, 10000, 3
|
||||||
float etbCurrentTarget;;"%", 1, 0, -10000, 10000, 3
|
float etbCurrentTarget;;"%", 1, 0, -10000, 10000, 3
|
||||||
|
|
||||||
|
bit etbRevLimitActive
|
||||||
|
|
||||||
end_struct
|
end_struct
|
|
@ -1362,6 +1362,7 @@ gaugeCategory = Outputs
|
||||||
indicator = { sd_logging_internal }, "SD logging", "SD logging", white, black, green, black
|
indicator = { sd_logging_internal }, "SD logging", "SD logging", white, black, green, black
|
||||||
indicator = { sd_msd }, "SD USB", "SD USB", white, black, green, black
|
indicator = { sd_msd }, "SD USB", "SD USB", white, black, green, black
|
||||||
indicator = { isPumpOn }, "No Pump", "Pump", white, black, green, black
|
indicator = { isPumpOn }, "No Pump", "Pump", white, black, green, black
|
||||||
|
indicator = { etbRevLimitActive }, "", "ETB RPM Limit", white, black, yellow, black
|
||||||
|
|
||||||
; looks like TS would append four system indicators below: Data Logging, ???, Not Connected, Protocol Error
|
; looks like TS would append four system indicators below: Data Logging, ???, Not Connected, Protocol Error
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue