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");
103#define VAG_YAW_RATE_G_LAT 0x130
104#define VAG_YAW_ACCEL_G_LONG 0x131
107#define MM5_10_RATE_QUANT 0.005
108#define MM5_10_ACC_QUANT 0.0001274
111#define MM5_10_YAW_Y 0x174
112#define MM5_10_ROLL_X 0x178
113#define MM5_10_Z 0x17C
116#define MM5_10_MB_YAW_Y_CANID 0x150
117#define MM5_10_MB_ROLL_X_CANID 0x151
142 efiPrintf(
"CAN_rx MM5_10_YAW_Y %f %f", yaw, accY);
149 efiPrintf(
"CAN_rx MM5_10_ROLL_X %f", accX);
156 efiPrintf(
"CAN_rx MM5_10_Z %f", accZ);
178 if (CAN_SID(frame) == MM5_10_YAW_Y) {
180 }
else if (CAN_SID(frame) == MM5_10_ROLL_X) {
182 }
else if (CAN_SID(frame) == MM5_10_Z) {
186 if (CAN_SID(frame) == MM5_10_MB_YAW_Y_CANID) {
188 }
else if (CAN_SID(frame) == MM5_10_MB_ROLL_X_CANID) {
244#if EFI_ENGINE_CONTROL
245 if (CAN_EID(frame) == GDI4_BASE_ADDRESS && frame.
data8[7] == GDI4_MAGIC) {
254 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)
static void printPacket(const size_t busIndex, const CANRxFrame &rx)
uint16_t getTwoBytesMsb(const CANRxFrame &frame, int offset)
void registerCanSensor(CanSensorBase &sensor)
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
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)
static CanTsListener listener
uint8_t data8[8]
Frame data.
Accelerometer accelerometer