2022-09-01 16:00:16 -07:00
|
|
|
/**
|
|
|
|
* @file dfco.h
|
|
|
|
*/
|
|
|
|
|
2022-01-23 16:44:41 -08:00
|
|
|
#pragma once
|
2022-09-01 17:40:38 -07:00
|
|
|
#include "engine_module.h"
|
2023-08-30 20:11:24 -07:00
|
|
|
#include <rusefi/timer.h>
|
2024-09-12 22:55:49 -07:00
|
|
|
#include "hysteresis.h"
|
2022-01-23 16:44:41 -08:00
|
|
|
|
|
|
|
// DFCO = deceleration fuel cut off, ie, save gas when your foot is off the pedal
|
|
|
|
class DfcoController : public EngineModule {
|
|
|
|
public:
|
|
|
|
void update();
|
|
|
|
|
|
|
|
bool cutFuel() const;
|
|
|
|
|
2022-01-28 18:35:23 -08:00
|
|
|
float getTimeSinceCut() const;
|
|
|
|
|
2022-01-23 16:44:41 -08:00
|
|
|
private:
|
|
|
|
bool getState() const;
|
|
|
|
bool m_isDfco = false;
|
2022-01-28 18:35:23 -08:00
|
|
|
|
2024-09-12 22:55:49 -07:00
|
|
|
mutable Hysteresis m_mapHysteresis;
|
|
|
|
|
2022-01-28 18:35:23 -08:00
|
|
|
Timer m_timeSinceCut;
|
2022-08-25 18:26:17 -07:00
|
|
|
Timer m_timeSinceNoCut;
|
2022-01-23 16:44:41 -08:00
|
|
|
};
|