GCC Code Coverage Report


Directory: ./
File: firmware/controllers/core/engine_module.h
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 90.0% 9 0 10
Functions: 88.9% 8 0 9
Branches: -% 0 0 0
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 /**
2 * @file engine_module.h
3 */
4
5 #pragma once
6
7 #include "engine_configuration.h"
8
9 class EngineModule {
10 public:
11 // Called exactly once during boot, before configuration is loaded
12 virtual void initNoConfiguration() { }
13
14 16408 virtual void setDefaultConfiguration() { }
15
16 // Called when 'Burn' is invoked
17 5475 virtual void onConfigurationChange(engine_configuration_s const * /*previousConfig*/) { }
18
19 // Called approx 20Hz
20 16275 virtual void onSlowCallback() { }
21
22 // Called approx 200Hz
23 24640 virtual void onFastCallback() { }
24
25 // Called when the engine stops. Reset your state, etc to prepare for the next start.
26 3900 virtual void onEngineStop() { }
27
28 // Called whenever the ignition switch state changes
29 26 virtual void onIgnitionStateChanged(bool /*ignitionOn*/) { }
30
31 // Queried to determine whether this module needs a delayed shutoff, defaults to false
32 28028 virtual bool needsDelayedShutoff() { return false; }
33
34 // Called on every successfully decoded tooth of the primary trigger
35 935520 virtual void onEnginePhase(float /*rpm*/,
36 efitick_t /*edgeTimestamp*/,
37 angle_t /*currentPhase*/,
38 angle_t /*nextPhase*/)
39 935520 { }
40 };
41