auto-sync

This commit is contained in:
rusEfi 2015-03-19 07:10:09 -05:00
parent 961716d6c2
commit df32e6d6da
4 changed files with 15 additions and 6 deletions

View File

@ -66,4 +66,11 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
// todo engineConfiguration->afr.hwChannel = EFI_ADC_3;
initEgoSensor(&engineConfiguration->afr, ES_Innovate_MTX_L);
#if EFI_FSIO || defined(__DOXYGEN__)
// backup main relay pin
setFsio(engineConfiguration, 0, GPIOE_6, "1");
#endif
}

View File

@ -41,7 +41,7 @@ typedef struct {
float massAirFlowVoltage; // size 4, offset 16
float airFuelRatio; // size 4, offset 20
float engineLoad; // size 4, offset 24
float v_batt; // size 4, offset 28
float vBatt; // size 4, offset 28
short int tpsADC; // size 2, offset 32
short int alignment; // size 2, offset 34
float atmospherePressure; // size 4, offset 36
@ -52,7 +52,7 @@ typedef struct {
*/
float baseFuel; // 48
float tCharge; // 52
float inj_adv; // 56
float ignitionAdvance; // 56
float sparkDwell; // 60
/**
* this one contains fuel with all corrections. See also baseFuel

View File

@ -544,7 +544,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->massAirFlowValue = getRealMaf();
tsOutputChannels->veValue = veMap.getValue(getMap(), rpm);
tsOutputChannels->airFuelRatio = getAfr();
tsOutputChannels->v_batt = getVBatt(engineConfiguration);
tsOutputChannels->vBatt = getVBatt(engineConfiguration);
tsOutputChannels->tpsADC = getTPS10bitAdc(PASS_ENGINE_PARAMETER_F);
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
tsOutputChannels->atmospherePressure = getBaroPressure();
@ -588,7 +588,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->clutchDownState = engine->clutchDownState;
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
float timing = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER);
tsOutputChannels->inj_adv = timing > 360 ? timing - 720 : timing;
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
tsOutputChannels->sparkDwell = getSparkDwellMsT(rpm PASS_ENGINE_PARAMETER);
tsOutputChannels->baseFuel = baseFuelMs;
tsOutputChannels->pulseWidthMs = getRunningFuel(baseFuelMs, rpm PASS_ENGINE_PARAMETER);

View File

@ -15,6 +15,8 @@
#include "rpm_calculator.h"
#include "efiGpio.h"
#define NO_PWM 0
/**
* Here we define all rusEfi-specific methods
*/
@ -126,7 +128,7 @@ void setFsioExt(engine_configuration_s *engineConfiguration, int index, brain_pi
}
void setFsio(engine_configuration_s *engineConfiguration, int index, brain_pin_e pin, const char * exp) {
setFsioExt(engineConfiguration, index, pin, exp, 0);
setFsioExt(engineConfiguration, index, pin, exp, NO_PWM);
}
void applyFsioConfiguration(DECLARE_ENGINE_PARAMETER_F) {
@ -198,7 +200,7 @@ static void handleFsio(Engine *engine, int index) {
if (boardConfiguration->fsioPins[index] == GPIO_UNASSIGNED)
return;
bool_t isPwmMode = boardConfiguration->fsioFrequency[index] != 0;
bool_t isPwmMode = boardConfiguration->fsioFrequency[index] != NO_PWM;
float fvalue = calc.getValue2(fsioLogics[index], engine);
engine->engineConfiguration2->fsioLastValue[index] = fvalue;