2022-07-30 14:08:48 -07:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-01 12:41:47 -07:00
|
|
|
// TODO: this name is now probably wrong, since it checks injectors/ignition too
|
2022-07-30 14:08:48 -07:00
|
|
|
struct SensorChecker : public EngineModule {
|
|
|
|
public:
|
|
|
|
void onSlowCallback() override;
|
|
|
|
void onIgnitionStateChanged(bool ignitionOn) override;
|
|
|
|
|
2022-11-30 19:20:09 -08:00
|
|
|
bool analogSensorsShouldWork() const {
|
|
|
|
return m_analogSensorsShouldWork;
|
|
|
|
}
|
|
|
|
|
2022-07-30 14:08:48 -07:00
|
|
|
private:
|
|
|
|
bool m_ignitionIsOn = false;
|
|
|
|
Timer m_timeSinceIgnOff;
|
2022-11-30 19:20:09 -08:00
|
|
|
|
|
|
|
bool m_analogSensorsShouldWork = false;
|
2022-07-30 14:08:48 -07:00
|
|
|
};
|