The Big Refactoring of 2019: configuration version should not be a global variable fix #656
This commit is contained in:
parent
858ca777a2
commit
98a75d19e7
|
@ -422,6 +422,12 @@ public:
|
|||
*/
|
||||
efitick_t stopEngineRequestTimeNt = 0;
|
||||
|
||||
/**
|
||||
* This counter is incremented every time user adjusts ECU parameters online (either via dev console or other
|
||||
* tuning software)
|
||||
*/
|
||||
volatile int globalConfigurationVersion = 0;
|
||||
|
||||
/**
|
||||
* always 360 or 720, never zero
|
||||
*/
|
||||
|
|
|
@ -138,12 +138,6 @@ static fuel_table_t alphaNfuel = {
|
|||
{/*15 engineLoad=100.00*/ /*0 800.0*/xxxxx, /*1 1213.0*/xxxxx, /*2 1626.0*/xxxxx, /*3 2040.0*/xxxxx, /*4 2453.0*/xxxxx, /*5 2866.0*/xxxxx, /*6 3280.0*/xxxxx, /*7 3693.0*/xxxxx, /*8 4106.0*/xxxxx, /*9 4520.0*/xxxxx, /*10 4933.0*/xxxxx, /*11 5346.0*/xxxxx, /*12 5760.0*/xxxxx, /*13 6173.0*/xxxxx, /*14 6586.0*/xxxxx, /*15 7000.0*/xxxxx}
|
||||
};
|
||||
|
||||
/**
|
||||
* This counter is incremented every time user adjusts ECU parameters online (either via dev console or other
|
||||
* tuning software)
|
||||
*/
|
||||
volatile int globalConfigurationVersion = 0;
|
||||
|
||||
/**
|
||||
* Current engine configuration. On firmware start we assign empty configuration, then
|
||||
* we copy actual configuration after reading settings.
|
||||
|
@ -165,7 +159,6 @@ void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
||||
}
|
||||
|
||||
|
||||
extern LoggingWithStorage sharedLogger;
|
||||
|
||||
/**
|
||||
|
@ -173,7 +166,7 @@ extern LoggingWithStorage sharedLogger;
|
|||
* online tuning of most values in the maps does not count as configuration change, but 'Burn' command does
|
||||
*/
|
||||
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
globalConfigurationVersion++;
|
||||
ENGINE(globalConfigurationVersion++);
|
||||
#if EFI_DEFAILED_LOGGING
|
||||
scheduleMsg(&sharedLogger, "set globalConfigurationVersion=%d", globalConfigurationVersion);
|
||||
#endif /* EFI_DEFAILED_LOGGING */
|
||||
|
|
|
@ -73,7 +73,6 @@ void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
|
||||
void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
int getGlobalConfigurationVersion(void);
|
||||
|
||||
void commonFrankensoAnalogInputs(engine_configuration_s *engineConfiguration);
|
||||
void setFrankenso0_1_joystick(engine_configuration_s *engineConfiguration);
|
||||
|
|
Loading…
Reference in New Issue