27#define CAN_FIAT_MOTOR_INFO 0x561
28#define CAN_MAZDA_RX_RPM_SPEED 0x201
29#define CAN_MAZDA_RX_STEERING_WARNING 0x300
30#define CAN_MAZDA_RX_STATUS_1 0x212
31#define CAN_MAZDA_RX_STATUS_2 0x420
34#define W202_STAT_1 0x308
35#define W202_STAT_2 0x608
36#define W202_ALIVE 0x210
37#define W202_STAT_3 0x310
40#define E90_ABS_COUNTER 0x0C0
41#define E90_SEATBELT_COUNTER 0x0D7
44#define E90_BRAKE_COUNTER 0x19E
45#define E90_SPEED 0x1A6
49#define E90_EBRAKE 0x34F
58#define GENESIS_COUPLE_RPM_316 0x316
59#define GENESIS_COUPLE_COOLANT_329 0x329
60#define GENESIS_COUPLE_SENSORS_382 0x382
62#define GENESIS_COUPLE_AC_ENABLE_18F 0x18F
149 msg[0] = (uint8_t)(
clt.value_or(0) + 69);
160 if (!
clt.Valid ||
clt.Value > 105) {
406 float mph = vehicleSpeed * 0.6213712;
414 mph_timer = TIME_I2MS(chVTGetSystemTime());
431 .
year = 0, .month = 0, .day = 0,
432 .hour = 0, .minute = 0, .second = 0,
436 msg[0] = dateTime.
hour;
439 msg[3] = dateTime.
day;
440 msg[4] = (dateTime.
month << 4) | 0x0F;
441 msg[5] = dateTime.
year & 0xFF;
442 msg[6] = (dateTime.
year >> 8) | 0xF0;
453 scaled_channel<uint16_t, 1>
Rpm;
454 scaled_channel<uint16_t, 650> Tps;
455 scaled_channel<uint16_t, 650> Pps;
456 scaled_channel<uint16_t, 100> Vss;
467 scaled_channel<uint16_t, 10> WheelSpeedFR;
468 scaled_channel<uint16_t, 10> WheelSpeedFL;
469 scaled_channel<uint16_t, 10> WheelSpeedRR;
470 scaled_channel<uint16_t, 10> WheelSpeedRL;
475 msg.WheelSpeedFR = 0;
476 msg.WheelSpeedFL = 0;
477 msg.WheelSpeedRR = 0;
478 msg.WheelSpeedRL = 0;
482 scaled_channel<uint16_t, 190>
Iat;
483 scaled_channel<uint16_t, 190> Ect;
484 scaled_channel<uint16_t, 190> FuelT;
485 scaled_channel<uint16_t, 190> OilT;
496 scaled_channel<uint16_t, 10>
Map;
497 scaled_channel<uint16_t, 10> Baro;
498 scaled_channel<uint16_t, 1000> OilP;
499 scaled_channel<uint16_t, 20> FuelP;
513 scaled_channel<uint16_t, 10000> Boost;
514 scaled_channel<uint16_t, 3200> Vbat;
515 scaled_channel<uint16_t, 10> FuelConsumptionLH;
516 scaled_channel<int16_t, 1> Gear;
522 float boostBar = deltaKpa / 100;
524#ifdef MODULE_ODOMETER
527 float gPerSecond = 0;
530 float gPerHour = gPerSecond * 3600.0f;
531 float literPerHour = gPerHour * 0.00139f;
533 msg.Boost = boostBar;
535 msg.FuelConsumptionLH = 10 * literPerHour;
540 scaled_channel<uint16_t, 1> ShiftFlag;
541 scaled_channel<uint16_t, 1> GearTime;
542 scaled_channel<uint16_t, 1> TpsV;
556 scaled_channel<uint16_t, 2000>
Lambda1;
557 scaled_channel<uint16_t, 2000>
Lambda2;
558 scaled_channel<uint16_t, 10> LambdaTemp1;
559 scaled_channel<uint16_t, 10> LambdaTemp2;
570 scaled_channel<uint16_t, 10> LambdaErr1;
571 scaled_channel<uint16_t, 10> LambdaErr2;
572 scaled_channel<uint16_t, 2000> LambdaTarget1;
573 scaled_channel<uint16_t, 2000> LambdaTarget2;
577#if EFI_ENGINE_CONTROL
625 case CAN_BUS_NBC_NONE:
627 case CAN_BUS_BMW_E46:
630 case CAN_BUS_Haltech:
633 case CAN_BUS_NBC_FIAT:
636 case CAN_BUS_NBC_VAG:
639 case CAN_BUS_MAZDA_RX8:
642 case CAN_BUS_W202_C180:
645 case CAN_BUS_BMW_E90:
651 case CAN_BUS_NISSAN_VQ:
654 case CAN_BUS_GENESIS_COUPE:
657 case CAN_BUS_HONDA_K:
663 case CAN_BUS_MS_SIMPLE_BROADCAST:
const char * getCan_nbc_e(can_nbc_e value)
static uint8_t brakecnt_2
static void canDashboardBmwE46(CanCycle cycle)
std::optional< board_can_update_dash_type > custom_board_update_dash
void canMazdaRX8(CanCycle cycle)
static void canDashboardBmwE90(CanCycle cycle)
constexpr uint8_t e90_temp_offset
PUBLIC_API_WEAK void boardUpdateDash(CanCycle cycle)
void canDashboardW202(CanCycle cycle)
static time_msecs_t mph_ctr
static uint8_t rpmcounter
static uint16_t mph_counter
void canDashboardAim(CanCycle cycle)
void canDashboardVAG(CanCycle cycle)
static uint8_t abscounter
void canDashboardGenesisCoupe(CanCycle cycle)
void canDashboardFiat(CanCycle cycle)
static uint8_t brakecnt_1
static uint8_t seatbeltcnt
static void populateFrame(Aim5f0 &msg)
static bool cluster_time_set
void canDashboardVagMqb(CanCycle cycle)
void updateDash(CanCycle cycle)
static time_msecs_t mph_timer
void canDashboardHaltech(CanCycle cycle)
void canDashboardHondaK(CanCycle cycle)
void canDashboardTS(CanCycle cycle)
void canDashboardNissanVQ(CanCycle cycle)
bool isInterval(CanInterval interval)
void setBit(size_t byteIdx, size_t bitIdx)
Set a single bit in the transmit buffer. Useful for single-bit flags.
void setShortValueMsb(uint16_t value, size_t offset)
void setShortValue(uint16_t value, size_t offset)
Write a 16-bit short value to the buffer. Note: this writes in Intel little endian byte order.
FuelComputer fuelComputer
constexpr auto & module()
virtual SensorResult get() const =0
static float getOrZero(SensorType type)
uint16_t SWAP_UINT16(uint16_t x)
static EngineAccessor engine
static constexpr engine_configuration_s * engineConfiguration
static CCM_OPTIONAL FunctionalSensor clt(SensorType::Clt, MS2NT(10))
UNUSED(samplingTimeSeconds)
efidatetime_t getRtcDateTime()
bool canBroadcastUseChannelTwo
scaled_channel< uint16_t, 10000, 1 > targetLambda
static CanTsChannel canChannel