18#include "can_common.h"
36 efiPrintf(
"CAN%d RX: ID %07x DLC %d: %02x %02x %02x %02x %02x %02x %02x %02x",
44 efiPrintf(
"CAN%d RX: ID %03x(%d) DLC %d: %02x %02x %02x %02x %02x %02x %02x %02x",
53struct CanListenerTailSentinel :
public CanListener {
54 CanListenerTailSentinel()
73 size_t iterationValidationCounter = 0;
77 if (iterationValidationCounter++ > 239) {
78 criticalError(
"forever loop canListeners_head");
127#define VAG_YAW_RATE_G_LAT 0x130
128#define VAG_YAW_ACCEL_G_LONG 0x131
131#define MM5_10_RATE_QUANT 0.005
132#define MM5_10_ACC_QUANT 0.0001274
135#define MM5_10_YAW_Y 0x174
136#define MM5_10_ROLL_X 0x178
137#define MM5_10_Z 0x17C
140#define MM5_10_MB_YAW_Y_CANID 0x150
141#define MM5_10_MB_ROLL_X_CANID 0x151
166 efiPrintf(
"CAN_rx MM5_10_YAW_Y %f %f", yaw, accY);
173 efiPrintf(
"CAN_rx MM5_10_ROLL_X %f", accX);
180 efiPrintf(
"CAN_rx MM5_10_Z %f", accZ);
202 if (CAN_SID(frame) == MM5_10_YAW_Y) {
204 }
else if (CAN_SID(frame) == MM5_10_ROLL_X) {
206 }
else if (CAN_SID(frame) == MM5_10_Z) {
210 if (CAN_SID(frame) == MM5_10_MB_YAW_Y_CANID) {
212 }
else if (CAN_SID(frame) == MM5_10_MB_ROLL_X_CANID) {
231#if (EFI_CAN_BUS_COUNT >= 3)
273#if EFI_ENGINE_CONTROL
274 if (CAN_EID(frame) == GDI4_BASE_ADDRESS && frame.
data8[7] == GDI4_MAGIC) {
283 if ((CAN_SID(frame) == BOOT_COM_CAN_RX_MSG_ID) && (frame.
DLC == 2)) {
void processCanEcuControl(const CANRxFrame &frame)
Utility methods related to bench testing.
void processCanQcBenchTest(const CANRxFrame &frame)
std::optional< board_can_rx_type > custom_board_can_rx
uint16_t getTwoBytesLsb(const CANRxFrame &frame, int offset)
void registerCanListener(CanListener &listener)
uint32_t getFourBytesLsb(const CANRxFrame &frame, int offset)
static void processCanRxImu(const CANRxFrame &frame)
static CanListenerTailSentinel tailSentinel
static void processCanRxImu_BoschM5_10_RollX(const CANRxFrame &frame)
static void processCanRxImu_BoschM5_10_YawY(const CANRxFrame &frame)
static int16_t getShiftedLSB_intel(const CANRxFrame &frame, int offset)
void processCanRxMessage(const size_t busIndex, const CANRxFrame &frame, efitick_t nowNt)
void printCANRxFrame(const size_t busIndex, const CANRxFrame &rx)
uint16_t getTwoBytesMsb(const CANRxFrame &frame, int offset)
void registerCanSensor(CanSensorBase &sensor)
void unregisterCanListener(CanListener &listener)
static void processCanRxImu_BoschM5_10_Z(const CANRxFrame &frame)
void boardProcessCanRxMessage(const size_t, const CANRxFrame &, efitick_t)
CanListener * canListeners_head
void serviceCanSubscribers(const size_t busIndex, const CANRxFrame &frame, efitick_t nowNt)
void processCanRxVss(const CANRxFrame &frame, efitick_t nowNt)
CanListener * processFrame(const size_t busIndex, const CANRxFrame &frame, efitick_t nowNt)
virtual void decodeFrame(const CANRxFrame &frame, efitick_t nowNt)=0
CanListener * getNext() const
virtual bool acceptFrame(const size_t busIndex, const CANRxFrame &frame) const
void setNext(CanListener *next)
Timer externalGdiCanBusComms
LimpManager * getLimpManager()
static EngineAccessor engine
static constexpr engine_configuration_s * engineConfiguration
static Lps25Sensor sensor(device)
void processLuaCan(const size_t busIndex, const CANRxFrame &frame)
void obdOnCanPacketRx(const CANRxFrame &rx, size_t busIndex)
void handleWidebandCan(const size_t busIndex, const CANRxFrame &frame)
uint8_t data8[8]
Frame data.
Accelerometer accelerometer