rusefi/firmware/controllers/engine_cycle/prime_injection.h

39 lines
639 B
C
Raw Normal View History

2022-09-07 13:25:50 -07:00
/*
* @file prime_injection.h
*/
#pragma once
#include "engine_module.h"
#include "rusefi_types.h"
#include "scheduler.h"
class PrimeController : public EngineModule {
public:
void onIgnitionStateChanged(bool ignitionOn) override;
floatms_t getPrimeDuration() const;
void onPrimeStart();
void onPrimeEnd();
bool isPriming() const {
return m_isPriming;
}
private:
scheduling_s m_start;
scheduling_s m_end;
bool m_isPriming = false;
static void onPrimeStartAdapter(PrimeController* instance) {
instance->onPrimeStart();
}
static void onPrimeEndAdapter(PrimeController* instance) {
instance->onPrimeEnd();
}
};