This commit is contained in:
parent
0d572f1e0e
commit
bdf977a511
|
@ -139,6 +139,12 @@ void Engine::reset() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FuelConsumptionState::FuelConsumptionState() {
|
||||||
|
perSecondConsumption = perSecondAccumulator = 0;
|
||||||
|
perMinuteConsumption = perMinuteAccumulator = 0;
|
||||||
|
accumulatedSecond = accumulatedMinute = -1;
|
||||||
|
}
|
||||||
|
|
||||||
EngineState::EngineState() {
|
EngineState::EngineState() {
|
||||||
dwellAngle = 0;
|
dwellAngle = 0;
|
||||||
engineNoiseHipLevel = 0;
|
engineNoiseHipLevel = 0;
|
||||||
|
|
|
@ -91,12 +91,26 @@ public:
|
||||||
void reset();
|
void reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FuelConsumptionState {
|
||||||
|
public:
|
||||||
|
FuelConsumptionState();
|
||||||
|
void addData(float durationMs);
|
||||||
|
float perSecondConsumption;
|
||||||
|
float perMinuteConsumption;
|
||||||
|
float perSecondAccumulator;
|
||||||
|
float perMinuteAccumulator;
|
||||||
|
int accumulatedSecond;
|
||||||
|
int accumulatedMinute;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class EngineState {
|
class EngineState {
|
||||||
public:
|
public:
|
||||||
EngineState();
|
EngineState();
|
||||||
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
|
FuelConsumptionState fuelConsumption;
|
||||||
|
|
||||||
efitick_t crankingTime;
|
efitick_t crankingTime;
|
||||||
efitick_t timeSinceCranking;
|
efitick_t timeSinceCranking;
|
||||||
|
|
Loading…
Reference in New Issue