Revert "reducing magic constants"

This reverts commit 032d8240
This commit is contained in:
rusefi 2019-12-21 15:02:17 -05:00
parent 01f8e04b0f
commit b9338b4047
6 changed files with 21 additions and 30 deletions

View File

@ -1408,8 +1408,6 @@
#define mafDecodingBins_offset_hex 2e20 #define mafDecodingBins_offset_hex 2e20
#define mafSensorType_offset 948 #define mafSensorType_offset 948
#define mafSensorType_offset_hex 3b4 #define mafSensorType_offset_hex 3b4
#define MAGIC_300_PACKING_MULT 300
#define MAGIC_30_PACKING_MULT 30
#define mainRelayPin_offset 706 #define mainRelayPin_offset 706
#define mainRelayPin_offset_hex 2c2 #define mainRelayPin_offset_hex 2c2
#define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset 752

View File

@ -1408,8 +1408,6 @@
#define mafDecodingBins_offset_hex 2e20 #define mafDecodingBins_offset_hex 2e20
#define mafSensorType_offset 948 #define mafSensorType_offset 948
#define mafSensorType_offset_hex 3b4 #define mafSensorType_offset_hex 3b4
#define MAGIC_300_PACKING_MULT 300
#define MAGIC_30_PACKING_MULT 30
#define mainRelayPin_offset 706 #define mainRelayPin_offset 706
#define mainRelayPin_offset_hex 2c2 #define mainRelayPin_offset_hex 2c2
#define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset 752

View File

@ -128,9 +128,6 @@ struct_no_prefix engine_configuration_s
#define RPM_1_BYTE_PACKING_MULT 50 #define RPM_1_BYTE_PACKING_MULT 50
#define VOLTAGE_1_BYTE_PACKING_DIV 0.02 #define VOLTAGE_1_BYTE_PACKING_DIV 0.02
#define MAGIC_30_PACKING_MULT 30
#define MAGIC_300_PACKING_MULT 300
#define FSIO_TABLE_8 8 #define FSIO_TABLE_8 8
#define FSIO_CURVE_8 8 #define FSIO_CURVE_8 8

View File

@ -225,14 +225,14 @@ fileVersion = { 20190701 }
; air flow/mass measurments ; air flow/mass measurments
MAFValue = scalar, U16, 26, "V",0.001, 0 MAFValue = scalar, U16, 26, "V",0.001, 0
massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0 massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0
MAPValue = scalar, U16, 30, "kPa",{1/@@MAGIC_30_PACKING_MULT@@}, 0.0 MAPValue = scalar, U16, 30, "kPa",{1/30}, 0.0
baroPressure = scalar, U16, 32, "kPa",{1/@@MAGIC_30_PACKING_MULT@@}, 0.0 baroPressure = scalar, U16, 32, "kPa",{1/30}, 0.0
AFRValue = scalar, U16, 34, "AFR",0.001, 0.0 AFRValue = scalar, U16, 34, "AFR",0.001, 0.0
engineLoad = scalar, U16, 36, "%", 0.01, 0.0 ; Blend of MAP and TPS, depends on algorithm engineLoad = scalar, U16, 36, "%", 0.01, 0.0 ; Blend of MAP and TPS, depends on algorithm
; misc sensors ; misc sensors
VBatt = scalar, U16, 38, "V",0.001, 0.0 VBatt = scalar, U16, 38, "V",0.001, 0.0
oilPressure = scalar, U16, 40, "kPa",{1/@@MAGIC_30_PACKING_MULT@@}, 0.0 oilPressure = scalar, U16, 40, "kPa",{1/30}, 0.0
vvtPosition = scalar, U16, 42, "deg", 0.02, 0 vvtPosition = scalar, U16, 42, "deg", 0.02, 0
; 10 bit TPS ADC value (from 0 to 1023 in 5v scale) ; 10 bit TPS ADC value (from 0 to 1023 in 5v scale)
@ -240,25 +240,25 @@ fileVersion = { 20190701 }
; fuel math ; fuel math
chargeAirMass = scalar, U16, 44, "g",0.001, 0 chargeAirMass = scalar, U16, 44, "g",0.001, 0
crankingFuelMs = scalar, U16, 46, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0.0 crankingFuelMs = scalar, U16, 46, "ms",{1/300}, 0.0
currentTargetAfr= scalar, U16, 48, "ratio",0.001, 0 currentTargetAfr= scalar, U16, 48, "ratio",0.001, 0
baseFuel = scalar, U16, 50, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0 baseFuel = scalar, U16, 50, "ms",{1/300}, 0
fuelRunning = scalar, U16, 52, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0 fuelRunning = scalar, U16, 52, "ms",{1/300}, 0
actualLastInjection=scalar,U16, 54, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0.0 actualLastInjection=scalar,U16, 54, "ms",{1/300}, 0.0
injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0 injectorDutyCycle=scalar, U08, 56, "%", 0.5, 0
veValue = scalar, U08, 57, "ratio", 0.5, 0 veValue = scalar, U08, 57, "ratio", 0.5, 0
injectionOffset = scalar, S16, 58, "deg", 0.02, 0 injectionOffset = scalar, S16, 58, "deg", 0.02, 0
tCharge = scalar, U16, 60, "deg C", 0.01, 0.0 tCharge = scalar, U16, 60, "deg C", 0.01, 0.0
; Corrections ; Corrections
injectorLagMs = scalar, U16, 62, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0.0 injectorLagMs = scalar, U16, 62, "ms",{1/300}, 0.0
iatCorrection = scalar, U16, 64, "%", 0.01, 0 iatCorrection = scalar, U16, 64, "%", 0.01, 0
cltCorrection = scalar, U16, 66, "%", 0.01, 0 cltCorrection = scalar, U16, 66, "%", 0.01, 0
baroCorrection = scalar, U16, 68, "%", 0.01, 0 baroCorrection = scalar, U16, 68, "%", 0.01, 0
fuelPidCorrection=scalar, S16, 70, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0 fuelPidCorrection=scalar, S16, 70, "ms",{1/300}, 0
; Wall model AE ; Wall model AE
wallFuelAmount = scalar, U16, 72, "ms",{1/@@MAGIC_300_PACKING_MULT@@}, 0 wallFuelAmount = scalar, U16, 72, "ms",{1/300}, 0
wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0 wallFuelCorrection=scalar, S16, 74, "ms",0.001, 0
; TPS/load AE ; TPS/load AE

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Dec 21 13:27:26 EST 2019 // this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Dec 21 12:07:30 EST 2019
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -928,8 +928,6 @@ public class Fields {
public static final int mafDecoding_offset = 10784; public static final int mafDecoding_offset = 10784;
public static final int mafDecodingBins_offset = 11808; public static final int mafDecodingBins_offset = 11808;
public static final int mafSensorType_offset = 948; public static final int mafSensorType_offset = 948;
public static final int MAGIC_300_PACKING_MULT = 300;
public static final int MAGIC_30_PACKING_MULT = 30;
public static final int mainRelayPin_offset = 706; public static final int mainRelayPin_offset = 706;
public static final int mainRelayPinMode_offset = 752; public static final int mainRelayPinMode_offset = 752;
public static final int mainUnusedEnd_offset = 4140; public static final int mainUnusedEnd_offset = 4140;

View File

@ -37,7 +37,7 @@ public enum Sensor {
// air flow/mass measurement // air flow/mass measurement
MAF("MAF", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 26, 0.001, BackgroundColor.MUD, 0, 5, "Volts"), MAF("MAF", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 26, 0.001, BackgroundColor.MUD, 0, 5, "Volts"),
MAP("MAP", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 28, 1.0 / MAGIC_30_PACKING_MULT, BackgroundColor.MUD, 20, 300, "kPa"), MAP("MAP", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, 28, 1.0 / 30, BackgroundColor.MUD, 20, 300, "kPa"),
AFR("A/F ratio", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, /*offset */ 34, 0.001, BackgroundColor.MUD, 10, 20, "afr"), AFR("A/F ratio", SensorCategory.SENSOR_INPUTS, FieldType.UINT16, /*offset */ 34, 0.001, BackgroundColor.MUD, 10, 20, "afr"),
@ -46,33 +46,33 @@ public enum Sensor {
// fuel math // fuel math
CHARGE_AIR_MASS("airmass", SensorCategory.OPERATIONS, FieldType.UINT16, 44, 0.001, BackgroundColor.MUD, 0, 3, "g/cyl"), CHARGE_AIR_MASS("airmass", SensorCategory.OPERATIONS, FieldType.UINT16, 44, 0.001, BackgroundColor.MUD, 0, 3, "g/cyl"),
crankingFuel(GAUGE_NAME_FUEL_CRANKING, SensorCategory.FUEL, FieldType.UINT16, 46, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 30, "ms"), crankingFuel(GAUGE_NAME_FUEL_CRANKING, SensorCategory.FUEL, FieldType.UINT16, 46, 1.0 / 300, BackgroundColor.MUD, 0, 30, "ms"),
TARGET_AFR("A/F target", SensorCategory.OPERATIONS, FieldType.INT16, 48, 0.001, BackgroundColor.MUD, 10, 20, "afr"), TARGET_AFR("A/F target", SensorCategory.OPERATIONS, FieldType.INT16, 48, 0.001, BackgroundColor.MUD, 10, 20, "afr"),
baseFuel(Fields.GAUGE_NAME_FUEL_BASE, SensorCategory.FUEL, FieldType.UINT16, 50, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 30, "ms"), baseFuel(Fields.GAUGE_NAME_FUEL_BASE, SensorCategory.FUEL, FieldType.UINT16, 50, 1.0 / 300, BackgroundColor.MUD, 0, 30, "ms"),
runningFuel(GAUGE_NAME_FUEL_RUNNING, SensorCategory.FUEL, FieldType.UINT16, 52, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 15, "ms"), runningFuel(GAUGE_NAME_FUEL_RUNNING, SensorCategory.FUEL, FieldType.UINT16, 52, 1.0 / 300, BackgroundColor.MUD, 0, 15, "ms"),
actualLastInjection(GAUGE_NAME_FUEL_LAST_INJECTION, SensorCategory.FUEL, FieldType.UINT16, /*offset */ 54, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 30, "ms"), actualLastInjection(GAUGE_NAME_FUEL_LAST_INJECTION, SensorCategory.FUEL, FieldType.UINT16, /*offset */ 54, 1.0 / 300, BackgroundColor.MUD, 0, 30, "ms"),
injectorDutyCycle(Fields.GAUGE_NAME_FUEL_INJ_DUTY, SensorCategory.FUEL, FieldType.UINT8, 56, 0.5, BackgroundColor.MUD, 0, 100, "%"), injectorDutyCycle(Fields.GAUGE_NAME_FUEL_INJ_DUTY, SensorCategory.FUEL, FieldType.UINT8, 56, 0.5, BackgroundColor.MUD, 0, 100, "%"),
veValue(GAUGE_NAME_FUEL_VE, SensorCategory.FUEL, FieldType.FLOAT, 57, 0.5, BackgroundColor.MUD, 0, 100, "%"), veValue(GAUGE_NAME_FUEL_VE, SensorCategory.FUEL, FieldType.FLOAT, 57, 0.5, BackgroundColor.MUD, 0, 100, "%"),
tCharge(GAUGE_NAME_TCHARGE, SensorCategory.FUEL, FieldType.FLOAT, 60, 0.01, BackgroundColor.MUD, 30, 140, "C"), tCharge(GAUGE_NAME_TCHARGE, SensorCategory.FUEL, FieldType.FLOAT, 60, 0.01, BackgroundColor.MUD, 30, 140, "C"),
// Corrections // Corrections
injectorLagMs(GAUGE_NAME_INJECTOR_LAG, SensorCategory.FUEL, FieldType.UINT16, 62, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 15, "ms"), injectorLagMs(GAUGE_NAME_INJECTOR_LAG, SensorCategory.FUEL, FieldType.UINT16, 62, 1.0 / 300, BackgroundColor.MUD, 0, 15, "ms"),
iatCorrection(GAUGE_NAME_FUEL_IAT_CORR, SensorCategory.FUEL, FieldType.INT16, 64, 0.01, BackgroundColor.MUD, 0, 5, "ratio"), iatCorrection(GAUGE_NAME_FUEL_IAT_CORR, SensorCategory.FUEL, FieldType.INT16, 64, 0.01, BackgroundColor.MUD, 0, 5, "ratio"),
cltCorrection(GAUGE_NAME_FUEL_CLT_CORR, SensorCategory.FUEL, FieldType.INT16, 66, 0.01, BackgroundColor.MUD, 0, 5, "ratio"), cltCorrection(GAUGE_NAME_FUEL_CLT_CORR, SensorCategory.FUEL, FieldType.INT16, 66, 0.01, BackgroundColor.MUD, 0, 5, "ratio"),
fuelPidCorrection("Fuel PID", SensorCategory.FUEL, FieldType.INT16, 70, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, -2, 2, "ms"), fuelPidCorrection("Fuel PID", SensorCategory.FUEL, FieldType.INT16, 70, 1.0 / 300, BackgroundColor.MUD, -2, 2, "ms"),
// Wall model AE // Wall model AE
wallFuelAmount(GAUGE_NAME_FUEL_WALL_AMOUNT, SensorCategory.FUEL, FieldType.UINT16, 72, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 20, "ms"), wallFuelAmount(GAUGE_NAME_FUEL_WALL_AMOUNT, SensorCategory.FUEL, FieldType.UINT16, 72, 1.0 / 300, BackgroundColor.MUD, 0, 20, "ms"),
wallFuelCorrection(GAUGE_NAME_FUEL_WALL_CORRECTION, SensorCategory.FUEL, FieldType.INT16, 74, 0.001, BackgroundColor.MUD, -5, 5, "ms"), wallFuelCorrection(GAUGE_NAME_FUEL_WALL_CORRECTION, SensorCategory.FUEL, FieldType.INT16, 74, 0.001, BackgroundColor.MUD, -5, 5, "ms"),
// TPS/load AE // TPS/load AE
engineLoadAccelDelta("load accel delta", SensorCategory.FUEL, FieldType.INT16, 76, 0.01, BackgroundColor.MUD, -5, 5, "ratio"), engineLoadAccelDelta("load accel delta", SensorCategory.FUEL, FieldType.INT16, 76, 0.01, BackgroundColor.MUD, -5, 5, "ratio"),
deltaTps(Fields.GAUGE_NAME_FUEL_TPS_ROC, SensorCategory.FUEL, FieldType.INT16, 78, 0.01, BackgroundColor.MUD, -100, 100, "%"), deltaTps(Fields.GAUGE_NAME_FUEL_TPS_ROC, SensorCategory.FUEL, FieldType.INT16, 78, 0.01, BackgroundColor.MUD, -100, 100, "%"),
tpsAccelFuel(Fields.GAUGE_NAME_FUEL_TPS_EXTRA, SensorCategory.FUEL, FieldType.INT16, 82, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 0, 200, "ms"), tpsAccelFuel(Fields.GAUGE_NAME_FUEL_TPS_EXTRA, SensorCategory.FUEL, FieldType.INT16, 82, 1.0 / 300, BackgroundColor.MUD, 0, 200, "ms"),
// Ignition // Ignition
ignitionAdvance("ignition timing", SensorCategory.OPERATIONS, FieldType.INT16, 84, 0.02, BackgroundColor.MUD, 30, 140, "deg"), ignitionAdvance("ignition timing", SensorCategory.OPERATIONS, FieldType.INT16, 84, 0.02, BackgroundColor.MUD, 30, 140, "deg"),
DWELL(Fields.GAUGE_COIL_DWELL_TIME, SensorCategory.OPERATIONS, FieldType.UINT16, 86, 1.0 / MAGIC_300_PACKING_MULT, BackgroundColor.MUD, 1, 10, "ms"), DWELL(Fields.GAUGE_COIL_DWELL_TIME, SensorCategory.OPERATIONS, FieldType.UINT16, 86, 1.0 / 300, BackgroundColor.MUD, 1, 10, "ms"),
coilDutyCycle(Fields.GAUGE_NAME_DWELL_DUTY, SensorCategory.OPERATIONS, FieldType.UINT16, 88, 0.01, BackgroundColor.MUD, 0, 100, "%"), coilDutyCycle(Fields.GAUGE_NAME_DWELL_DUTY, SensorCategory.OPERATIONS, FieldType.UINT16, 88, 0.01, BackgroundColor.MUD, 0, 100, "%"),
// Idle & ETB // Idle & ETB