refactoring: reducing code duplication

This commit is contained in:
rusefi 2018-10-28 15:07:42 -04:00
parent 9b98f40203
commit ae61b62e51
4 changed files with 2 additions and 3 deletions

View File

@ -233,4 +233,6 @@ private:
void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped, operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_SUFFIX);
#define TRIGGER_SHAPE(x) ENGINE(triggerCentral.triggerShape.x)
#endif /* TRIGGER_STRUCTURE_H_ */

View File

@ -122,7 +122,6 @@ typedef unsigned int time_t;
*/
#define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x
#define ENGINE(x) _engine.x
#define TRIGGER_SHAPE(x) _engine.triggerCentral.triggerShape.x
#else
#define EXTERN_ENGINE

View File

@ -109,7 +109,6 @@ void applyNewConfiguration(void);
#define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x
#define ENGINE(x) engine->x
#define TRIGGER_SHAPE(x) engine->triggerCentral.triggerShape.x
#endif /* GLOBAL_H_ */

View File

@ -98,6 +98,5 @@ class Engine;
#define CONFIG(x) engineConfiguration->x
#define ENGINE(x) engine->x
#define TRIGGER_SHAPE(x) engine->triggerCentral.triggerShape.x
#endif /* GLOBAL_H_ */