could this work?

This commit is contained in:
rusefi 2020-04-03 16:14:29 -04:00
parent 16ada2d85d
commit fcef353b12
2 changed files with 6 additions and 0 deletions

View File

@ -118,7 +118,9 @@ void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engine->sensors.iat = getIntakeAirTemperatureM(PASS_ENGINE_PARAMETER_SIGNATURE);
#if !EFI_CANBUS_SLAVE
engine->sensors.clt = getCoolantTemperatureM(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif /* EFI_CANBUS_SLAVE */
// todo: reduce code duplication with 'getCoolantTemperature'
if (engineConfiguration->auxTempSensor1.adcChannel != EFI_ADC_NONE) {

View File

@ -60,6 +60,10 @@ void processCanRxMessage(const CANRxFrame& frame, Logging* logger, efitick_t now
} else if (frame.EID == CONFIG(verboseCanBaseAddress) + CAN_SENSOR_1_OFFSET) {
int16_t mapScaled = *reinterpret_cast<const int16_t*>(&frame.data8[0]);
canMap = mapScaled / (1.0 * PACK_MULT_PRESSURE);
uint8_t cltShifted = *reinterpret_cast<const uint8_t*>(&frame.data8[2]);
#if EFI_CANBUS_SLAVE
engine->sensors.clt = cltShifted - PACK_ADD_TEMPERATURE;
#endif /* EFI_CANBUS_SLAVE */
} else {
obdOnCanPacketRx(frame);
}