fix maf gauge scaling (#1566)

* div by 10

* define ratio

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2020-07-03 20:06:00 -07:00 committed by GitHub
parent aa124130bd
commit b50a1fccc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,7 @@ typedef struct {
// air flow/mass measurment
scaled_voltage massAirFlowVoltage; // 26
scaled_channel<uint16_t, 100> massAirFlow; // 28
scaled_channel<uint16_t, PACK_MULT_MASS_FLOW> massAirFlow; // 28
scaled_pressure manifoldAirPressure; // 30
scaled_pressure baroPressure; // 32

View File

@ -152,6 +152,7 @@ struct_no_prefix engine_configuration_s
#define PACK_MULT_AFR 1000
#define PACK_MULT_ANGLE 50
#define PACK_MULT_VOLTAGE 1000
#define PACK_MULT_MASS_FLOW 10
#define TPS_1_BYTE_PACKING_MULT 2
#define LOAD_1_BYTE_PACKING_MULT 2
#define FSIO_TABLE_8 8

View File

@ -233,7 +233,7 @@ enable2ndByteCanID = false
; air flow/mass measurments
MAFValue = scalar, U16, 26, "V",,{1/@@PACK_MULT_VOLTAGE@@},, 0
massAirFlowValue= scalar, U16, 28, "Kg/h", 0.01, 0
massAirFlowValue= scalar, U16, 28, "Kg/h", {1/@@PACK_MULT_MASS_FLOW@@}, 0
MAPValue = scalar, U16, 30, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0
baroPressure = scalar, U16, 32, "kPa",{1/@@PACK_MULT_PRESSURE@@}, 0.0
AFRValue = scalar, U16, 34, "AFR",,{1/@@PACK_MULT_AFR@@},, 0.0