diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index cbf7901b93..be1cfc5fdb 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -34,35 +34,35 @@ bit isTps2Error; bit isIdleClosedLoop; bit isIdleCoasting; -uint16_t autoscale rpm;;"",1, 0, 0, 0, 0 +uint16_t autoscale RPMValue;;"RPM",1, 0, 0, 0, 0 -uint16_t rpmAcceleration;;"",1, 0, 0, 0, 0 +uint16_t rpmAcceleration;;"RPM/s",1, 0, 0, 0, 0 - uint16_t autoscale speedToRpmRatio;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 - uint8_t autoscale vehicleSpeedKph;;"",1, 0, 0, 0, 0 - uint8_t autoscale internalMcuTemperature;;"",1, 0, 0, 0, 0 + uint16_t autoscale speedToRpmRatio;;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + uint8_t autoscale vehicleSpeedKph;;"kph",1, 0, 0, 0, 0 + uint8_t autoscale internalMcuTemperature;;"deg C",1, 0, 0, 0, 0 - uint16_t autoscale coolantTemperature;;"",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 - uint16_t autoscale intakeAirTemperature;;"",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 + uint16_t autoscale coolant;;"deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 + uint16_t autoscale intake;;"deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 - uint16_t autoscale auxTemp1;;"",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 - uint16_t autoscale auxTemp2;;"",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 + uint16_t autoscale auxTemp1;;"deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 + uint16_t autoscale auxTemp2;;"deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0, 0, 0, 0 - uint16_t autoscale throttlePosition;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 - uint16_t autoscale pedalPosition;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + uint16_t autoscale TPSValue;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + uint16_t autoscale throttlePedalPosition;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 uint16_t tpsADC;;"", 1, 0, 0, 0, 0 - uint16_t autoscale massAirFlowVoltage;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale MAFValue;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 - uint16_t autoscale massAirFlow;;"",{1/@@PACK_MULT_MASS_FLOW@@}, 0, 0, 0, 0 - uint16_t autoscale manifoldAirPressure;;"",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0 + uint16_t autoscale massAirFlowValue;;"",{1/@@PACK_MULT_MASS_FLOW@@}, 0, 0, 0, 0 + uint16_t autoscale MAPValue;;"",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0 uint16_t autoscale baroPressure;;"",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0 - uint16_t autoscale lambda;;"",{1/@@PACK_MULT_LAMBDA@@}, 0, 0, 0, 0 + uint16_t autoscale lambdaValue;;"",{1/@@PACK_MULT_LAMBDA@@}, 0, 0, 0, 0 uint8_t autoscale knockRetard;;"",{1/10}, 0, 0, 0, 0 uint8_t unused37;;"",1, 0, 0, 0, 0 - uint16_t autoscale vBatt;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale VBatt;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 uint16_t autoscale oilPressure;;"",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0 uint16_t autoscale vvtPositionB1I;;"",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 0 diff --git a/firmware/console/binary/ts_outputs_generated.h b/firmware/console/binary/ts_outputs_generated.h index 4a11a248a9..5479aaf47c 100644 --- a/firmware/console/binary/ts_outputs_generated.h +++ b/firmware/console/binary/ts_outputs_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:15:07 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:43:13 EST 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -102,49 +102,58 @@ struct ts_outputs_s { offset 0 bit 31 */ bool isIdleCoasting : 1 {}; /** + RPM * offset 4 */ - scaled_channel rpm = (uint16_t)0; + scaled_channel RPMValue = (uint16_t)0; /** + RPM/s * offset 6 */ uint16_t rpmAcceleration = (uint16_t)0; /** + value * offset 8 */ scaled_channel speedToRpmRatio = (uint16_t)0; /** + kph * offset 10 */ scaled_channel vehicleSpeedKph = (uint8_t)0; /** + deg C * offset 11 */ scaled_channel internalMcuTemperature = (uint8_t)0; /** + deg C * offset 12 */ - scaled_channel coolantTemperature = (uint16_t)0; + scaled_channel coolant = (uint16_t)0; /** + deg C * offset 14 */ - scaled_channel intakeAirTemperature = (uint16_t)0; + scaled_channel intake = (uint16_t)0; /** + deg C * offset 16 */ scaled_channel auxTemp1 = (uint16_t)0; /** + deg C * offset 18 */ scaled_channel auxTemp2 = (uint16_t)0; /** * offset 20 */ - scaled_channel throttlePosition = (uint16_t)0; + scaled_channel TPSValue = (uint16_t)0; /** * offset 22 */ - scaled_channel pedalPosition = (uint16_t)0; + scaled_channel throttlePedalPosition = (uint16_t)0; /** * offset 24 */ @@ -152,15 +161,15 @@ struct ts_outputs_s { /** * offset 26 */ - scaled_channel massAirFlowVoltage = (uint16_t)0; + scaled_channel MAFValue = (uint16_t)0; /** * offset 28 */ - scaled_channel massAirFlow = (uint16_t)0; + scaled_channel massAirFlowValue = (uint16_t)0; /** * offset 30 */ - scaled_channel manifoldAirPressure = (uint16_t)0; + scaled_channel MAPValue = (uint16_t)0; /** * offset 32 */ @@ -168,7 +177,7 @@ struct ts_outputs_s { /** * offset 34 */ - scaled_channel lambda = (uint16_t)0; + scaled_channel lambdaValue = (uint16_t)0; /** * offset 36 */ @@ -180,7 +189,7 @@ struct ts_outputs_s { /** * offset 38 */ - scaled_channel vBatt = (uint16_t)0; + scaled_channel VBatt = (uint16_t)0; /** * offset 40 */ @@ -620,4 +629,4 @@ struct ts_outputs_s { }; // end -// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:15:07 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:43:13 EST 2021 diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 22a3f2a30e..7042e49d21 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -18,22 +18,22 @@ static scaled_channel packedTime; // todo: we are at the edge of sdLogBuffer size and at the moment we have no code to make sure buffer does not overflow // todo: make this logic smarter static constexpr LogField fields[] = { - {tsOutputChannels.rpm, GAUGE_NAME_RPM, "rpm", 0}, + {tsOutputChannels.RPMValue, GAUGE_NAME_RPM, "rpm", 0}, {packedTime, GAUGE_NAME_TIME, "sec", 0}, {tsOutputChannels.totalTriggerErrorCounter, GAUGE_NAME_TRG_ERR, "err", 0}, {tsOutputChannels.vehicleSpeedKph, GAUGE_NAME_VVS, "kph", 0}, {tsOutputChannels.internalMcuTemperature, GAUGE_NAME_CPU_TEMP, "C", 0}, - {tsOutputChannels.coolantTemperature, GAUGE_NAME_CLT, "C", 1}, - {tsOutputChannels.intakeAirTemperature, GAUGE_NAME_IAT, "C", 1}, + {tsOutputChannels.coolant, GAUGE_NAME_CLT, "C", 1}, + {tsOutputChannels.intake, GAUGE_NAME_IAT, "C", 1}, {tsOutputChannels.auxTemp1, GAUGE_NAME_AUX_TEMP1, "C", 1}, {tsOutputChannels.auxTemp2, GAUGE_NAME_AUX_TEMP2, "C", 1}, - {tsOutputChannels.throttlePosition, GAUGE_NAME_TPS, "%", 2}, + {tsOutputChannels.throttlePedalPosition, GAUGE_NAME_TPS, "%", 2}, {tsOutputChannels.throttle2Position, GAUGE_NAME_TPS2, "%", 2}, - {tsOutputChannels.pedalPosition, GAUGE_NAME_THROTTLE_PEDAL, "%", 2}, - {tsOutputChannels.manifoldAirPressure, GAUGE_NAME_MAP, "kPa", 1}, + {tsOutputChannels.throttlePedalPosition, GAUGE_NAME_THROTTLE_PEDAL, "%", 2}, + {tsOutputChannels.MAPValue, GAUGE_NAME_MAP, "kPa", 1}, {tsOutputChannels.airFuelRatio, GAUGE_NAME_AFR, "afr", 2}, {tsOutputChannels.airFuelRatio2, GAUGE_NAME_AFR2, "afr", 2}, - {tsOutputChannels.lambda, GAUGE_NAME_LAMBDA, "", 3}, + {tsOutputChannels.lambdaValue, GAUGE_NAME_LAMBDA, "", 3}, {tsOutputChannels.lambda2, GAUGE_NAME_LAMBDA2, "", 3}, {tsOutputChannels.warningCounter, GAUGE_NAME_WARNING_COUNTER, "", 0}, {tsOutputChannels.lastErrorCode, GAUGE_NAME_WARNING_LAST, "", 0}, @@ -59,7 +59,7 @@ static constexpr LogField fields[] = { {tsOutputChannels.debugFloatField5, GAUGE_NAME_DEBUG_F5, "", 3}, {tsOutputChannels.debugFloatField6, GAUGE_NAME_DEBUG_F6, "", 3}, {tsOutputChannels.debugFloatField7, GAUGE_NAME_DEBUG_F7, "", 3}, - {tsOutputChannels.vBatt, GAUGE_NAME_VBAT, "v", 2}, + {tsOutputChannels.VBatt, GAUGE_NAME_VBAT, "v", 2}, {tsOutputChannels.oilPressure, GAUGE_NAME_OIL_PRESSURE, GAUGE_NAME_FUEL_PRESSURE_HIGH_UNITS, 0}, {tsOutputChannels.lowFuelPressure, GAUGE_NAME_FUEL_PRESSURE_LOW, GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS, 0}, {tsOutputChannels.highFuelPressure, GAUGE_NAME_FUEL_PRESSURE_HIGH, GAUGE_NAME_FUEL_PRESSURE_HIGH_UNITS, 0}, @@ -97,7 +97,7 @@ static constexpr LogField fields[] = { {tsOutputChannels.fuelTankLevel, GAUGE_NAME_FUEL_LEVEL, "%", 0}, {tsOutputChannels.fuelingLoad, GAUGE_NAME_FUEL_LOAD, "%", 1}, {tsOutputChannels.ignitionLoad, GAUGE_NAME_IGNITION_LOAD, "%", 1}, - {tsOutputChannels.massAirFlow, GAUGE_NAME_AIR_FLOW, "kg/h", 1}, + {tsOutputChannels.massAirFlowValue, GAUGE_NAME_AIR_FLOW, "kg/h", 1}, {tsOutputChannels.tcuDesiredGear, GAUGE_NAME_DESIRED_GEAR, "gear", 0}, {tsOutputChannels.tcuCurrentGear, GAUGE_NAME_CURRENT_GEAR, "gear", 0}, {tsOutputChannels.flexPercent, GAUGE_NAME_FLEX, "%", 1}, diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 855b8707d5..c1a605d595 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -457,11 +457,11 @@ extern HIP9011 instance; static void updateTempSensors() { SensorResult clt = Sensor::get(SensorType::Clt); - tsOutputChannels.coolantTemperature = clt.Value; + tsOutputChannels.coolant = clt.Value; tsOutputChannels.isCltError = !clt.Valid; SensorResult iat = Sensor::get(SensorType::Iat); - tsOutputChannels.intakeAirTemperature = iat.Value; + tsOutputChannels.intake = iat.Value; tsOutputChannels.isIatError = !iat.Valid; SensorResult auxTemp1 = Sensor::get(SensorType::AuxTemp1); @@ -473,7 +473,7 @@ static void updateTempSensors() { static void updateThrottles() { SensorResult tps1 = Sensor::get(SensorType::Tps1); - tsOutputChannels.throttlePosition = tps1.Value; + tsOutputChannels.TPSValue = tps1.Value; tsOutputChannels.isTpsError = !tps1.Valid; tsOutputChannels.tpsADC = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1Primary)); @@ -483,14 +483,14 @@ static void updateThrottles() { tsOutputChannels.isTps2Error = !tps2.Valid && Sensor::hasSensor(SensorType::Tps2Primary); SensorResult pedal = Sensor::get(SensorType::AcceleratorPedal); - tsOutputChannels.pedalPosition = pedal.Value; + tsOutputChannels.throttlePedalPosition = pedal.Value; // Only report fail if you have one (many people don't) tsOutputChannels.isPedalError = !pedal.Valid && Sensor::hasSensor(SensorType::AcceleratorPedalPrimary); } static void updateLambda() { float lambdaValue = Sensor::getOrZero(SensorType::Lambda1); - tsOutputChannels.lambda = lambdaValue; + tsOutputChannels.lambdaValue = lambdaValue; tsOutputChannels.airFuelRatio = lambdaValue * engine->engineState.stoichiometricRatio; float lambda2Value = Sensor::getOrZero(SensorType::Lambda2); @@ -539,18 +539,18 @@ static void updateRawSensors() { tsOutputChannels.rawOilPressure = Sensor::getRaw(SensorType::OilPressure); tsOutputChannels.rawLowFuelPressure = Sensor::getRaw(SensorType::FuelPressureLow); tsOutputChannels.rawHighFuelPressure = Sensor::getRaw(SensorType::FuelPressureHigh); - tsOutputChannels.massAirFlowVoltage = Sensor::getRaw(SensorType::Maf); + tsOutputChannels.MAFValue = Sensor::getRaw(SensorType::Maf); tsOutputChannels.rawWastegatePositionSensor = Sensor::getRaw(SensorType::WastegatePosition); tsOutputChannels.rawIdlePositionSensor = Sensor::getRaw(SensorType::IdlePosition); } static void updatePressures() { tsOutputChannels.baroPressure = Sensor::getOrZero(SensorType::BarometricPressure); - tsOutputChannels.manifoldAirPressure = Sensor::getOrZero(SensorType::Map); + tsOutputChannels.MAPValue = Sensor::getOrZero(SensorType::Map); tsOutputChannels.oilPressure = Sensor::get(SensorType::OilPressure).Value; } static void updateMiscSensors() { - tsOutputChannels.vBatt = Sensor::getOrZero(SensorType::BatteryVoltage); + tsOutputChannels.VBatt = Sensor::getOrZero(SensorType::BatteryVoltage); tsOutputChannels.idlePositionSensor = Sensor::getOrZero(SensorType::IdlePosition); @@ -692,7 +692,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) { tsOutputChannels->tsConfigVersion = TS_FILE_VERSION; // offset 0 - tsOutputChannels->rpm = rpm; + tsOutputChannels->RPMValue = rpm; updateSensors(rpm); updateFuelInfo(); @@ -703,7 +703,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels) { tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration(); // offset 108 // For air-interpolated tCharge mode, we calculate a decent massAirFlow approximation, so we can show it to users even without MAF sensor! - tsOutputChannels->massAirFlow = getAirFlowGauge(); + tsOutputChannels->massAirFlowValue = getAirFlowGauge(); // offset 116 // TPS acceleration tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getMaxDelta(); diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index aefef399d4..d7ed1792dc 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -224,8 +224,8 @@ enable2ndByteCanID = false internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 - auxt1 = scalar, S16, 16, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 - auxt2 = scalar, S16, 18, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + auxTemp1 = scalar, S16, 16, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 + auxTemp2 = scalar, S16, 18, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 ; throttle, pedal @@ -1105,8 +1105,8 @@ gaugeCategory = Sensors - Extra 1 internalMcuTemperatureGauge = internalMcuTemperature, @@GAUGE_NAME_ECU_TEMPERATURE@@, "C", 0, 100, 0, 0, 75, 100, 0, 0 OilPressGauge = oilPressure, @@GAUGE_NAME_OIL_PRESSURE@@, @@GAUGE_NAME_OIL_PRESSURE_UNITS@@, 0, 750, 35, 75, 550, 700, 0, 0 idleAirValvePositionGauge = idleAirValvePosition, "Idle position", "%", 0, 100, 0, 0, 100, 100, 1, 1 - AuxT1Gauge = auxt1, @@GAUGE_NAME_AUX_TEMP1@@, "C", -40, 140, -15, 1, 95, 110, 1, 1 - AuxT2Gauge = auxt2, @@GAUGE_NAME_AUX_TEMP2@@, "C", -40, 140, -15, 1, 95, 110, 1, 1 + AuxT1Gauge = auxTemp1, @@GAUGE_NAME_AUX_TEMP1@@, "C", -40, 140, -15, 1, 95, 110, 1, 1 + AuxT2Gauge = auxTemp2, @@GAUGE_NAME_AUX_TEMP2@@, "C", -40, 140, -15, 1, 95, 110, 1, 1 lowFuelPressureGauge = lowFuelPressure, @@GAUGE_NAME_FUEL_PRESSURE_LOW@@, @@GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS@@, 0, 700, 0, 0, 700, 700, 1, 0 highFuelPressureGauge = highFuelPressure, @@GAUGE_NAME_FUEL_PRESSURE_HIGH@@, @@GAUGE_NAME_FUEL_PRESSURE_HIGH_UNITS@@, 0, 200, 0, 0, 200, 200, 1, 0 flexPercentGauge = flexPercent, @@GAUGE_NAME_FLEX@@, "%", 0, 100, 0, 0, 100, 100, 0, 0