auto-sync

This commit is contained in:
rusEfi 2015-04-08 09:04:22 -05:00
parent c84fa2ec2e
commit 8f62f16a76
3 changed files with 16 additions and 1 deletions

View File

@ -143,6 +143,18 @@ static void initTemperatureCurve(int size, float *bins, float *values) {
}
}
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration) {
memset(activeConfiguration, 0xFF, sizeof(engine_configuration_s));
board_configuration_s *boardConfiguration = &activeConfiguration->bc;
/**
* -1 everywhere is probably good, but explicit values are probably better. Too bad GPIO_UNASSIGNED is not zero :(
*/
boardConfiguration->triggerInputPins[0] = GPIO_UNASSIGNED;
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
boardConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED;
}
/**
* @brief Global default engine configuration
* This method sets the default global engine configuration. These values are later overridden by engine-specific defaults

View File

@ -45,6 +45,7 @@ typedef struct {
crc_t value;
} persistent_config_container_s;
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F);
void setMap(fuel_table_t table, float value);
void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_S);

View File

@ -189,6 +189,8 @@ void runRusEfi(void) {
swo_init();
prepareVoidConfiguration(&activeConfiguration);
/**
* First data structure keeps track of which hardware I/O pins are used by whom
*/
@ -288,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 20150407;
return 20150408;
}