new temperature sensor math in TS (#1297)
* switch * new sensor printing * typo * and printing info Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
8190971fc8
commit
ccee238867
|
@ -204,18 +204,7 @@ static void printSensors(Logging *log) {
|
||||||
#endif
|
#endif
|
||||||
// why do we still send data into console in text mode?
|
// why do we still send data into console in text mode?
|
||||||
|
|
||||||
if (hasCltSensor()) {
|
Sensor::showAllSensorInfo(log);
|
||||||
reportSensorF(log, "CLT", "C", getCoolantTemperature(), 2); // log column #4
|
|
||||||
}
|
|
||||||
|
|
||||||
SensorResult tps = Sensor::get(SensorType::Tps1);
|
|
||||||
if (tps) {
|
|
||||||
reportSensorF(log, "TPS", "%", tps.Value, 2); // log column #5
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasIatSensor()) {
|
|
||||||
reportSensorF(log, "IAT", "C", getIntakeAirTemperature(), 2); // log column #7
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
if (hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||||
reportSensorF(log, GAUGE_NAME_VBAT, "V", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), 2); // log column #6
|
reportSensorF(log, GAUGE_NAME_VBAT, "V", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), 2); // log column #6
|
||||||
|
@ -703,9 +692,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
executorStatistics();
|
executorStatistics();
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
float coolant = getCoolantTemperature();
|
|
||||||
float intake = getIntakeAirTemperature();
|
|
||||||
|
|
||||||
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE);
|
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
// header
|
// header
|
||||||
|
@ -713,10 +699,14 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
|
|
||||||
// offset 0
|
// offset 0
|
||||||
tsOutputChannels->rpm = rpm;
|
tsOutputChannels->rpm = rpm;
|
||||||
// offset 4
|
|
||||||
tsOutputChannels->coolantTemperature = coolant;
|
SensorResult clt = Sensor::get(SensorType::Clt);
|
||||||
// offset 8
|
tsOutputChannels->coolantTemperature = clt.Value;
|
||||||
tsOutputChannels->intakeAirTemperature = intake;
|
tsOutputChannels->isCltError = !clt.Valid;
|
||||||
|
|
||||||
|
SensorResult iat = Sensor::get(SensorType::Iat);
|
||||||
|
tsOutputChannels->intakeAirTemperature = iat.Value;
|
||||||
|
tsOutputChannels->isIatError = !iat.Valid;
|
||||||
|
|
||||||
SensorResult auxTemp1 = Sensor::get(SensorType::AuxTemp1);
|
SensorResult auxTemp1 = Sensor::get(SensorType::AuxTemp1);
|
||||||
tsOutputChannels->auxTemp1 = auxTemp1.Value;
|
tsOutputChannels->auxTemp1 = auxTemp1.Value;
|
||||||
|
@ -889,9 +879,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
#endif /* EFI_VEHICLE_SPEED */
|
#endif /* EFI_VEHICLE_SPEED */
|
||||||
#endif /* EFI_PROD_CODE */
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
tsOutputChannels->isCltError = !hasCltSensor();
|
|
||||||
tsOutputChannels->isIatError = !hasIatSensor();
|
|
||||||
|
|
||||||
tsOutputChannels->fuelConsumptionPerHour = engine->engineState.fuelConsumption.perSecondConsumption;
|
tsOutputChannels->fuelConsumptionPerHour = engine->engineState.fuelConsumption.perSecondConsumption;
|
||||||
|
|
||||||
tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter;
|
tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter;
|
||||||
|
|
|
@ -422,16 +422,7 @@ void printTPSInfo(void) {
|
||||||
|
|
||||||
static void printTemperatureInfo(void) {
|
static void printTemperatureInfo(void) {
|
||||||
#if EFI_ANALOG_SENSORS
|
#if EFI_ANALOG_SENSORS
|
||||||
printThermistor("CLT", &engineConfiguration->clt, &engine->engineState.cltCurve,
|
Sensor::showAllSensorInfo(&logger);
|
||||||
engineConfiguration->useLinearCltSensor);
|
|
||||||
if (!isValidCoolantTemperature(getCoolantTemperature())) {
|
|
||||||
scheduleMsg(&logger, "CLT sensing error");
|
|
||||||
}
|
|
||||||
printThermistor("IAT", &engineConfiguration->iat, &engine->engineState.iatCurve,
|
|
||||||
engineConfiguration->useLinearIatSensor);
|
|
||||||
if (!isValidIntakeAirTemperature(getIntakeAirTemperature())) {
|
|
||||||
scheduleMsg(&logger, "IAT sensing error");
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduleMsg(&logger, "fan=%s @ %s", boolToString(enginePins.fanRelay.getLogicValue()),
|
scheduleMsg(&logger, "fan=%s @ %s", boolToString(enginePins.fanRelay.getLogicValue()),
|
||||||
hwPortname(engineConfiguration->fanPin));
|
hwPortname(engineConfiguration->fanPin));
|
||||||
|
|
Loading…
Reference in New Issue