Line |
Branch |
Decision |
Exec |
Source |
1 |
|
|
|
#include "pch.h" |
2 |
|
|
|
|
3 |
|
|
|
#if EFI_CAN_SUPPORT || EFI_UNIT_TEST |
4 |
|
|
|
#include "AemXSeriesEgt.h" |
5 |
|
|
|
|
6 |
|
|
|
static constexpr uint32_t aem_egt_base = 0x000A0305; |
7 |
|
|
|
#define AEM_EGT_DEFAULT_PERIOD_MS 100 /* 10 Hz */ |
8 |
|
|
|
|
9 |
|
|
✗ |
AemXSeriesEgt::AemXSeriesEgt(uint8_t sensorIndex, SensorType type) |
10 |
|
|
|
: CanSensorBase( |
11 |
|
|
✗ |
aem_egt_base + sensorIndex, |
12 |
|
|
|
type, |
13 |
|
|
|
MS2NT(3 * AEM_EGT_DEFAULT_PERIOD_MS) // sensor transmits at 10hz, allow a frame to be missed |
14 |
|
|
✗ |
) |
15 |
|
|
|
{ |
16 |
|
|
|
// nope |
17 |
|
|
✗ |
} |
18 |
|
|
|
|
19 |
|
|
✗ |
void AemXSeriesEgt::decodeFrame(const CANRxFrame& frame, efitick_t nowNt) { |
20 |
|
|
|
// No status flags, just a value |
21 |
|
|
✗ |
uint16_t egt = SWAP_UINT16(frame.data16[0]); |
22 |
|
|
|
|
23 |
|
|
✗ |
setValidValue((float)egt, nowNt); |
24 |
|
|
✗ |
} |
25 |
|
|
|
|
26 |
|
|
|
#endif |
27 |
|
|
|
|