auto-sync

This commit is contained in:
rusEfi 2014-12-09 20:03:04 -06:00
parent bc3b7a1eb6
commit b61f93242e
3 changed files with 19 additions and 6 deletions

View File

@ -4,6 +4,7 @@
* DODGE_NEON_1995 = 2
*
* DODGE_NEON_2003 = 23
* set_engine_type 23
*
* This config overrides some values of the default configuration which is set by setDefaultConfiguration() method
*
@ -274,8 +275,8 @@ void setDodgeNeonNGCEngineConfiguration(engine_configuration_s *engineConfigurat
*/
engineConfiguration->cltAdcChannel = EFI_ADC_12;
setFsioExt(engineConfiguration, 0, GPIOE_10, "0.6", 400);
boardConfiguration->fsio_setting[0] = 0.55;
setFsioExt(engineConfiguration, 0, GPIOE_10, "0 fsio_setting", 400);
}
#endif /* EFI_SUPPORT_DODGE_NEON */

View File

@ -443,6 +443,10 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER);
float baseFuelMs = getBaseTableFuel(engineConfiguration, (int) rpm, engineLoad);
// header
tsOutputChannels->tsConfigVersion = TS_FILE_VERSION;
// engine state
tsOutputChannels->rpm = rpm;
tsOutputChannels->coolant_temperature = coolant;
tsOutputChannels->intake_air_temperature = intake;
@ -450,10 +454,11 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
tsOutputChannels->mass_air_flow = getMaf();
tsOutputChannels->air_fuel_ratio = getAfr();
tsOutputChannels->v_batt = getVBatt(engineConfiguration);
tsOutputChannels->tsConfigVersion = TS_FILE_VERSION;
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
tsOutputChannels->atmospherePressure = getBaroPressure();
tsOutputChannels->manifold_air_pressure = getMap();
tsOutputChannels->engineLoad = engineLoad;
tsOutputChannels->checkEngine = hasErrorCodes();
#if EFI_PROD_CODE
tsOutputChannels->egtValues.values[0] = getEgtValue(boardConfiguration, 0);
@ -476,6 +481,7 @@ void updateTunerStudioState(Engine *engine, TunerStudioOutputChannels *tsOutputC
float timing = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER);
tsOutputChannels->inj_adv = timing > 360 ? timing - 720 : timing;
tsOutputChannels->sparkDwell = getSparkDwellMsT(rpm PASS_ENGINE_PARAMETER);
tsOutputChannels->baseFuel = baseFuelMs;
tsOutputChannels->pulseWidthMs = getRunningFuel(baseFuelMs, rpm PASS_ENGINE_PARAMETER);
tsOutputChannels->crankingFuelMs = getCrankingFuel(engine);
}

View File

@ -36,22 +36,28 @@ typedef struct {
float throttle_positon; // size 4, offset 12
float mass_air_flow; // size 4, offset 16
float air_fuel_ratio; // size 4, offset 20
float fuel_load; // size 4, offset 24
float engineLoad; // size 4, offset 24
float v_batt; // size 4, offset 28
short int tpsADC; // size 2, offset 32
short int alignment; // size 2, offset 34
float atmospherePressure; // size 4, offset 36
float manifold_air_pressure; // size 4, offset 40
float crankingFuelMs;
int unused;
/**
* This is the raw value we take from the fuel map or base fuel algorithm, before the corrections
*/
float baseFuel;
float tCharge; // 52
float inj_adv; // 56
float sparkDwell; // 60
/**
* this one contains fuel with all corrections. See also baseFuel
*/
float pulseWidthMs; // 64
float warmUpEnrich; // 68
/**
* Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot
* water 4 bytes per trafic - I want gauges to work as fast as possible
* water 4 bytes per traffic - I want gauges to work as fast as possible
*/
unsigned int hasSdCard : 1; // bit 0
unsigned int ignition_enabled : 1; // bit 1