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