rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
algo
engine_cylinder.hpp
Go to the documentation of this file.
1
/*
2
* @file engine_cylinder.hpp
3
*
4
* @date: may 25, 2025
5
* @author Matthew Kennedy, FDSoftware
6
*/
7
8
#ifndef ENGINE_CILINDER_HPP
9
#define ENGINE_CILINDER_HPP
10
#include "
rusefi_types.h
"
11
12
class
OneCylinder
final {
13
public
:
14
void
updateCylinderNumber
(uint8_t index, uint8_t cylinderNumber);
15
void
invalidCylinder
();
16
17
// Get this cylinder's offset, in positive degrees, from cylinder 1
18
angle_t
getAngleOffset
()
const
;
19
20
#if EFI_UNIT_TEST
21
bool
getIsValid
()
const
{
22
return
m_valid
;
23
}
24
#endif
25
26
private
:
27
int
m_index
= 0;
28
bool
m_valid
=
false
;
29
30
// This cylinder's position in the firing order (0-based)
31
uint8_t
m_cylinderIndex
= 0;
32
// This cylinder's physical cylinder number (0-based)
33
uint8_t
m_cylinderNumber
= 0;
34
35
// This cylinder's mechanical TDC offset in degrees after #1
36
angle_t
m_baseAngleOffset
;
37
};
38
39
namespace
EngineCylinders
{
40
void
updateCylinders
(
void
);
41
};
42
43
#endif
//ENGINE_CILINDER_HPP
OneCylinder
Definition
engine_cylinder.hpp:12
OneCylinder::getAngleOffset
angle_t getAngleOffset() const
Definition
engine_cylinder.cpp:25
OneCylinder::m_cylinderIndex
uint8_t m_cylinderIndex
Definition
engine_cylinder.hpp:31
OneCylinder::m_valid
bool m_valid
Definition
engine_cylinder.hpp:28
OneCylinder::invalidCylinder
void invalidCylinder()
Definition
engine_cylinder.cpp:21
OneCylinder::m_index
int m_index
Definition
engine_cylinder.hpp:27
OneCylinder::updateCylinderNumber
void updateCylinderNumber(uint8_t index, uint8_t cylinderNumber)
Definition
engine_cylinder.cpp:10
OneCylinder::m_cylinderNumber
uint8_t m_cylinderNumber
Definition
engine_cylinder.hpp:33
OneCylinder::getIsValid
bool getIsValid() const
Definition
engine_cylinder.hpp:21
OneCylinder::m_baseAngleOffset
angle_t m_baseAngleOffset
Definition
engine_cylinder.hpp:36
float
EngineCylinders
Definition
engine_cylinder.hpp:39
EngineCylinders::updateCylinders
void updateCylinders(void)
Definition
engine_cylinder.cpp:40
rusefi_types.h
Generated on Sat Sep 27 2025 00:10:04 for rusEFI by
1.9.8