refactoring: reducing code duplication
This commit is contained in:
parent
9b98f40203
commit
ae61b62e51
|
@ -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_ */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_ */
|
||||
|
||||
|
|
|
@ -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_ */
|
||||
|
|
Loading…
Reference in New Issue