auto-sync

This commit is contained in:
rusEfi 2015-05-07 23:04:50 -04:00
parent 1062e2fe72
commit 00a0383a3a
10 changed files with 196 additions and 246 deletions

View File

@ -16,7 +16,7 @@
/**
* this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version
*/
#define TS_FILE_VERSION 20150406
#define TS_FILE_VERSION 20150506
#define PAGE_COUNT 2

View File

@ -17,26 +17,8 @@
EXTERN_ENGINE
;
//#if EFI_PROD_CODE
//static THD_WORKING_AREA(aeThreadStack, UTILITY_THREAD_STACK_SIZE);
//#endif
static Logging *logger;
void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfiguration, float engineLoad) {
// for (int i = 3; i == 1; i--)
// array[i] = array[i - 1];
//
// array[0] = engineLoad;
//
// diffEnrichment = ((3 * (array[0] - array[1]) + (array[2] - array[3])) / 4)
// * (engineConfiguration->diffLoadEnrichmentCoef);
}
//float AccelEnrichmemnt::getDiffEnrichment() {
// return diffEnrichment;
//}
float AccelEnrichmemnt::getDelta() {
return cb.maxValue(cb.getSize());
}
@ -88,26 +70,6 @@ AccelEnrichmemnt::AccelEnrichmemnt() {
cb.setSize(4);
}
//#if EFI_PROD_CODE
//
//static msg_t DiffEnrichmentThread(int param) {
// chRegSetThreadName("Diff Enrichment");
// while (TRUE) {
// instance.updateDiffEnrichment(engineConfiguration, getEngineLoadT(PASS_ENGINE_PARAMETER_F));
// chThdSleepMilliseconds(100);
// }
//#if defined __GNUC__
// return -1;
//#endif
//}
//void initDiffEnrichment(void) {
// chThdCreateStatic(aeThreadStack, sizeof(aeThreadStack), LOWPRIO, (tfunc_t) DiffEnrichmentThread, NULL);
//}
//#endif
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
static void accelInfo() {

View File

@ -18,8 +18,6 @@
class AccelEnrichmemnt {
public:
AccelEnrichmemnt();
void updateDiffEnrichment(engine_configuration_s *engineConfiguration,
float engineLoad);
float getMapEnrichment(DECLARE_ENGINE_PARAMETER_F);
floatms_t getTpsEnrichment(DECLARE_ENGINE_PARAMETER_F);
float getDelta();

View File

@ -376,8 +376,6 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->baroSensor.valueAt0 = 0;
engineConfiguration->baroSensor.valueAt5 = 500;
engineConfiguration->diffLoadEnrichmentCoef = 1;
engineConfiguration->hasMapSensor = true;
engineConfiguration->hasMafSensor = true;
engineConfiguration->hasTpsSensor = true;

View File

@ -1,4 +1,4 @@
// this section was generated by config_definition.jar on Sun May 03 17:39:30 EDT 2015
// this section was generated by config_definition.jar on Thu May 07 22:03:25 EDT 2015
// begin
#include "rusefi_types.h"
typedef struct {
@ -656,21 +656,21 @@ typedef struct {
* offset 80
*/
int16_t directSelfStimulation;
/**
* offset 82
*/
uint16_t unused334;
/**
* todo: extract these two fields into a structure
* todo: we need two sets of TPS parameters - modern ETBs have two sensors
* offset 82
* offset 84
*/
int16_t tpsMin;
/**
* tpsMax value as 10 bit ADC value. Not Voltage!
* offset 84
*/
int16_t tpsMax;
/**
* offset 86
*/
uint16_t unused334;
int16_t tpsMax;
/**
* todo: finish implementation. These values are used for TPS disconnect detection
* offset 88
@ -683,69 +683,68 @@ typedef struct {
/**
* offset 92
*/
float primingSquirtDurationMs;
/**
* 360 for two-stroke
* 720 for four-stroke
* offset 96
*/
int engineCycle;
cranking_parameters_s cranking;
/**
* offset 100
*/
cranking_parameters_s cranking;
float primingSquirtDurationMs;
/**
* offset 104
*/
float ignitionDwellForCrankingMs;
/**
* While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft
* degrees, not in absolute time as in running mode.
* offset 108
*/
float crankingChargeAngle;
/**
* @see hasMapSensor
* @see isMapAveragingEnabled
* offset 108
* offset 112
*/
MAP_sensor_config_s map;
/**
* todo: merge with channel settings, use full-scale Thermistor here!
* offset 252
* offset 256
*/
ThermistorConf clt;
/**
* offset 292
* offset 296
*/
ThermistorConf iat;
/**
* offset 332
* offset 336
*/
float sparkDwellBins[DWELL_COUNT];
/**
* offset 364
* offset 368
*/
float sparkDwell[DWELL_COUNT];
/**
* this value could be used to offset the whole ignition timing table by a constant
* offset 396
*/
float ignitionBaseAngle;
/**
* While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft
* degrees, not in absolute time as in running mode.
* offset 400
*/
float crankingChargeAngle;
/**
* offset 404
*/
timing_mode_e timingMode;
/**
* This value is used in 'fixed timing' mode, i.e. constant timing
* This mode is useful for instance while adjusting distributor location
* offset 408
*/
float fixedModeTiming;
/**
* offset 412
*/
specs_s specs;
/**
* offset 424
* Cylinder diameter, in mm.
* offset 412
*/
float cylinderBore;
/**
* 360 for two-stroke
* 720 for four-stroke
* offset 416
*/
int engineCycle;
/**
* offset 420
*/
int rpmHardLimit;
/**
* This setting controls which algorithm is used for ENGINE LOAD
* offset 424
*/
engine_load_mode_e algorithm;
/**
* offset 428
*/
@ -754,315 +753,318 @@ typedef struct {
* offset 432
*/
injection_mode_e injectionMode;
/**
* this is about deciding when the injector starts it's squirt
* offset 436
*/
float injectionAngle;
/**
* offset 440
*/
float crankingTimingAngle;
/**
* offset 444
*/
ignition_mode_e ignitionMode;
/**
* this value could be used to offset the whole ignition timing table by a constant
* offset 448
*/
float ignitionBaseAngle;
/**
* offset 452
*/
timing_mode_e timingMode;
/**
* This value is used in 'fixed timing' mode, i.e. constant timing
* This mode is useful for instance while adjusting distributor location
* offset 456
*/
float fixedModeTiming;
/**
* This field is the angle between Top Dead Center (TDC) and the first trigger event.
* Knowing this angle allows us to control timing and other angles in reference to TDC.
* offset 436
* offset 460
*/
float globalTriggerAngleOffset;
/**
* This parameter holds the coefficient of input voltage dividers
* offset 440
* offset 464
*/
float analogInputDividerCoefficient;
/**
* This setting controls which algorithm is used for ENGINE LOAD
* offset 444
*/
engine_load_mode_e algorithm;
/**
* offset 448
* Battery Voltage input resistor divider coefficient
* offset 468
*/
float vbattDividerCoeff;
/**
* offset 472
*/
adc_channel_e vbattAdcChannel;
/**
* Cooling fan turn-on temperature threshold, in Celsuis
* offset 452
* offset 476
*/
float fanOnTemperature;
/**
* Cooling fan turn-off temperature threshold, in Celsuis
* offset 456
* offset 480
*/
float fanOffTemperature;
/**
* offset 460
* offset 484
*/
int ususedBla;
/**
* This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h
* offset 464
* offset 488
*/
float vehicleSpeedCoef;
/**
* offset 468
* offset 492
*/
can_nbc_e canNbcType;
/**
* offset 472
* CANbus thread period, ms
* offset 496
*/
int canSleepPeriod;
/**
* offset 476
*/
ignition_mode_e ignitionMode;
/**
* offset 480
* offset 500
*/
operation_mode_e operationMode;
/**
* offset 484
* offset 504
*/
display_mode_e displayMode;
/**
* offset 488
* offset 508
*/
log_format_e logFormat;
/**
* offset 492
* offset 512
*/
int firmwareVersion;
/**
* offset 496
* offset 516
*/
int HD44780width;
/**
* offset 500
* offset 520
*/
int HD44780height;
/**
* offset 504
* offset 524
*/
adc_channel_e tpsAdcChannel;
/**
* offset 508
* offset 528
*/
int overrideCrankingIgnition;
/**
* offset 512
* offset 532
*/
int sensorChartFrequency;
/**
* offset 516
* offset 536
*/
trigger_config_s trigger;
/**
* offset 544
* offset 564
*/
spi_device_e hip9011SpiDevice;
/**
* offset 548
*/
adc_channel_e vbattAdcChannel;
/**
* offset 552
* offset 568
*/
float globalFuelCorrection;
/**
* todo: merge with channel settings, use full-scale Thermistor!
* offset 556
* offset 572
*/
adc_channel_e cltAdcChannel;
/**
* offset 560
* offset 576
*/
adc_channel_e iatAdcChannel;
/**
* offset 564
* offset 580
*/
adc_channel_e mafAdcChannel;
/**
* @see hasAfrSensor
* offset 568
* offset 584
*/
afr_sensor_s afr;
/**
* this is about deciding when the injector starts it's squirt
* offset 588
* offset 604
*/
float injectionAngle;
/**
* offset 592
*/
float crankingTimingAngle;
/**
* offset 596
*/
float diffLoadEnrichmentCoef;
float unused596;
/**
* @see hasBaroSensor
* offset 600
* offset 608
*/
air_pressure_sensor_config_s baroSensor;
/**
* offset 616
* offset 624
*/
board_configuration_s bc;
/**
* @see isMapAveragingEnabled
offset 1488 bit 0 */
offset 1496 bit 0 */
bool_t hasMapSensor : 1;
/**
offset 1488 bit 1 */
offset 1496 bit 1 */
bool_t hasIatSensor : 1;
/**
offset 1488 bit 2 */
offset 1496 bit 2 */
bool_t hasBaroSensor : 1;
/**
offset 1488 bit 3 */
offset 1496 bit 3 */
bool_t hasAfrSensor : 1;
/**
offset 1488 bit 4 */
offset 1496 bit 4 */
bool_t useConstantDwellDuringCranking : 1;
/**
offset 1488 bit 5 */
offset 1496 bit 5 */
bool_t isEngineChartEnabled : 1;
/**
offset 1488 bit 6 */
offset 1496 bit 6 */
bool_t isCanEnabled : 1;
/**
offset 1488 bit 7 */
offset 1496 bit 7 */
bool_t hasCltSensor : 1;
/**
offset 1488 bit 8 */
offset 1496 bit 8 */
bool_t canReadEnabled : 1;
/**
offset 1488 bit 9 */
offset 1496 bit 9 */
bool_t canWriteEnabled : 1;
/**
offset 1488 bit 10 */
offset 1496 bit 10 */
bool_t hasVehicleSpeedSensor : 1;
/**
offset 1488 bit 11 */
offset 1496 bit 11 */
bool_t isJoystickEnabled : 1;
/**
offset 1488 bit 12 */
offset 1496 bit 12 */
bool_t isGpsEnabled : 1;
/**
offset 1488 bit 13 */
offset 1496 bit 13 */
bool_t isAlternatorControlEnabled : 1;
/**
offset 1488 bit 14 */
offset 1496 bit 14 */
bool_t hasMafSensor : 1;
/**
offset 1488 bit 15 */
offset 1496 bit 15 */
bool_t hasTpsSensor : 1;
/**
offset 1488 bit 16 */
offset 1496 bit 16 */
bool_t cutFuelOnHardLimit : 1;
/**
offset 1488 bit 17 */
offset 1496 bit 17 */
bool_t cutSparkOnHardLimit : 1;
/**
* offset 1492
* offset 1500
*/
adc_channel_e hipOutputChannel;
/**
* offset 1496
* offset 1504
*/
idle_mode_e idleMode;
/**
offset 1500 bit 0 */
offset 1508 bit 0 */
bool_t isInjectionEnabled : 1;
/**
offset 1500 bit 1 */
offset 1508 bit 1 */
bool_t isIgnitionEnabled : 1;
/**
offset 1500 bit 2 */
offset 1508 bit 2 */
bool_t isCylinderCleanupEnabled : 1;
/**
offset 1500 bit 3 */
offset 1508 bit 3 */
bool_t secondTriggerChannelEnabled : 1;
/**
offset 1500 bit 4 */
offset 1508 bit 4 */
bool_t needSecondTriggerInputDeprecated : 1;
/**
offset 1500 bit 5 */
offset 1508 bit 5 */
bool_t isMapAveragingEnabled : 1;
/**
offset 1500 bit 6 */
offset 1508 bit 6 */
bool_t isMilEnabled : 1;
/**
offset 1500 bit 7 */
offset 1508 bit 7 */
bool_t isFuelPumpEnabled : 1;
/**
offset 1500 bit 8 */
offset 1508 bit 8 */
bool_t isTunerStudioEnabled : 1;
/**
offset 1500 bit 9 */
offset 1508 bit 9 */
bool_t isWaveAnalyzerEnabled : 1;
/**
offset 1500 bit 10 */
offset 1508 bit 10 */
bool_t isIdleThreadEnabled : 1;
/**
offset 1500 bit 11 */
offset 1508 bit 11 */
bool_t isPrintTriggerSynchDetails : 1;
/**
* Usually if we have no trigger events that means engine is stopped
* Unless we are troubleshooting and spinning the engine by hand - this case a longer
* delay is needed
offset 1500 bit 12 */
offset 1508 bit 12 */
bool_t isManualSpinningMode : 1;
/**
offset 1500 bit 13 */
offset 1508 bit 13 */
bool_t twoWireBatch : 1;
/**
* See #172
offset 1500 bit 14 */
offset 1508 bit 14 */
bool_t useOnlyFrontForTrigger : 1;
/**
* offset 1504
* offset 1512
*/
uint32_t engineChartSize;
/**
* offset 1508
*/
float ignitionDwellForCrankingMs;
/**
* offset 1512
* offset 1516
*/
int targetIdleRpm;
/**
* A/C button input handled as analog input
* offset 1516
* offset 1520
*/
adc_channel_e acSwitchAdc;
/**
* offset 1520
* offset 1524
*/
int ignMathCalculateAtIndex;
/**
* offset 1524
* offset 1528
*/
int16_t acCutoffLowRpm;
/**
* offset 1526
* offset 1530
*/
int16_t acCutoffHighRpm;
/**
* offset 1528
* offset 1532
*/
int16_t acIdleRpmBump;
/**
* offset 1530
* offset 1534
*/
int16_t unusedShort;
/**
* offset 1532
* offset 1536
*/
adc_channel_e vRefAdcChannel;
/**
* offset 1536
* offset 1540
*/
float knockDetectionWindowStart;
/**
* offset 1540
*/
float knockDetectionWindowEnd;
/**
* Cylinder diameter, in mm.
* offset 1544
*/
float cylinderBore;
float knockDetectionWindowEnd;
/**
* offset 1548
*/
@ -1290,4 +1292,4 @@ typedef struct {
} persistent_config_s;
// end
// this section was generated by config_definition.jar on Sun May 03 17:39:30 EDT 2015
// this section was generated by config_definition.jar on Thu May 07 22:03:25 EDT 2015

View File

@ -12,7 +12,7 @@
#include "engine_configuration.h"
#include "engine.h"
#define FLASH_DATA_VERSION 7900
#define FLASH_DATA_VERSION 8000
void readFromFlash(void);
void initFlash(Logging *sharedLogger, Engine *engine);

View File

@ -109,21 +109,22 @@ end_struct
injector_s injector
int16_t directSelfStimulation;Should the trigger emulator push data right into trigger input, eliminating the need for physical jumper wires?\nPS: Funny name, right? :)\ntodo: make this a bit on some bit field
uint16_t unused334;
int16_t tpsMin;todo: extract these two fields into a structure\ntodo: we need two sets of TPS parameters - modern ETBs have two sensors;"ADC", 1, 0, 0, 1023, 0
int16_t tpsMax;tpsMax value as 10 bit ADC value. Not Voltage!;"ADC", 1, 0, 0, 1023, 0
uint16_t unused334;
int16_t tpsErrorLowValue;todo: finish implementation. These values are used for TPS disconnect detection;"*C", 1, 0, -40, 200, 1
int16_t tpsErrorHighValue;;"*C", 1, 0, -40, 200, 1
float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1
int engineCycle;360 for two-stroke\n720 for four-stroke;"engine cycle", 1, 0, 0, 1000, 0
cranking_parameters_s cranking
float primingSquirtDurationMs;;"*C", 1, 0, -40, 200, 1
float ignitionDwellForCrankingMs;;"ms", 1, 0, 0, 200, 1
float crankingChargeAngle;While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.;"deg", 1, 0, 0, 3000.0, 0
MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled
@ -133,18 +134,6 @@ ThermistorConf iat;
float[DWELL_COUNT] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2
float[DWELL_COUNT] sparkDwell;;"ms", 1, 0.0, 0.0, 30.0, 2
float ignitionBaseAngle;this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0
float crankingChargeAngle;While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft\ndegrees, not in absolute time as in running mode.;"deg", 1, 0, 0, 3000.0, 0
custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed"
timing_mode_e timingMode;
float fixedModeTiming;This value is used in 'fixed timing' mode, i.e. constant timing\nThis mode is useful for instance while adjusting distributor location;"RPM", 1, 0, 0, 3000.0, 0
struct_no_prefix specs_s
float displacement;Engine displacement, in liters\nsee also cylindersCount;"L", 1, 0, 0, 1000.0, 2
@ -156,19 +145,38 @@ firing_order_e firingOrder;
end_struct
specs_s specs
float cylinderBore;Cylinder diameter, in mm.
int engineCycle;360 for two-stroke\n720 for four-stroke;"engine cycle", 1, 0, 0, 1000, 0
int rpmHardLimit;;"rpm", 1, 0, 0, 20000.0, 2
custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "INVALID"
injection_mode_e crankingInjectionMode;
injection_mode_e injectionMode;
float globalTriggerAngleOffset;This field is the angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.;"deg", 1, 0, 0, 720, 0
float analogInputDividerCoefficient;This parameter holds the coefficient of input voltage dividers;"coef", 1, 0, 0.01, 10.0, 2
custom engine_load_mode_e 4 bits, U32, @OFFSET@, [0:1], "MAF", "Alpha-N/TPS", "MAP", "SPEED DENSITY"
engine_load_mode_e algorithm;This setting controls which algorithm is used for ENGINE LOAD
float vbattDividerCoeff;;"coef", 1, 0, 0.01, 20.0, 2
custom injection_mode_e 4 bits, U32, @OFFSET@, [0:1], "Simultaneous", "Sequential", "Batch", "INVALID"
injection_mode_e crankingInjectionMode;
injection_mode_e injectionMode;
float injectionAngle;this is about deciding when the injector starts it's squirt;"deg", 1, 0.0, 0, 1000.0, 2
float crankingTimingAngle;; "deg", 1, 0.0, -360, 360, 2
custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "INVALID"
ignition_mode_e ignitionMode;
float ignitionBaseAngle;this value could be used to offset the whole ignition timing table by a constant;"RPM", 1, 0, 0, 3000.0, 0
custom timing_mode_e 4 bits, U32, @OFFSET@ [0:0], "dynamic", "fixed"
timing_mode_e timingMode;
float fixedModeTiming;This value is used in 'fixed timing' mode, i.e. constant timing\nThis mode is useful for instance while adjusting distributor location;"RPM", 1, 0, 0, 3000.0, 0
float globalTriggerAngleOffset;This field is the angle between Top Dead Center (TDC) and the first trigger event.\nKnowing this angle allows us to control timing and other angles in reference to TDC.;"deg", 1, 0, 0, 720, 0
float analogInputDividerCoefficient;This parameter holds the coefficient of input voltage dividers;"coef", 1, 0, 0.01, 10.0, 2
float vbattDividerCoeff;Battery Voltage input resistor divider coefficient;"coef", 1, 0, 0.01, 20.0, 2
adc_channel_e vbattAdcChannel;
float fanOnTemperature;Cooling fan turn-on temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 2
float fanOffTemperature;Cooling fan turn-off temperature threshold, in Celsuis;"*C", 1, 0, 0, 1000.0, 2
@ -178,10 +186,8 @@ float vehicleSpeedCoef;This coefficient translates vehicle speed input frequency
custom can_nbc_e 4 bits, U32, @OFFSET@, [0:1], "BMW", "FIAT", "VAG" , "INVALID"
can_nbc_e canNbcType;
int canSleepPeriod;;"ms", 1, 0, 0, 1000.0, 2
int canSleepPeriod;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2
custom ignition_mode_e 4 bits, U32, @OFFSET@, [0:1], "One coil", "Individual Coils", "Wasted", "INVALID"
ignition_mode_e ignitionMode;
custom operation_mode_e 4 bits, U32, @OFFSET@, [0:1], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke"
operation_mode_e operationMode;
@ -225,7 +231,6 @@ trigger_config_s trigger;
custom spi_device_e 4 bits,U32, @OFFSET@, [0:1], "Off", "SPI1", "SPI2", "SPI3"
spi_device_e hip9011SpiDevice;
adc_channel_e vbattAdcChannel;
float globalFuelCorrection;;"coef", 1, 0.0, 0, 1000.0, 2
@ -245,10 +250,8 @@ struct afr_sensor_s
end_struct
afr_sensor_s afr;@see hasAfrSensor
float injectionAngle;this is about deciding when the injector starts it's squirt;"deg", 1, 0.0, 0, 1000.0, 2
float crankingTimingAngle;; "deg", 1, 0.0, -360, 360, 2
float diffLoadEnrichmentCoef;
float unused596;
air_pressure_sensor_config_s baroSensor;@see hasBaroSensor
@ -456,7 +459,6 @@ bit cutSparkOnHardLimit
uint32_t engineChartSize;;"count", 1, 0, 0, 300, 0
float ignitionDwellForCrankingMs;;"ms", 1, 0, 0, 200, 1
int targetIdleRpm;
@ -475,7 +477,6 @@ bit cutSparkOnHardLimit
float knockDetectionWindowStart;
float knockDetectionWindowEnd;
float cylinderBore;Cylinder diameter, in mm.
float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0
float hipThreshold;

View File

@ -290,5 +290,5 @@ int getRusEfiVersion(void) {
return 123; // this is here to make the compiler happy about the unused array
if (UNUSED_CCM_SIZE[0] * 0 != 0)
return 3211; // this is here to make the compiler happy about the unused array
return 20150506;
return 20150507;
}

View File

@ -5,11 +5,11 @@ package com.rusefi.config;
*/
public class Fields {
public static final Field SENSOR_SNIFFER_FREQUENCY = new Field(512, FieldType.INT);
public static final Field SENSOR_SNIFFER_MODE = new Field(1400, FieldType.ANALOG_CHART_E);
public static final Field GLOBAL_FUEL_CORRECTION = new Field(552, FieldType.FLOAT);
public static final Field ENGINE_SNIFFER_SIZE = new Field(1504, FieldType.INT);
public static final Field isDigitalChartEnabled = new Field(1488, FieldType.BIT, 5);
public static final Field SENSOR_SNIFFER_FREQUENCY = new Field(532, FieldType.INT);
public static final Field SENSOR_SNIFFER_MODE = new Field(1408, FieldType.ANALOG_CHART_E);
public static final Field GLOBAL_FUEL_CORRECTION = new Field(568, FieldType.FLOAT);
public static final Field ENGINE_SNIFFER_SIZE = new Field(1512, FieldType.INT);
public static final Field isDigitalChartEnabled = new Field(1496, FieldType.BIT, 5);
public static final Field triggerType = new Field(516, FieldType.INT, "custom toothed wheel", "ford aspire", "dodge neon", "Miata NA", "Miata NB", "GM_7X", "Cooper", "Mazda SOHC 4", "60/2", "36/1", "Accord CD", "MITSU", "ACCORD 2", "ACCORD DIP", "Neon 2003", "MAZDA D 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID");
public static final Field triggerInputPins1 = new Field(912, FieldType.INT, "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID");
public static final Field triggerInputPins2 = new Field(916, FieldType.INT, "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOA_5", "INVALID", "INVALID", "GPIOA_8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOC_6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "GPIOE_5", "INVALID", "GPIOE_7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID");

View File

@ -17,19 +17,8 @@ void testAccelEnrichment(void) {
engine_configuration_s *engineConfiguration = &ec;
printf("*************************************************** testAccelEnrichment\r\n");
engineConfiguration->diffLoadEnrichmentCoef = 1;
// todo: fix the implementation
// todo: add constructor which would reset state properly
// todo: add test
AccelEnrichmemnt instance;
for (int i = 0; i == 3; i++)
instance.updateDiffEnrichment(engineConfiguration, i);
// assertEqualsM("diff=1", 1, instance.getDiffEnrichment());
for (int i = 3; i == 0; i++)
instance.updateDiffEnrichment(engineConfiguration, i);
// assertEqualsM("diff=1", 1, instance.getDiffEnrichment());
}