This commit is contained in:
parent
2e2eccf06d
commit
3cdbcc5980
|
@ -84,7 +84,7 @@ static float v_averagedMapValue;
|
||||||
#define MAX_MAP_BUFFER_LENGTH (INJECTION_PIN_COUNT * 2)
|
#define MAX_MAP_BUFFER_LENGTH (INJECTION_PIN_COUNT * 2)
|
||||||
// in MAP units, not voltage!
|
// in MAP units, not voltage!
|
||||||
static float averagedMapRunningBuffer[MAX_MAP_BUFFER_LENGTH];
|
static float averagedMapRunningBuffer[MAX_MAP_BUFFER_LENGTH];
|
||||||
static int mapMinBufferLength = 0;
|
int mapMinBufferLength = 0;
|
||||||
static int averagedMapBufIdx = 0;
|
static int averagedMapBufIdx = 0;
|
||||||
// this is 'minimal averaged' MAP
|
// this is 'minimal averaged' MAP
|
||||||
static float currentPressure;
|
static float currentPressure;
|
||||||
|
@ -213,7 +213,8 @@ static void mapAveragingCallback(trigger_event_e ckpEventType,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boardConfiguration->mapMinBufferLength != mapMinBufferLength) {
|
// 'mapMinBufferLength == 0' means not initialized
|
||||||
|
if (boardConfiguration->mapMinBufferLength != mapMinBufferLength || mapMinBufferLength == 0) {
|
||||||
// check range
|
// check range
|
||||||
mapMinBufferLength = maxI(minI(boardConfiguration->mapMinBufferLength, MAX_MAP_BUFFER_LENGTH), 1);
|
mapMinBufferLength = maxI(minI(boardConfiguration->mapMinBufferLength, MAX_MAP_BUFFER_LENGTH), 1);
|
||||||
// reset index
|
// reset index
|
||||||
|
|
|
@ -187,6 +187,9 @@ static void digitalMapWidthCallback(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
|
||||||
|
extern int mapMinBufferLength;
|
||||||
|
|
||||||
static void printMAPInfo(void) {
|
static void printMAPInfo(void) {
|
||||||
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
|
||||||
scheduleMsg(logger, "instant value=%fkPa", getRawMap());
|
scheduleMsg(logger, "instant value=%fkPa", getRawMap());
|
||||||
|
@ -195,9 +198,10 @@ static void printMAPInfo(void) {
|
||||||
if (engineConfiguration->hasFrequencyReportingMapSensor) {
|
if (engineConfiguration->hasFrequencyReportingMapSensor) {
|
||||||
scheduleMsg(logger, "instant value=%fHz @ %s", mapFreq, hwPortname(boardConfiguration->frequencyReportingMapInputPin));
|
scheduleMsg(logger, "instant value=%fHz @ %s", mapFreq, hwPortname(boardConfiguration->frequencyReportingMapInputPin));
|
||||||
} else {
|
} else {
|
||||||
scheduleMsg(logger, "map type=%d/%s MAP=%fkPa", engineConfiguration->map.sensor.type,
|
scheduleMsg(logger, "map type=%d/%s MAP=%fkPa mapMinBufferLength=%d", engineConfiguration->map.sensor.type,
|
||||||
getAir_pressure_sensor_type_e(engineConfiguration->map.sensor.type),
|
getAir_pressure_sensor_type_e(engineConfiguration->map.sensor.type),
|
||||||
getMap());
|
getMap(),
|
||||||
|
mapMinBufferLength);
|
||||||
|
|
||||||
adc_channel_e mapAdc = engineConfiguration->map.sensor.hwChannel;
|
adc_channel_e mapAdc = engineConfiguration->map.sensor.hwChannel;
|
||||||
static char pinNameBuffer[16];
|
static char pinNameBuffer[16];
|
||||||
|
|
|
@ -260,5 +260,5 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20170802;
|
return 20170806;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue