auto-sync

This commit is contained in:
rusEfi 2015-05-18 19:05:24 -04:00
parent e265462d53
commit 607b40358c
4 changed files with 11 additions and 12 deletions

View File

@ -207,11 +207,10 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) {
* and the settings saves in flash memory. * and the settings saves in flash memory.
*/ */
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) { void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
prepareVoidConfiguration(engineConfiguration);
#if ! EFI_UNIT_TEST #if ! EFI_UNIT_TEST
memset(&persistentState.persistentConfiguration, 0, sizeof(persistentState.persistentConfiguration)); memset(&persistentState.persistentConfiguration, 0, sizeof(persistentState.persistentConfiguration));
#endif #endif
prepareVoidConfiguration(engineConfiguration);
boardConfiguration->mafSensorType = Bosch0280218037; boardConfiguration->mafSensorType = Bosch0280218037;
setBosch0280218037(config); setBosch0280218037(config);

View File

@ -490,6 +490,12 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
initSettings(engineConfiguration); initSettings(engineConfiguration);
#endif #endif
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
if (engineConfiguration->isTunerStudioEnabled) {
startTunerStudioConnectivity();
}
#endif
if (hasFirmwareError()) { if (hasFirmwareError()) {
return; return;
} }
@ -520,12 +526,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
initRpmCalculator(engine); initRpmCalculator(engine);
#endif /* EFI_SHAFT_POSITION_INPUT */ #endif /* EFI_SHAFT_POSITION_INPUT */
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
if (engineConfiguration->isTunerStudioEnabled) {
startTunerStudioConnectivity();
}
#endif
// multiple issues with this initMapAdjusterThread(); // multiple issues with this initMapAdjusterThread();
initPeriodicEvents(PASS_ENGINE_PARAMETER_F); initPeriodicEvents(PASS_ENGINE_PARAMETER_F);

View File

@ -214,12 +214,12 @@ static msg_t benchThread(int param) {
#endif #endif
} }
extern engine_configuration_s *activeConfiguration; extern engine_configuration_s activeConfiguration;
void stopInjectionPins(void) { void stopInjectionPins(void) {
for (int i = 0; i < INJECTION_PIN_COUNT; i++) { for (int i = 0; i < INJECTION_PIN_COUNT; i++) {
NamedOutputPin *output = &enginePins.injectors[i]; NamedOutputPin *output = &enginePins.injectors[i];
if (engineConfiguration->bc.injectionPins[i] != activeConfiguration->bc.injectionPins[i]) { if (engineConfiguration->bc.injectionPins[i] != activeConfiguration.bc.injectionPins[i]) {
// unmarkPin // unmarkPin
} }
} }
@ -229,7 +229,7 @@ void startInjectionPins(void) {
// todo: should we move this code closer to the injection logic? // todo: should we move this code closer to the injection logic?
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) { for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
NamedOutputPin *output = &enginePins.injectors[i]; NamedOutputPin *output = &enginePins.injectors[i];
if (engineConfiguration->bc.injectionPins[i] != activeConfiguration->bc.injectionPins[i]) { if (engineConfiguration->bc.injectionPins[i] != activeConfiguration.bc.injectionPins[i]) {
outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i], outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i],
&boardConfiguration->injectionPinMode); &boardConfiguration->injectionPinMode);

View File

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