2024-04-13 09:09:48 -07:00
|
|
|
// file ignition_controller.h
|
|
|
|
|
2021-12-07 18:28:04 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "engine_module.h"
|
|
|
|
|
2023-08-30 20:11:24 -07:00
|
|
|
#include <rusefi/timer.h>
|
2021-12-07 18:28:04 -08:00
|
|
|
|
|
|
|
class IgnitionController : public EngineModule {
|
|
|
|
public:
|
|
|
|
void onSlowCallback() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Timer m_timeSinceIgnVoltage;
|
|
|
|
bool m_lastState = false;
|
|
|
|
};
|
2024-04-13 09:09:48 -07:00
|
|
|
|
|
|
|
// USB power or vehicle power?
|
|
|
|
bool isIgnVoltage();
|