mirror of https://github.com/FOME-Tech/fome-fw.git
31 lines
628 B
C++
31 lines
628 B
C++
/**
|
|
* @file dfco.h
|
|
*/
|
|
|
|
#pragma once
|
|
#include "engine_module.h"
|
|
#include "timer.h"
|
|
#include "limp_manager.h"
|
|
|
|
// DFCO = deceleration fuel cut off, ie, save gas when your foot is off the pedal
|
|
class DfcoController : public EngineModule {
|
|
public:
|
|
void update();
|
|
|
|
// true if fuel should be cut, false during normal running
|
|
bool cutFuel() const;
|
|
// Degrees of timing to retard due to DFCO, positive removes timing
|
|
float getTimingRetard() const;
|
|
|
|
float getTimeSinceCut() const;
|
|
|
|
private:
|
|
bool getState() const;
|
|
bool m_isDfco = false;
|
|
|
|
mutable Hysteresis m_mapHysteresis;
|
|
|
|
Timer m_timeSinceCut;
|
|
Timer m_timeSinceNoCut;
|
|
};
|