tear down Engine god object #4511

This commit is contained in:
rusefillc 2022-09-15 21:27:20 -04:00
parent bdc4ad5245
commit 9e7f36a5ca
3 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@ void setFlatInjectorLag(float value);
* TODO: replace all usages of fixAngle with wrapAngle?
* Should we make this a nice method instead of that off macro which changes parameter value?
*/
#define fixAngle(angle, msg, code) wrapAngle2(angle, msg, code, engine->engineState.engineCycle)
#define fixAngle(angle, msg, code) wrapAngle2(angle, msg, code, getEngineState()->engineCycle)
#define wrapAngle(angle, msg, code) fixAngle(angle, msg, code)
// proper method avoids un-wrapped state of variables

View File

@ -12,6 +12,7 @@
#include "state_sequence.h"
#include "engine_configuration_generated_structures.h"
#include <rusefi/isnan.h>
#define FOUR_STROKE_ENGINE_CYCLE 720
@ -308,6 +309,6 @@ void findTriggerPosition(
void setToothedWheelConfiguration(TriggerWaveform *s, int total, int skipped, operation_mode_e operationMode);
#define TRIGGER_WAVEFORM(x) engine->triggerCentral.triggerShape.x
#define TRIGGER_WAVEFORM(x) getTriggerCentral()->triggerShape.x
#define getTriggerSize() TRIGGER_WAVEFORM(wave.phaseCount)

View File

@ -8,6 +8,7 @@
#pragma once
#include <stdint.h>
#include <rusefi/arrays.h>
#define _MAX_FILLER 11