83 return (left + right) / (16 * 2);
105 uint16_t tmp = (frame.
data8[2] << 8);
106 tmp |= frame.
data8[3];
110#define SLIP_RATIO(frontAxle, rearAxle) (((frontAxle) == 0 || (rearAxle) == 0) ? 1 : 1.0 * (frontAxle) / (rearAxle))
118 int frontAxle = (frontL + frontR);
119 int rearAxle = (rearL + rearR);
122 efiPrintf(
"processHyundai: frontL %d rearL %d", frontL, rearL);
127 return frontAxle / 2 / 8;
158 int rearAxle = left + right;
161 efiPrintf(
"processNissan: front %d rear %d",
nissanFrontAxle, rearAxle);
uint16_t getTwoBytesLsb(const CANRxFrame &frame, int offset)
uint16_t getTwoBytesMsb(const CANRxFrame &frame, int offset)
static void processNissanSecondVss(const CANRxFrame &frame, efitick_t nowNt)
float processW202(const CANRxFrame &frame)
static uint16_t filterRpmCanID
static uint16_t look_up_second_vss_can_id(can_vss_nbc_e type)
void processCanRxVss(const CANRxFrame &frame, efitick_t nowNt)
expected< float > processCanRxVssImpl(const CANRxFrame &frame, efitick_t nowNt)
static expected< uint16_t > look_up_rpm_can_id(can_vss_nbc_e type)
float processBMW_e90(const CANRxFrame &frame)
static StoredValueSensor canSpeed(SensorType::VehicleSpeed, MS2NT(500))
static StoredValueSensor wheelSlipRatio(SensorType::WheelSlipRatio, MS2NT(1000))
static uint16_t filterVssCanID
float processNissan(const CANRxFrame &frame)
float processHyundai(const CANRxFrame &frame, efitick_t nowNt)
float processBMW_e46(const CANRxFrame &frame)
static int nissanFrontAxle
void processCanRxSecondVss(const CANRxFrame &frame, efitick_t nowNt)
static uint16_t filterSecondVssCanID
static expected< uint16_t > look_up_vss_can_id(can_vss_nbc_e type)
Base class for sensors that compute a value on one thread, and want to make it available to consumers...
void setValidValue(float value, efitick_t timestamp)
int getBitRangeLsb(const uint8_t data[], int bitIndex, int bitWidth)
static constexpr engine_configuration_s * engineConfiguration
void firmwareError(ObdCode code, const char *fmt,...)
@ OBD_Vehicle_Speed_SensorB
Base class for a sensor that has its value asynchronously set, then later retrieved by a consumer.
uint8_t data8[8]
Frame data.
scaled_channel< uint16_t, 10000, 1 > canVssScaling
can_vss_nbc_e canVssNbcType