auto-sync
This commit is contained in:
parent
199edc1686
commit
bcfb778652
|
@ -23,7 +23,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
|||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
||||
|
||||
// chartsize 450
|
||||
engineConfiguration->digitalChartSize = 450;
|
||||
engineConfiguration->engineChartSize = 450;
|
||||
|
||||
// setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||
// engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
||||
|
@ -61,7 +61,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
// for best performance at high RPM, we need to turn off 'Engine Sniffer' and 'Sensor Sniffer'
|
||||
boardConfiguration->sensorChartMode = SC_OFF;
|
||||
engineConfiguration->isDigitalChartEnabled = false;
|
||||
engineConfiguration->isEngineChartEnabled = false;
|
||||
|
||||
engineConfiguration->isCylinderCleanupEnabled = false;
|
||||
engineConfiguration->isInjectionEnabled = true;
|
||||
|
|
|
@ -24,7 +24,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||
engineConfiguration->trigger.type = TT_MAZDA_DOHC_1_4;
|
||||
|
||||
engineConfiguration->digitalChartSize = 150;
|
||||
engineConfiguration->engineChartSize = 150;
|
||||
|
||||
boardConfiguration->sensorChartMode = SC_TRIGGER;
|
||||
engineConfiguration->sensorChartFrequency = 2;
|
||||
|
|
|
@ -130,7 +130,7 @@ EXTERN_ENGINE;
|
|||
static void commonMiataNa(DECLARE_ENGINE_PARAMETER_F) {
|
||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||
engineConfiguration->trigger.type = TT_MAZDA_MIATA_NA;
|
||||
engineConfiguration->digitalChartSize = 100;
|
||||
engineConfiguration->engineChartSize = 100;
|
||||
|
||||
boardConfiguration->triggerInputPins[0] = GPIOC_6; // 2G YEL/BLU
|
||||
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
|
@ -170,7 +170,7 @@ static void commonMiataNa(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
static void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||
|
||||
engineConfiguration->digitalChartSize = 150;
|
||||
engineConfiguration->engineChartSize = 150;
|
||||
|
||||
engineConfiguration->specs.cylindersCount = 4;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
|
|
|
@ -22,7 +22,7 @@ void setSachs(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
setOperationMode(engineConfiguration, TWO_STROKE);
|
||||
engineConfiguration->specs.firingOrder = FO_ONE_CYLINDER;
|
||||
engineConfiguration->digitalChartSize = 400;
|
||||
engineConfiguration->engineChartSize = 400;
|
||||
|
||||
// set_injection_offset 0
|
||||
engineConfiguration->injectionAngle = 0;
|
||||
|
|
|
@ -250,6 +250,8 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
engineConfiguration->rpmHardLimit = 7000;
|
||||
engineConfiguration->cranking.rpm = 550;
|
||||
engineConfiguration->cutFuelOnHardLimit = true;
|
||||
engineConfiguration->cutSparkOnHardLimit = true;
|
||||
|
||||
engineConfiguration->noAccelAfterHardLimitPeriodSecs = 3;
|
||||
|
||||
|
@ -376,7 +378,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->hasIatSensor = true;
|
||||
engineConfiguration->hasCltSensor = true;
|
||||
engineConfiguration->hasBaroSensor = false;
|
||||
engineConfiguration->isDigitalChartEnabled = true;
|
||||
engineConfiguration->isEngineChartEnabled = true;
|
||||
|
||||
engineConfiguration->useOnlyFrontForTrigger = false;
|
||||
|
||||
|
@ -407,10 +409,10 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->idleStepperTotalSteps = 150;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
engineConfiguration->digitalChartSize = 300;
|
||||
engineConfiguration->engineChartSize = 300;
|
||||
#else
|
||||
// need more events for automated test
|
||||
engineConfiguration->digitalChartSize = 400;
|
||||
engineConfiguration->engineChartSize = 400;
|
||||
#endif
|
||||
|
||||
engineConfiguration->engineCycle = 720;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated by config_definition.jar on Thu Apr 23 14:13:44 EDT 2015
|
||||
// this section was generated by config_definition.jar on Thu Apr 23 17:29:25 EDT 2015
|
||||
// begin
|
||||
#include "rusefi_types.h"
|
||||
typedef struct {
|
||||
|
@ -914,7 +914,7 @@ typedef struct {
|
|||
bool_t useConstantDwellDuringCranking : 1;
|
||||
/**
|
||||
offset 1488 bit 5 */
|
||||
bool_t isDigitalChartEnabled : 1;
|
||||
bool_t isEngineChartEnabled : 1;
|
||||
/**
|
||||
offset 1488 bit 6 */
|
||||
bool_t isCanEnabled : 1;
|
||||
|
@ -945,6 +945,12 @@ typedef struct {
|
|||
/**
|
||||
offset 1488 bit 15 */
|
||||
bool_t hasTpsSensor : 1;
|
||||
/**
|
||||
offset 1488 bit 16 */
|
||||
bool_t cutFuelOnHardLimit : 1;
|
||||
/**
|
||||
offset 1488 bit 17 */
|
||||
bool_t cutSparkOnHardLimit : 1;
|
||||
/**
|
||||
* offset 1492
|
||||
*/
|
||||
|
@ -1005,7 +1011,7 @@ typedef struct {
|
|||
/**
|
||||
* offset 1504
|
||||
*/
|
||||
uint32_t digitalChartSize;
|
||||
uint32_t engineChartSize;
|
||||
/**
|
||||
* offset 1508
|
||||
*/
|
||||
|
@ -1283,4 +1289,4 @@ typedef struct {
|
|||
} persistent_config_s;
|
||||
|
||||
// end
|
||||
// this section was generated by config_definition.jar on Thu Apr 23 14:13:44 EDT 2015
|
||||
// this section was generated by config_definition.jar on Thu Apr 23 17:29:25 EDT 2015
|
||||
|
|
|
@ -75,7 +75,7 @@ void turnPinHigh(NamedOutputPin *output) {
|
|||
#endif
|
||||
#if EFI_WAVE_CHART
|
||||
// explicit check here is a performance optimization to speed up no-chart mode
|
||||
if (CONFIG(isDigitalChartEnabled)) {
|
||||
if (CONFIG(isEngineChartEnabled)) {
|
||||
// this is a performance optimization - array index is cheaper then invoking a method with 'switch'
|
||||
const char *pinName = output->name;
|
||||
// dbgDurr = hal_lld_get_counter_value() - dbgStart;
|
||||
|
@ -100,7 +100,7 @@ void turnPinLow(NamedOutputPin *output) {
|
|||
#endif /* EFI_DEFAILED_LOGGING */
|
||||
|
||||
#if EFI_WAVE_CHART
|
||||
if (CONFIG(isDigitalChartEnabled)) {
|
||||
if (CONFIG(isEngineChartEnabled)) {
|
||||
// this is a performance optimization - array index is cheaper then invoking a method with 'switch'
|
||||
const char *pinName = output->name;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "engine_configuration.h"
|
||||
#include "engine.h"
|
||||
|
||||
#define FLASH_DATA_VERSION 7617
|
||||
#define FLASH_DATA_VERSION 7900
|
||||
|
||||
void readFromFlash(void);
|
||||
void initFlash(Logging *sharedLogger, Engine *engine);
|
||||
|
|
|
@ -200,7 +200,7 @@ static void onTdcCallback(void) {
|
|||
static void tdcMarkCallback(trigger_event_e ckpSignalType, uint32_t index0 DECLARE_ENGINE_PARAMETER_S) {
|
||||
(void) ckpSignalType;
|
||||
bool isTriggerSynchronizationPoint = index0 == 0;
|
||||
if (isTriggerSynchronizationPoint && engineConfiguration->isDigitalChartEnabled) {
|
||||
if (isTriggerSynchronizationPoint && engineConfiguration->isEngineChartEnabled) {
|
||||
int revIndex2 = engine->rpmCalculator.getRevolutionCounter() % 2;
|
||||
int rpm = getRpm();
|
||||
// todo: use event-based scheduling, not just time-based scheduling
|
||||
|
|
|
@ -94,24 +94,24 @@ bool_t WaveChart::isStartedTooLongAgo() {
|
|||
/**
|
||||
* Say at 300rpm we should get at least four events per revolution.
|
||||
* That's 300/60*4=20 events per second
|
||||
* digitalChartSize/20 is the longest meaningful chart.
|
||||
* engineChartSize/20 is the longest meaningful chart.
|
||||
*
|
||||
*/
|
||||
uint64_t chartDurationNt = getTimeNowNt() - startTimeNt;
|
||||
return startTimeNt != 0 && NT2US(chartDurationNt) > engineConfiguration->digitalChartSize * 1000000 / 20;
|
||||
return startTimeNt != 0 && NT2US(chartDurationNt) > engineConfiguration->engineChartSize * 1000000 / 20;
|
||||
}
|
||||
|
||||
bool_t WaveChart::isWaveChartFull() {
|
||||
return counter >= engineConfiguration->digitalChartSize;
|
||||
return counter >= engineConfiguration->engineChartSize;
|
||||
}
|
||||
|
||||
static void printStatus(void) {
|
||||
scheduleMsg(&logger, "digital chart: %s", boolToString(engineConfiguration->isDigitalChartEnabled));
|
||||
scheduleMsg(&logger, "chartsize=%d", engineConfiguration->digitalChartSize);
|
||||
scheduleMsg(&logger, "digital chart: %s", boolToString(engineConfiguration->isEngineChartEnabled));
|
||||
scheduleMsg(&logger, "chartsize=%d", engineConfiguration->engineChartSize);
|
||||
}
|
||||
|
||||
static void setChartActive(int value) {
|
||||
engineConfiguration->isDigitalChartEnabled = value;
|
||||
engineConfiguration->isEngineChartEnabled = value;
|
||||
printStatus();
|
||||
maxLockTime = 0;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ void setChartSize(int newSize) {
|
|||
if (newSize < 5) {
|
||||
return;
|
||||
}
|
||||
engineConfiguration->digitalChartSize = newSize;
|
||||
engineConfiguration->engineChartSize = newSize;
|
||||
printStatus();
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ void WaveChart::publishChart() {
|
|||
scheduleSimpleMsg(&debugLogging, "IT'S TIME", strlen(l->buffer));
|
||||
#endif
|
||||
bool isFullLog = getFullLog();
|
||||
if (engineConfiguration->isDigitalChartEnabled && isFullLog) {
|
||||
if (engineConfiguration->isEngineChartEnabled && isFullLog) {
|
||||
scheduleLogging(&logging);
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ void WaveChart::addWaveChartEvent3(const char *name, const char * msg) {
|
|||
if (engine->rpmCalculator.getRevolutionCounter() < skipUntilEngineCycle)
|
||||
return;
|
||||
efiAssertVoid(name!=NULL, "WC: NULL name");
|
||||
if (!engineConfiguration->isDigitalChartEnabled) {
|
||||
if (!engineConfiguration->isEngineChartEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ void showWaveChartHistogram(void) {
|
|||
|
||||
void initWaveChart(WaveChart *chart) {
|
||||
|
||||
if (!engineConfiguration->isDigitalChartEnabled) {
|
||||
if (!engineConfiguration->isEngineChartEnabled) {
|
||||
printMsg(&logger, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! chart disabled");
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@ public class Fields {
|
|||
public static final Field SENSOR_SNIFFER_FREQUENCY = new Field(@@sensorChartFrequency@@, FieldType.INT);
|
||||
public static final Field SENSOR_SNIFFER_MODE = new Field(@@sensorChartMode@@, FieldType.ANALOG_CHART_E);
|
||||
public static final Field GLOBAL_FUEL_CORRECTION = new Field(@@globalFuelCorrection@@, FieldType.FLOAT);
|
||||
public static final Field ENGINE_SNIFFER_SIZE = new Field(@@digitalChartSize@@, FieldType.INT);
|
||||
public static final Field isDigitalChartEnabled = new Field(@@isDigitalChartEnabled@@, FieldType.BIT, 5);
|
||||
public static final Field ENGINE_SNIFFER_SIZE = new Field(@@engineChartSize@@, FieldType.INT);
|
||||
public static final Field isDigitalChartEnabled = new Field(@@isEngineChartEnabled@@, FieldType.BIT, 5);
|
||||
}
|
|
@ -343,6 +343,7 @@ bit is_enabled_spi_2
|
|||
bit isVerboseAlternator
|
||||
bit useSerialPort
|
||||
bit useStepperIdle
|
||||
|
||||
|
||||
brain_input_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins;
|
||||
uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input
|
||||
|
@ -415,7 +416,7 @@ bit hasMapSensor;@see isMapAveragingEnabled
|
|||
bit hasBaroSensor
|
||||
bit hasAfrSensor
|
||||
bit useConstantDwellDuringCranking
|
||||
bit isDigitalChartEnabled
|
||||
bit isEngineChartEnabled
|
||||
bit isCanEnabled
|
||||
bit hasCltSensor
|
||||
bit canReadEnabled
|
||||
|
@ -426,7 +427,8 @@ bit hasMapSensor;@see isMapAveragingEnabled
|
|||
bit isAlternatorControlEnabled
|
||||
bit hasMafSensor
|
||||
bit hasTpsSensor
|
||||
|
||||
bit cutFuelOnHardLimit
|
||||
bit cutSparkOnHardLimit
|
||||
|
||||
adc_channel_e hipOutputChannel;
|
||||
|
||||
|
@ -450,7 +452,7 @@ bit hasMapSensor;@see isMapAveragingEnabled
|
|||
bit useOnlyFrontForTrigger;See #172
|
||||
|
||||
|
||||
uint32_t digitalChartSize;;"count", 1, 0, 0, 300, 0
|
||||
uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0
|
||||
|
||||
float ignitionDwellForCrankingMs;;"ms", 1, 0, 0, 200, 1
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated by ConfigDefinition.jar on Thu Apr 23 14:13:46 EDT 2015
|
||||
; this section was generated by ConfigDefinition.jar on Thu Apr 23 17:29:27 EDT 2015
|
||||
|
||||
pageSize = 15288
|
||||
page = 1
|
||||
|
@ -387,7 +387,7 @@ page = 1
|
|||
hasBaroSensor = bits, U32, 1488, [2:2], "false", "true"
|
||||
hasAfrSensor = bits, U32, 1488, [3:3], "false", "true"
|
||||
useConstantDwellDuringCranking= bits, U32, 1488, [4:4], "false", "true"
|
||||
isDigitalChartEnabled = bits, U32, 1488, [5:5], "false", "true"
|
||||
isEngineChartEnabled = bits, U32, 1488, [5:5], "false", "true"
|
||||
isCanEnabled = bits, U32, 1488, [6:6], "false", "true"
|
||||
hasCltSensor = bits, U32, 1488, [7:7], "false", "true"
|
||||
canReadEnabled = bits, U32, 1488, [8:8], "false", "true"
|
||||
|
@ -398,6 +398,8 @@ page = 1
|
|||
isAlternatorControlEnabled= bits, U32, 1488, [13:13], "false", "true"
|
||||
hasMafSensor = bits, U32, 1488, [14:14], "false", "true"
|
||||
hasTpsSensor = bits, U32, 1488, [15:15], "false", "true"
|
||||
cutFuelOnHardLimit = bits, U32, 1488, [16:16], "false", "true"
|
||||
cutSparkOnHardLimit = bits, U32, 1488, [17:17], "false", "true"
|
||||
hipOutputChannel = bits, U32, 1492, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||
;skipping idleMode offset 1496
|
||||
isInjectionEnabled = bits, U32, 1500, [0:0], "false", "true"
|
||||
|
@ -415,7 +417,7 @@ page = 1
|
|||
isManualSpinningMode = bits, U32, 1500, [12:12], "false", "true"
|
||||
twoWireBatch = bits, U32, 1500, [13:13], "false", "true"
|
||||
useOnlyFrontForTrigger = bits, U32, 1500, [14:14], "false", "true"
|
||||
digitalChartSize = scalar, U32, 1504, "count", 1, 0, 0, 300, 0
|
||||
engineChartSize = scalar, U32, 1504, "count", 1, 0, 0, 300, 0
|
||||
ignitionDwellForCrankingMs = scalar, F32, 1508, "ms", 1, 0, 0, 200, 1
|
||||
;skipping targetIdleRpm offset 1512
|
||||
acSwitchAdc = bits, U32, 1516, [0:3] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5"
|
||||
|
@ -1250,7 +1252,7 @@ fileVersion = { 20150406 }
|
|||
field = "Logic input channel 3", logicAnalyzerPins3
|
||||
field = "Logic input channel 4", logicAnalyzerPins4
|
||||
field = ""
|
||||
field = "digital chart size", digitalChartSize
|
||||
field = "Engine Sniffer size", engineChartSize
|
||||
|
||||
; Tuning->General
|
||||
dialog = generalSettings, "General"
|
||||
|
|
Loading…
Reference in New Issue