auto-sync
This commit is contained in:
parent
29ab02c5ba
commit
318a61d66b
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
void setGy6139qmbDefaultEngineConfiguration(engine_configuration_s *engineConfiguration) {
|
void setGy6139qmbDefaultEngineConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
engineConfiguration->rpmHardLimit = 9000;
|
engineConfiguration->rpmHardLimit = 9000;
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 800;
|
engineConfiguration->cranking.rpm = 800;
|
||||||
engineConfiguration->analogInputDividerCoefficient = 1.52;
|
engineConfiguration->analogInputDividerCoefficient = 1.52;
|
||||||
engineConfiguration->algorithm = LM_MAP;
|
engineConfiguration->algorithm = LM_MAP;
|
||||||
engineConfiguration->globalTriggerAngleOffset = 15;
|
engineConfiguration->globalTriggerAngleOffset = 15;
|
||||||
|
|
|
@ -71,7 +71,7 @@ void setBmwE34(engine_configuration_s *engineConfiguration) {
|
||||||
*/
|
*/
|
||||||
bc->triggerSimulatorFrequency = 200;
|
bc->triggerSimulatorFrequency = 200;
|
||||||
|
|
||||||
engineConfiguration->map.sensor.sensorType = MT_MPX4250;
|
engineConfiguration->map.sensor.type = MT_MPX4250;
|
||||||
|
|
||||||
engineConfiguration->hasCltSensor = false;
|
engineConfiguration->hasCltSensor = false;
|
||||||
engineConfiguration->hasIatSensor = false;
|
engineConfiguration->hasIatSensor = false;
|
||||||
|
|
|
@ -70,13 +70,13 @@ void setCitroenBerlingoTU3JPConfiguration(engine_configuration_s *engineConfigur
|
||||||
engineConfiguration->injectionMode = IM_BATCH;
|
engineConfiguration->injectionMode = IM_BATCH;
|
||||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||||
engineConfiguration->rpmHardLimit = 5000;
|
engineConfiguration->rpmHardLimit = 5000;
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 600;
|
engineConfiguration->cranking.rpm = 600;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cranking fuel setting
|
* Cranking fuel setting
|
||||||
* TODO: they recomend using something like -40C for low point and +80C for high point
|
* TODO: they recomend using something like -40C for low point and +80C for high point
|
||||||
*/
|
*/
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 15;
|
engineConfiguration->cranking.baseFuel = 15;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Algorithm Alpha-N setting
|
* Algorithm Alpha-N setting
|
||||||
|
@ -146,9 +146,9 @@ void setCitroenBerlingoTU3JPConfiguration(engine_configuration_s *engineConfigur
|
||||||
* MAP <BOSCH 0 261 230 057>
|
* MAP <BOSCH 0 261 230 057>
|
||||||
*/
|
*/
|
||||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_1;
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_1;
|
||||||
engineConfiguration->map.sensor.sensorType = MT_CUSTOM;
|
engineConfiguration->map.sensor.type = MT_CUSTOM;
|
||||||
engineConfiguration->map.sensor.customValueAt0 = 10;
|
engineConfiguration->map.sensor.valueAt0 = 10;
|
||||||
engineConfiguration->map.sensor.customValueAt5 = 110;
|
engineConfiguration->map.sensor.valueAt5 = 110;
|
||||||
/**
|
/**
|
||||||
* TPS <MAGNETI MARELLI>
|
* TPS <MAGNETI MARELLI>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -102,10 +102,10 @@ void setDodgeNeon1995EngineConfiguration(engine_configuration_s *engineConfigura
|
||||||
// set_rpm_hard_limit 4000
|
// set_rpm_hard_limit 4000
|
||||||
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
||||||
// set_cranking_rpm 550
|
// set_cranking_rpm 550
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
|
|
||||||
// set_cranking_fuel 5
|
// set_cranking_fuel 5
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
engineConfiguration->cranking.baseFuel = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* that's 1995 config
|
* that's 1995 config
|
||||||
|
@ -201,7 +201,7 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
|
||||||
*
|
*
|
||||||
* set_cranking_fuel 5
|
* set_cranking_fuel 5
|
||||||
*/
|
*/
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
engineConfiguration->cranking.baseFuel = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 77C
|
* 77C
|
||||||
|
@ -343,7 +343,7 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
|
||||||
|
|
||||||
boardConfiguration->analogChartMode = AC_MAP;
|
boardConfiguration->analogChartMode = AC_MAP;
|
||||||
boardConfiguration->isFastAdcEnabled = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
engineConfiguration->map.sensor.sensorType = MT_DODGE_NEON_2003;
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||||
|
|
||||||
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
||||||
setHip9011FrankensoPinout();
|
setHip9011FrankensoPinout();
|
||||||
|
|
|
@ -80,9 +80,9 @@ void setFordInline6(engine_configuration_s *engineConfiguration, board_configura
|
||||||
engineConfiguration->cltAdcChannel = EFI_ADC_1;
|
engineConfiguration->cltAdcChannel = EFI_ADC_1;
|
||||||
engineConfiguration->afrSensor.afrAdcChannel = EFI_ADC_11;
|
engineConfiguration->afrSensor.afrAdcChannel = EFI_ADC_11;
|
||||||
|
|
||||||
engineConfiguration->map.sensor.sensorType = MT_MPX4250;
|
engineConfiguration->map.sensor.type = MT_MPX4250;
|
||||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_15;
|
engineConfiguration->map.sensor.hwChannel = EFI_ADC_15;
|
||||||
engineConfiguration->baroSensor.sensorType = MT_MPX4250;
|
engineConfiguration->baroSensor.type = MT_MPX4250;
|
||||||
engineConfiguration->baroSensor.hwChannel = EFI_ADC_7;
|
engineConfiguration->baroSensor.hwChannel = EFI_ADC_7;
|
||||||
|
|
||||||
// 6 channel output board
|
// 6 channel output board
|
||||||
|
|
|
@ -89,7 +89,7 @@ void setFordAspireEngineConfiguration(engine_configuration_s *engineConfiguratio
|
||||||
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, -20, 18000, 23.8889, 2100, 48.8889, 1000);
|
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, -20, 18000, 23.8889, 2100, 48.8889, 1000);
|
||||||
engineConfiguration->cltThermistorConf.bias_resistor = 3300; // that's my custom resistor value!
|
engineConfiguration->cltThermistorConf.bias_resistor = 3300; // that's my custom resistor value!
|
||||||
|
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 3;
|
engineConfiguration->cranking.baseFuel = 3;
|
||||||
|
|
||||||
// engineConfiguration->ignitionPinMode = OM_INVERTED;
|
// engineConfiguration->ignitionPinMode = OM_INVERTED;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ void setFordAspireEngineConfiguration(engine_configuration_s *engineConfiguratio
|
||||||
|
|
||||||
setDefaultAspireMaps(engineConfiguration);
|
setDefaultAspireMaps(engineConfiguration);
|
||||||
// set_cranking_rpm 550
|
// set_cranking_rpm 550
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
// set_cranking_charge_angle 70
|
// set_cranking_charge_angle 70
|
||||||
engineConfiguration->crankingChargeAngle = 70;
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
// set_cranking_timing_angle 37
|
// set_cranking_timing_angle 37
|
||||||
|
@ -142,7 +142,7 @@ void setFordAspireEngineConfiguration(engine_configuration_s *engineConfiguratio
|
||||||
engineConfiguration->cltAdcChannel = EFI_ADC_11;
|
engineConfiguration->cltAdcChannel = EFI_ADC_11;
|
||||||
// engineConfiguration->iatAdcChannel =
|
// engineConfiguration->iatAdcChannel =
|
||||||
|
|
||||||
engineConfiguration->map.sensor.sensorType = MT_DENSO183;
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_FORD_ASPIRE */
|
#endif /* EFI_SUPPORT_FORD_ASPIRE */
|
||||||
|
|
|
@ -28,7 +28,7 @@ void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setHondaAccordConfigurationCommon(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
static void setHondaAccordConfigurationCommon(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
engineConfiguration->map.sensor.sensorType = MT_DENSO183;
|
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||||
boardConfiguration->isFastAdcEnabled = true;
|
boardConfiguration->isFastAdcEnabled = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ static void setHondaAccordConfigurationCommon(engine_configuration_s *engineConf
|
||||||
// set_rpm_hard_limit 4000
|
// set_rpm_hard_limit 4000
|
||||||
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
||||||
// set_cranking_rpm 2000
|
// set_cranking_rpm 2000
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 500;
|
engineConfiguration->cranking.rpm = 500;
|
||||||
|
|
||||||
|
|
||||||
// set_ignition_offset 350
|
// set_ignition_offset 350
|
||||||
|
|
|
@ -119,7 +119,7 @@ static void setDefaultCrankingFuel(engine_configuration_s *engineConfiguration)
|
||||||
// todo: set cranking parameters method based on injectors and displacement?
|
// todo: set cranking parameters method based on injectors and displacement?
|
||||||
|
|
||||||
// set_cranking_fuel 5
|
// set_cranking_fuel 5
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
engineConfiguration->cranking.baseFuel = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void commonMiataNa(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
static void commonMiataNa(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ void setMitsubishiConfiguration(engine_configuration_s *engineConfiguration, boa
|
||||||
engineConfiguration->globalTriggerAngleOffset = 671;
|
engineConfiguration->globalTriggerAngleOffset = 671;
|
||||||
|
|
||||||
// set_cranking_rpm 550
|
// set_cranking_rpm 550
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
// set_cranking_charge_angle 70
|
// set_cranking_charge_angle 70
|
||||||
engineConfiguration->crankingChargeAngle = 70;
|
engineConfiguration->crankingChargeAngle = 70;
|
||||||
// set_cranking_timing_angle 715
|
// set_cranking_timing_angle 715
|
||||||
|
@ -39,7 +39,7 @@ void setMitsubishiConfiguration(engine_configuration_s *engineConfiguration, boa
|
||||||
setWholeFuelMap(engineConfiguration, 3);
|
setWholeFuelMap(engineConfiguration, 3);
|
||||||
|
|
||||||
// set_cranking_fuel 4
|
// set_cranking_fuel 4
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 4;
|
engineConfiguration->cranking.baseFuel = 4;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 29150 Ohm @ 40C
|
// * 29150 Ohm @ 40C
|
||||||
|
|
|
@ -35,7 +35,7 @@ void setRoverv8(engine_configuration_s *engineConfiguration, board_configuration
|
||||||
// set_rpm_hard_limit 4000
|
// set_rpm_hard_limit 4000
|
||||||
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
engineConfiguration->rpmHardLimit = 4000; // yes, 4k. let's play it safe for now
|
||||||
// set_cranking_rpm 550
|
// set_cranking_rpm 550
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
|
|
||||||
// set_whole_fuel_map 3
|
// set_whole_fuel_map 3
|
||||||
setWholeFuelMap(engineConfiguration, 3);
|
setWholeFuelMap(engineConfiguration, 3);
|
||||||
|
|
|
@ -198,7 +198,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
engineConfiguration->iatThermistorConf.bias_resistor = 2700;
|
engineConfiguration->iatThermistorConf.bias_resistor = 2700;
|
||||||
|
|
||||||
engineConfiguration->rpmHardLimit = 7000;
|
engineConfiguration->rpmHardLimit = 7000;
|
||||||
engineConfiguration->crankingSettings.crankingRpm = 550;
|
engineConfiguration->cranking.rpm = 550;
|
||||||
|
|
||||||
engineConfiguration->crankingFuelCoef[0] = 5; // base cranking fuel adjustment coefficient
|
engineConfiguration->crankingFuelCoef[0] = 5; // base cranking fuel adjustment coefficient
|
||||||
engineConfiguration->crankingFuelBins[0] = -20; // temperature in C
|
engineConfiguration->crankingFuelBins[0] = -20; // temperature in C
|
||||||
|
@ -234,7 +234,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
engineConfiguration->crankingCycleCoef[7] = 0.5;
|
engineConfiguration->crankingCycleCoef[7] = 0.5;
|
||||||
engineConfiguration->crankingCycleBins[7] = 77;
|
engineConfiguration->crankingCycleBins[7] = 77;
|
||||||
|
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 5;
|
engineConfiguration->cranking.baseFuel = 5;
|
||||||
|
|
||||||
engineConfiguration->analogInputDividerCoefficient = 2;
|
engineConfiguration->analogInputDividerCoefficient = 2;
|
||||||
|
|
||||||
|
@ -308,11 +308,11 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
|
|
||||||
engineConfiguration->globalFuelCorrection = 1;
|
engineConfiguration->globalFuelCorrection = 1;
|
||||||
|
|
||||||
engineConfiguration->map.sensor.sensorType = MT_MPX4250;
|
engineConfiguration->map.sensor.type = MT_MPX4250;
|
||||||
|
|
||||||
engineConfiguration->baroSensor.sensorType = MT_CUSTOM;
|
engineConfiguration->baroSensor.type = MT_CUSTOM;
|
||||||
engineConfiguration->baroSensor.customValueAt0 = 0;
|
engineConfiguration->baroSensor.valueAt0 = 0;
|
||||||
engineConfiguration->baroSensor.customValueAt5 = 500;
|
engineConfiguration->baroSensor.valueAt5 = 500;
|
||||||
|
|
||||||
engineConfiguration->diffLoadEnrichmentCoef = 1;
|
engineConfiguration->diffLoadEnrichmentCoef = 1;
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* offset 348
|
* offset 348
|
||||||
*/
|
*/
|
||||||
cranking_parameters_s crankingSettings;
|
cranking_parameters_s cranking;
|
||||||
/**
|
/**
|
||||||
* @see hasMapSensor
|
* @see hasMapSensor
|
||||||
* @see isMapAveragingEnabled
|
* @see isMapAveragingEnabled
|
||||||
|
|
|
@ -2,13 +2,13 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* offset 0
|
* offset 0
|
||||||
*/
|
*/
|
||||||
float baseCrankingFuel;
|
float baseFuel;
|
||||||
/**
|
/**
|
||||||
* This value controls what RPM values we consider 'cranking' (any RPM below 'crankingRpm')
|
* This value controls what RPM values we consider 'cranking' (any RPM below 'crankingRpm')
|
||||||
* Anything above 'crankingRpm' would be 'running'
|
* Anything above 'crankingRpm' would be 'running'
|
||||||
* offset 4
|
* offset 4
|
||||||
*/
|
*/
|
||||||
int16_t crankingRpm;
|
int16_t rpm;
|
||||||
/**
|
/**
|
||||||
* need 4 byte alignment
|
* need 4 byte alignment
|
||||||
* offset 6
|
* offset 6
|
||||||
|
@ -72,16 +72,16 @@ typedef struct {
|
||||||
* kPa value at zero volts
|
* kPa value at zero volts
|
||||||
* offset 0
|
* offset 0
|
||||||
*/
|
*/
|
||||||
float customValueAt0;
|
float valueAt0;
|
||||||
/**
|
/**
|
||||||
* kPa value at 5 volts
|
* kPa value at 5 volts
|
||||||
* offset 4
|
* offset 4
|
||||||
*/
|
*/
|
||||||
float customValueAt5;
|
float valueAt5;
|
||||||
/**
|
/**
|
||||||
* offset 8
|
* offset 8
|
||||||
*/
|
*/
|
||||||
air_pressure_sensor_type_e sensorType;
|
air_pressure_sensor_type_e type;
|
||||||
/**
|
/**
|
||||||
* offset 12
|
* offset 12
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -165,7 +165,7 @@ float getCrankingFuel(Engine *engine) {
|
||||||
float getCrankingFuel3(engine_configuration_s *engineConfiguration, float coolantTemperature,
|
float getCrankingFuel3(engine_configuration_s *engineConfiguration, float coolantTemperature,
|
||||||
uint32_t revolutionCounterSinceStart) {
|
uint32_t revolutionCounterSinceStart) {
|
||||||
// these magic constants are in Celsius
|
// these magic constants are in Celsius
|
||||||
float baseCrankingFuel = engineConfiguration->crankingSettings.baseCrankingFuel;
|
float baseCrankingFuel = engineConfiguration->cranking.baseFuel;
|
||||||
if (cisnan(coolantTemperature))
|
if (cisnan(coolantTemperature))
|
||||||
return baseCrankingFuel;
|
return baseCrankingFuel;
|
||||||
float durationCoef = interpolate2d(revolutionCounterSinceStart,
|
float durationCoef = interpolate2d(revolutionCounterSinceStart,
|
||||||
|
|
|
@ -54,7 +54,7 @@ void initializeIgnitionActions(angle_t advance, angle_t dwellAngle,
|
||||||
|
|
||||||
float getCrankshaftRevolutionTimeMs(int rpm);
|
float getCrankshaftRevolutionTimeMs(int rpm);
|
||||||
|
|
||||||
#define isCrankingR(rpm) ((rpm) > 0 && (rpm) < engineConfiguration->crankingSettings.crankingRpm)
|
#define isCrankingR(rpm) ((rpm) > 0 && (rpm) < engineConfiguration->cranking.rpm)
|
||||||
|
|
||||||
float getEngineLoadT(DECLARE_ENGINE_PARAMETER_F);
|
float getEngineLoadT(DECLARE_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,10 @@ static FastInterpolation mpx4250(0, 8, 5, 260);
|
||||||
static FastInterpolation dodgeNeon2003(0.5, 0, 4.5, 100);
|
static FastInterpolation dodgeNeon2003(0.5, 0, 4.5, 100);
|
||||||
|
|
||||||
float decodePressure(float voltage, air_pressure_sensor_config_s * config) {
|
float decodePressure(float voltage, air_pressure_sensor_config_s * config) {
|
||||||
switch (config->sensorType) {
|
switch (config->type) {
|
||||||
case MT_CUSTOM:
|
case MT_CUSTOM:
|
||||||
// todo: introduce 'FastInterpolation customMap'
|
// todo: introduce 'FastInterpolation customMap'
|
||||||
return interpolate(0, config->customValueAt0, 5, config->customValueAt5, voltage);
|
return interpolate(0, config->valueAt0, 5, config->valueAt5, voltage);
|
||||||
case MT_DENSO183:
|
case MT_DENSO183:
|
||||||
return denso183.getValue(voltage);
|
return denso183.getValue(voltage);
|
||||||
case MT_MPX4250:
|
case MT_MPX4250:
|
||||||
|
@ -43,7 +43,7 @@ float decodePressure(float voltage, air_pressure_sensor_config_s * config) {
|
||||||
case MT_DODGE_NEON_2003:
|
case MT_DODGE_NEON_2003:
|
||||||
return dodgeNeon2003.getValue(voltage);
|
return dodgeNeon2003.getValue(voltage);
|
||||||
default:
|
default:
|
||||||
firmwareError("Unknown MAP type: %d", config->sensorType);
|
firmwareError("Unknown MAP type: %d", config->type);
|
||||||
return NAN;
|
return NAN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,7 @@ void printConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
|
|
||||||
// scheduleMsg(&logger, "analogChartMode: %d", engineConfiguration->analogChartMode);
|
// scheduleMsg(&logger, "analogChartMode: %d", engineConfiguration->analogChartMode);
|
||||||
|
|
||||||
scheduleMsg(&logger, "crankingRpm: %d", engineConfiguration->crankingSettings.crankingRpm);
|
scheduleMsg(&logger, "crankingRpm: %d", engineConfiguration->cranking.rpm);
|
||||||
|
|
||||||
scheduleMsg(&logger, "analogInputDividerCoefficient: %f", engineConfiguration->analogInputDividerCoefficient);
|
scheduleMsg(&logger, "analogInputDividerCoefficient: %f", engineConfiguration->analogInputDividerCoefficient);
|
||||||
|
|
||||||
|
@ -359,17 +359,17 @@ static void printThermistor(const char *msg, Thermistor *thermistor) {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
static void printMAPInfo(void) {
|
static void printMAPInfo(void) {
|
||||||
#if EFI_ANALOG_INPUTS
|
#if EFI_ANALOG_INPUTS
|
||||||
scheduleMsg(&logger, "map type=%d raw=%f MAP=%f", engineConfiguration->map.sensor.sensorType, getRawMap(),
|
scheduleMsg(&logger, "map type=%d raw=%f MAP=%f", engineConfiguration->map.sensor.type, getRawMap(),
|
||||||
getMap());
|
getMap());
|
||||||
if (engineConfiguration->map.sensor.sensorType == MT_CUSTOM) {
|
if (engineConfiguration->map.sensor.type == MT_CUSTOM) {
|
||||||
scheduleMsg(&logger, "at0=%f at5=%f", engineConfiguration->map.sensor.customValueAt0,
|
scheduleMsg(&logger, "at0=%f at5=%f", engineConfiguration->map.sensor.valueAt0,
|
||||||
engineConfiguration->map.sensor.customValueAt5);
|
engineConfiguration->map.sensor.valueAt5);
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleMsg(&logger, "baro type=%d value=%f", engineConfiguration->baroSensor.sensorType, getBaroPressure());
|
scheduleMsg(&logger, "baro type=%d value=%f", engineConfiguration->baroSensor.type, getBaroPressure());
|
||||||
if (engineConfiguration->baroSensor.sensorType == MT_CUSTOM) {
|
if (engineConfiguration->baroSensor.type == MT_CUSTOM) {
|
||||||
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->baroSensor.customValueAt0,
|
scheduleMsg(&logger, "min=%f max=%f", engineConfiguration->baroSensor.valueAt0,
|
||||||
engineConfiguration->baroSensor.customValueAt5);
|
engineConfiguration->baroSensor.valueAt5);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -407,13 +407,13 @@ static void printTemperatureInfo(void) {
|
||||||
|
|
||||||
|
|
||||||
#if EFI_ANALOG_INPUTS
|
#if EFI_ANALOG_INPUTS
|
||||||
scheduleMsg(&logger, "base cranking fuel %f", engineConfiguration->crankingSettings.baseCrankingFuel);
|
scheduleMsg(&logger, "base cranking fuel %f", engineConfiguration->cranking.baseFuel);
|
||||||
#endif /* EFI_ANALOG_INPUTS */
|
#endif /* EFI_ANALOG_INPUTS */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setCrankingRpm(int value) {
|
static void setCrankingRpm(int value) {
|
||||||
engineConfiguration->crankingSettings.crankingRpm = value;
|
engineConfiguration->cranking.rpm = value;
|
||||||
doPrintConfiguration(engine);
|
doPrintConfiguration(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ static void setRpmHardLimit(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setCrankingFuel(float timeMs) {
|
static void setCrankingFuel(float timeMs) {
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = timeMs;
|
engineConfiguration->cranking.baseFuel = timeMs;
|
||||||
printTemperatureInfo();
|
printTemperatureInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,17 +55,17 @@ enable2ndByteCanID = false
|
||||||
primingSquirtDurationMs = scalar, F32, 340, "*C", 1, 0, -40, 200, 1
|
primingSquirtDurationMs = scalar, F32, 340, "*C", 1, 0, -40, 200, 1
|
||||||
engineCycle = scalar, S32, 344, "engine cycle", 1, 0, 0, 1000, 0
|
engineCycle = scalar, S32, 344, "engine cycle", 1, 0, 0, 1000, 0
|
||||||
|
|
||||||
baseCrankingFuelPW = scalar, F32, 348, "ms", 1, 0, 0, 200, 1
|
cranking_baseFuel = scalar, F32, 348, "ms", 1, 0, 0, 200, 1
|
||||||
crankingRpm = scalar, S16, 352, "RPM", 1, 0, 0, 3000, 0 ; * ( 2 bytes)
|
cranking_rpm = scalar, S16, 352, "RPM", 1, 0, 0, 3000, 0 ; * ( 2 bytes)
|
||||||
|
|
||||||
mapSamplingAngleBins = array, F32, 356, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
|
map_samplingAngleBins = array, F32, 356, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
|
||||||
mapSamplingAngle = array, F32, 388, [8], "deg", 1, 0, 0.0, 90, 2; size 64
|
map_samplingAngle = array, F32, 388, [8], "deg", 1, 0, 0.0, 90, 2; size 64
|
||||||
mapSamplingWindowBins = array, F32, 420, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
|
map_samplingWindowBins = array, F32, 420, [8], "RPM", 1, 0, 0.0, 18000, 2; size 64
|
||||||
mapSamplingWindow = array, F32, 452, [8], "deg", 1, 0, 0.0, 90, 2; size 64
|
map_samplingWindow = array, F32, 452, [8], "deg", 1, 0, 0.0, 90, 2; size 64
|
||||||
|
|
||||||
mapMin = scalar, F32, 484, "kpa", 1, 0, 0, 450, 2; size 4
|
map_sensor_valueAt0 = scalar, F32, 484, "kpa", 1, 0, 0, 450, 2; size 4
|
||||||
mapMax = scalar, F32, 488, "kpa", 1, 0, 0, 450, 2; size 4
|
map_sensor_valueAt5 = scalar, F32, 488, "kpa", 1, 0, 0, 450, 2; size 4
|
||||||
mapSensorType = bits, U32, 492, [0:1] "Custom", "DENSO183", "MPX4250", "INVALID"
|
map_sensor_type = bits, U32, 492, [0:1] "Custom", "DENSO183", "MPX4250", "INVALID"
|
||||||
;ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 ADC6 ADC7 ADC8 ADC9 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15
|
;ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 ADC6 ADC7 ADC8 ADC9 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15
|
||||||
mapAdcInput = bits, U32, 496, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
mapAdcInput = bits, U32, 496, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||||
|
|
||||||
|
@ -481,20 +481,20 @@ fileVersion = { 20150112 }
|
||||||
yBins = sparkDwell
|
yBins = sparkDwell
|
||||||
gauge = rpm
|
gauge = rpm
|
||||||
|
|
||||||
curve = mapSamplingAngleCurve, "MAP Sampling Angle"
|
curve = map_samplingAngleCurve, "MAP Sampling Angle"
|
||||||
columnLabel = "RPM", "Angle"
|
columnLabel = "RPM", "Angle"
|
||||||
xAxis = 0, 8000, 10
|
xAxis = 0, 8000, 10
|
||||||
yAxis = 0, 180, 10
|
yAxis = 0, 180, 10
|
||||||
xBins = mapSamplingAngleBins, rpm
|
xBins = map_samplingAngleBins, rpm
|
||||||
yBins = mapSamplingAngle
|
yBins = map_samplingAngle
|
||||||
gauge = rpm
|
gauge = rpm
|
||||||
|
|
||||||
curve = mapSamplingWindowCurve, "MAP Sampling Window"
|
curve = map_samplingWindowCurve, "MAP Sampling Window"
|
||||||
columnLabel = "RPM", "Window"
|
columnLabel = "RPM", "Window"
|
||||||
xAxis = 0, 8000, 10
|
xAxis = 0, 8000, 10
|
||||||
yAxis = 0, 180, 10
|
yAxis = 0, 180, 10
|
||||||
xBins = mapSamplingWindowBins, rpm
|
xBins = map_samplingWindowBins, rpm
|
||||||
yBins = mapSamplingWindow
|
yBins = map_samplingWindow
|
||||||
gauge = rpm
|
gauge = rpm
|
||||||
|
|
||||||
curve = injectorsDeadTime, "Injector Dead Time Battery Correction"
|
curve = injectorsDeadTime, "Injector Dead Time Battery Correction"
|
||||||
|
@ -815,12 +815,12 @@ fileVersion = { 20150112 }
|
||||||
; Engine->MAP Sensor Settings
|
; Engine->MAP Sensor Settings
|
||||||
dialog = mapSensor, "Sensor Settings", xAxis
|
dialog = mapSensor, "Sensor Settings", xAxis
|
||||||
field = "Map type", mapSensorType
|
field = "Map type", mapSensorType
|
||||||
field = "MAP at minimum voltage", mapMin, { mapSensorType == 0}
|
field = "MAP at minimum voltage", map_sensor_valueAt0, { map_sensor_type == 0}
|
||||||
field = "MAP at maximum voltage", mapMax, { mapSensorType == 0}
|
field = "MAP at maximum voltage", map_sensor_valueAt5, { map_sensor_type == 0}
|
||||||
|
|
||||||
dialog = mapCurves, "", border
|
dialog = mapCurves, "", border
|
||||||
panel = mapSamplingAngleCurve, West
|
panel = map_samplingAngleCurve, West
|
||||||
panel = mapSamplingWindowCurve, East
|
panel = map_samplingWindowCurve, East
|
||||||
|
|
||||||
dialog = mapSettings, "MAP Sensor Settings", border
|
dialog = mapSettings, "MAP Sensor Settings", border
|
||||||
panel = mapSensor, South
|
panel = mapSensor, South
|
||||||
|
@ -1017,9 +1017,9 @@ fileVersion = { 20150112 }
|
||||||
|
|
||||||
; Tuning->Cranking
|
; Tuning->Cranking
|
||||||
dialog = cranking, "Cranking"
|
dialog = cranking, "Cranking"
|
||||||
field = "Cranking RPM limit", crankingRpm
|
field = "Cranking RPM limit", cranking_rpm
|
||||||
field = ""
|
field = ""
|
||||||
field = "Base cranking Pulse Width", baseCrankingFuelPW
|
field = "Base cranking Pulse Width", cranking_baseFuel
|
||||||
field = ""
|
field = ""
|
||||||
field = "Charge Angle", crankingChargeAngle
|
field = "Charge Angle", crankingChargeAngle
|
||||||
field = "Advance during cranking", crankingTimingAngle
|
field = "Advance during cranking", crankingTimingAngle
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* @file test_fuel_map.cpp
|
* @file test_fuel_map.cpp
|
||||||
*
|
*
|
||||||
* Created on: Nov 6, 2013
|
* @date Nov 6, 2013
|
||||||
* Author: Andrey Belomutskiy, (c) 2012-2015
|
* @author Andrey Belomutskiy, (c) 2012-2015
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "test_fuel_map.h"
|
#include "test_fuel_map.h"
|
||||||
|
@ -90,7 +90,7 @@ void testFuelMap(void) {
|
||||||
|
|
||||||
testMafValue = 0;
|
testMafValue = 0;
|
||||||
|
|
||||||
engineConfiguration->crankingSettings.baseCrankingFuel = 4;
|
engineConfiguration->cranking.baseFuel = 4;
|
||||||
|
|
||||||
printf("*************************************************** getStartingFuel\r\n");
|
printf("*************************************************** getStartingFuel\r\n");
|
||||||
// NAN in case we have issues with the CLT sensor
|
// NAN in case we have issues with the CLT sensor
|
||||||
|
|
|
@ -15,12 +15,12 @@ static ThermistorConf tc;
|
||||||
static void testMapDecoding(void) {
|
static void testMapDecoding(void) {
|
||||||
|
|
||||||
air_pressure_sensor_config_s s;
|
air_pressure_sensor_config_s s;
|
||||||
s.sensorType = MT_DENSO183;
|
s.type = MT_DENSO183;
|
||||||
|
|
||||||
assertEqualsM("denso 0 volts", -6.64, decodePressure(0, &s));
|
assertEqualsM("denso 0 volts", -6.64, decodePressure(0, &s));
|
||||||
assertEquals(31.244, decodePressure(1, &s));
|
assertEquals(31.244, decodePressure(1, &s));
|
||||||
|
|
||||||
s.sensorType = MT_MPX4250;
|
s.type = MT_MPX4250;
|
||||||
assertEqualsM("MPX_4250 0 volts", 8, decodePressure(0, &s));
|
assertEqualsM("MPX_4250 0 volts", 8, decodePressure(0, &s));
|
||||||
assertEquals(58.4, decodePressure(1, &s));
|
assertEquals(58.4, decodePressure(1, &s));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue