rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
engine_module.h
Go to the documentation of this file.
1/**
2 * @file engine_module.h
3 */
4
5#pragma once
6
8
10public:
11 // Called exactly once during boot, before configuration is loaded
12 virtual void initNoConfiguration() { }
13
14 virtual void setDefaultConfiguration() { }
15
16 // Called when 'Burn' is invoked
17 virtual void onConfigurationChange(engine_configuration_s const * /*previousConfig*/) { }
18
19 // Called approx 20Hz
20 virtual void onSlowCallback() { }
21
22 // Called approx 200Hz
23 virtual void onFastCallback() { }
24
25 // Called when the engine stops. Reset your state, etc to prepare for the next start.
26 virtual void onEngineStop() { }
27
28 // Called whenever the ignition switch state changes
29 virtual void onIgnitionStateChanged(bool /*ignitionOn*/) { }
30
31 // Queried to determine whether this module needs a delayed shutoff, defaults to false
32 virtual bool needsDelayedShutoff() { return false; }
33
34 // Called on every successfully decoded tooth of the primary trigger
35 virtual void onEnginePhase(float /*rpm*/,
36 efitick_t /*edgeTimestamp*/,
37 angle_t /*currentPhase*/,
38 angle_t /*nextPhase*/)
39 { }
40};
virtual void initNoConfiguration()
virtual bool needsDelayedShutoff()
virtual void onConfigurationChange(engine_configuration_s const *)
virtual void setDefaultConfiguration()
virtual void onEnginePhase(float, efitick_t, angle_t, angle_t)
virtual void onSlowCallback()
virtual void onFastCallback()
virtual void onEngineStop()
virtual void onIgnitionStateChanged(bool)
Main engine configuration data structure.