#include <main_loop_controller.h>
|
virtual void | OnStarted () |
| Called before running the periodic task. Optionally override this method to set up.
|
|
void | main () override |
|
const char *const | m_name |
|
Definition at line 21 of file main_loop_controller.h.
◆ MainLoop()
Definition at line 10 of file main_loop.cpp.
12{
13}
Base class for a controller that needs to run periodically to perform work.
◆ makePeriodFlag()
Definition at line 16 of file main_loop.cpp.
16 {
18 return TFlag;
19 } else {
21 }
22}
◆ makePeriodFlags()
Definition at line 24 of file main_loop.cpp.
24 {
27 }
28
30 lp |= makePeriodFlag<LoopPeriod::Period1000hz>();
31 lp |= makePeriodFlag<LoopPeriod::Period500hz>();
32 lp |= makePeriodFlag<LoopPeriod::Period250hz>();
33 lp |= makePeriodFlag<LoopPeriod::Period200hz>();
34 lp |= makePeriodFlag<LoopPeriod::Period20hz>();
35
37
38 return lp;
39}
Referenced by PeriodicTask().
◆ PeriodicTask()
void MainLoop::PeriodicTask |
( |
efitick_t |
nowNt | ) |
|
|
overridevirtual |
Called periodically. Override this method to do work for your controller.
Implements PeriodicController< 1024 >.
Definition at line 41 of file main_loop.cpp.
41 {
43
45
46#if HAL_USE_ADC
47 if (currentLoopPeriod & ADC_UPDATE_RATE) {
49 }
50#endif
51
52#if EFI_ELECTRONIC_THROTTLE_BODY
53 if (currentLoopPeriod & ETB_UPDATE_RATE) {
54
55 }
56#endif
57
58 if (currentLoopPeriod & SLOW_CALLBACK_RATE) {
59
60 }
61
62 if (currentLoopPeriod & FAST_CALLBACK_RATE) {
63
64 }
65}
LoopPeriod makePeriodFlags()
◆ m_cycleCounter
int MainLoop::m_cycleCounter = 0 |
|
private |
The documentation for this class was generated from the following files: