Code Formatting (Prettier)
This commit is contained in:
@@ -19,7 +19,7 @@ void Init_CAN()
|
||||
|
||||
uint32_t Process_CAN_WheelSpeed()
|
||||
{
|
||||
#define FACTOR_RWP_KMH_890ADV 18 // Divider to convert Raw Data to km/h
|
||||
#define FACTOR_RWP_KMH_890ADV 18 // Divider to convert Raw Data to km/h
|
||||
|
||||
can_frame canMsg;
|
||||
static uint32_t lastRecTimestamp;
|
||||
@@ -30,7 +30,7 @@ uint32_t Process_CAN_WheelSpeed()
|
||||
RearWheelSpeed_raw = (uint16_t)canMsg.data[5] << 8 | canMsg.data[6];
|
||||
// raw / FACTOR_RWP_KMH_890ADV -> km/h * 100000 -> cm/h / 3600 -> cm/s
|
||||
// raw * 500 -> cm/s
|
||||
uint32_t RWP_millimeter_per_second = (((uint32_t)RearWheelSpeed_raw * 1000000) / FACTOR_RWP_KMH_890ADV ) / 3600;
|
||||
uint32_t RWP_millimeter_per_second = (((uint32_t)RearWheelSpeed_raw * 1000000) / FACTOR_RWP_KMH_890ADV) / 3600;
|
||||
|
||||
uint32_t timesincelast = millis() - lastRecTimestamp;
|
||||
lastRecTimestamp = millis();
|
||||
|
Reference in New Issue
Block a user