bye (#3609)
This commit is contained in:
parent
58c0fb4539
commit
992689ced5
|
@ -31,7 +31,6 @@ void setGy6139qmbDefaultEngineConfiguration() {
|
||||||
setTargetRpmCurve(2000);
|
setTargetRpmCurve(2000);
|
||||||
engineConfiguration->analogInputDividerCoefficient = 1;
|
engineConfiguration->analogInputDividerCoefficient = 1;
|
||||||
engineConfiguration->globalTriggerAngleOffset = 45;
|
engineConfiguration->globalTriggerAngleOffset = 45;
|
||||||
engineConfiguration->sensorChartMode = SC_MAP;
|
|
||||||
engineConfiguration->specs.displacement = 0.072; // 72cc
|
engineConfiguration->specs.displacement = 0.072; // 72cc
|
||||||
engineConfiguration->specs.cylindersCount = 1;
|
engineConfiguration->specs.cylindersCount = 1;
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
|
|
|
@ -326,7 +326,6 @@ void setDodgeNeonNGCEngineConfiguration() {
|
||||||
*/
|
*/
|
||||||
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
engineConfiguration->clt.adcChannel = EFI_ADC_12;
|
||||||
|
|
||||||
engineConfiguration->sensorChartMode = SC_MAP;
|
|
||||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||||
|
|
||||||
engineConfiguration->hip9011Gain = 0.3;
|
engineConfiguration->hip9011Gain = 0.3;
|
||||||
|
|
|
@ -529,8 +529,6 @@ case SC_AUX_FAST1:
|
||||||
return "SC_AUX_FAST1";
|
return "SC_AUX_FAST1";
|
||||||
case SC_DETAILED_RPM:
|
case SC_DETAILED_RPM:
|
||||||
return "SC_DETAILED_RPM";
|
return "SC_DETAILED_RPM";
|
||||||
case SC_MAP:
|
|
||||||
return "SC_MAP";
|
|
||||||
case SC_OFF:
|
case SC_OFF:
|
||||||
return "SC_OFF";
|
return "SC_OFF";
|
||||||
case SC_RPM_ACCEL:
|
case SC_RPM_ACCEL:
|
||||||
|
|
|
@ -452,7 +452,7 @@ typedef enum {
|
||||||
* You would use this value if you want to see a detailed graph of your trigger events
|
* You would use this value if you want to see a detailed graph of your trigger events
|
||||||
*/
|
*/
|
||||||
SC_TRIGGER = 1,
|
SC_TRIGGER = 1,
|
||||||
SC_MAP = 2,
|
// unused 2
|
||||||
SC_RPM_ACCEL = 3,
|
SC_RPM_ACCEL = 3,
|
||||||
SC_DETAILED_RPM = 4,
|
SC_DETAILED_RPM = 4,
|
||||||
SC_AUX_FAST1 = 5,
|
SC_AUX_FAST1 = 5,
|
||||||
|
|
|
@ -34,22 +34,11 @@
|
||||||
#include "sensor_chart.h"
|
#include "sensor_chart.h"
|
||||||
#endif /* EFI_SENSOR_CHART */
|
#endif /* EFI_SENSOR_CHART */
|
||||||
|
|
||||||
#define FAST_MAP_CHART_SKIP_FACTOR 16
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this instance does not have a real physical pin - it's only used for engine sniffer
|
* this instance does not have a real physical pin - it's only used for engine sniffer
|
||||||
*/
|
*/
|
||||||
static NamedOutputPin mapAveragingPin("map");
|
static NamedOutputPin mapAveragingPin("map");
|
||||||
|
|
||||||
/**
|
|
||||||
* Running counter of measurements per revolution
|
|
||||||
*/
|
|
||||||
static volatile int measurementsPerRevolutionCounter = 0;
|
|
||||||
/**
|
|
||||||
* Number of measurements in previous shaft revolution
|
|
||||||
*/
|
|
||||||
static volatile int measurementsPerRevolution = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Running MAP accumulator - sum of all measurements within averaging window
|
* Running MAP accumulator - sum of all measurements within averaging window
|
||||||
*/
|
*/
|
||||||
|
@ -111,19 +100,6 @@ static void startAveraging(scheduling_s *endAveragingScheduling) {
|
||||||
void mapAveragingAdcCallback(adcsample_t adcValue) {
|
void mapAveragingAdcCallback(adcsample_t adcValue) {
|
||||||
efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a");
|
efiAssertVoid(CUSTOM_ERR_6650, getCurrentRemainingStack() > 128, "lowstck#9a");
|
||||||
|
|
||||||
#if EFI_SENSOR_CHART && EFI_ANALOG_SENSORS
|
|
||||||
if (engine->sensorChartMode == SC_MAP) {
|
|
||||||
measurementsPerRevolutionCounter++;
|
|
||||||
if (measurementsPerRevolutionCounter % FAST_MAP_CHART_SKIP_FACTOR == 0) {
|
|
||||||
float voltage = adcToVoltsDivided(adcValue);
|
|
||||||
float currentPressure = convertMap(voltage).value_or(0);
|
|
||||||
scAddData(
|
|
||||||
engine->triggerCentral.getCurrentEnginePhase(getTimeNowNt()).value_or(0),
|
|
||||||
currentPressure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* EFI_SENSOR_CHART */
|
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
if (engineConfiguration->debugMode == DBG_MAP) {
|
if (engineConfiguration->debugMode == DBG_MAP) {
|
||||||
float voltage = adcToVoltsDivided(adcValue);
|
float voltage = adcToVoltsDivided(adcValue);
|
||||||
|
@ -245,9 +221,6 @@ void mapAveragingTriggerCallback(
|
||||||
applyMapMinBufferLength();
|
applyMapMinBufferLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
measurementsPerRevolution = measurementsPerRevolutionCounter;
|
|
||||||
measurementsPerRevolutionCounter = 0;
|
|
||||||
|
|
||||||
// todo: this could be pre-calculated
|
// todo: this could be pre-calculated
|
||||||
int samplingCount = engineConfiguration->measureMapOnlyInOneCylinder ? 1 : engineConfiguration->specs.cylindersCount;
|
int samplingCount = engineConfiguration->measureMapOnlyInOneCylinder ? 1 : engineConfiguration->specs.cylindersCount;
|
||||||
|
|
||||||
|
@ -287,15 +260,7 @@ void mapAveragingTriggerCallback(
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showMapStats() {
|
|
||||||
efiPrintf("per revolution %d", measurementsPerRevolution);
|
|
||||||
}
|
|
||||||
|
|
||||||
void initMapAveraging() {
|
void initMapAveraging() {
|
||||||
#if !EFI_UNIT_TEST
|
|
||||||
addConsoleAction("faststat", showMapStats);
|
|
||||||
#endif /* EFI_UNIT_TEST */
|
|
||||||
|
|
||||||
applyMapMinBufferLength();
|
applyMapMinBufferLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -844,7 +844,7 @@ custom script_setting_t 4 scalar, F32, @OFFSET@, "", 1, 0, 0, 18000, 2
|
||||||
uart_device_e consoleUartDevice;
|
uart_device_e consoleUartDevice;
|
||||||
|
|
||||||
|
|
||||||
#define sensor_chart_e_enum "none", "trigger", "MAP", "RPM ACCEL", "DETAILED RPM", "Fast Aux1"
|
#define sensor_chart_e_enum "none", "trigger", "INVALID", "RPM ACCEL", "DETAILED RPM", "Fast Aux1"
|
||||||
custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@
|
custom sensor_chart_e 4 bits, S32, @OFFSET@, [0:2], @@sensor_chart_e_enum@@
|
||||||
sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode;
|
sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue