Gear detection based on RPM to VSS ratio #3779
This commit is contained in:
parent
71b2dc762a
commit
e4043cacda
|
@ -533,9 +533,11 @@ static void updateVvtSensors() {
|
|||
|
||||
static void updateVehicleSpeed(int rpm) {
|
||||
#if EFI_VEHICLE_SPEED
|
||||
float vehicleSpeed = Sensor::getOrZero(SensorType::VehicleSpeed);
|
||||
engine->outputChannels.vehicleSpeedKph = vehicleSpeed;
|
||||
engine->outputChannels.speedToRpmRatio = vehicleSpeed / rpm;
|
||||
float vehicleSpeedKph = Sensor::getOrZero(SensorType::VehicleSpeed);
|
||||
float wheelRPM = vehicleSpeedKph * 1000 / 60 / (2 * CONST_PI * engineConfiguration->wheelDiameter);
|
||||
float driveshaftRpm = wheelRPM * engineConfiguration->finalGearRatio;
|
||||
engine->outputChannels.vehicleSpeedKph = vehicleSpeedKph;
|
||||
engine->outputChannels.speedToRpmRatio = rpm / driveshaftRpm;
|
||||
#endif /* EFI_VEHICLE_SPEED */
|
||||
}
|
||||
|
||||
|
|
|
@ -985,7 +985,7 @@ gaugeCategory = Sensors - Extra 2
|
|||
knockLevelGauge = knockLevel,"Knock level", "V", 0, 7, 10, 10, 100, 100, 1, 2
|
||||
knockCountGauge = knockCount, "Knock count", "count", 0, 10000, 0, 0, 10000, 10000, 0, 0
|
||||
fuelTankLevelGauge = fuelTankLevel,"Fuel level", "%", 0, 100, 10, 20, 100, 100, 1, 1
|
||||
speedToRpmRatioGauge = speedToRpmRatio, "speed2rpm", "", 0, 100, 0, 0, 100, 100, 4, 4
|
||||
speedToRpmRatioGauge = speedToRpmRatio, "gearbox ratio", "", 0, 100, 0, 0, 100, 100, 4, 4
|
||||
wastegatePosGauge = wastegatePositionSensor, @@GAUGE_NAME_WG_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
idlePosSensGauge = idlePositionSensor, @@GAUGE_NAME_IDLE_POSITION@@, "%", 0, 100, 0, 0, 100, 100, 1, 1
|
||||
currentEnginePhaseGauge = currentEnginePhase, "Engine Phase", "deg", 0, 720, 0, 0, 720, 720, 0, 0
|
||||
|
|
Loading…
Reference in New Issue