Code Formatting (Prettier)
This commit is contained in:
		| @@ -19,7 +19,7 @@ void Init_CAN() | |||||||
|  |  | ||||||
| uint32_t Process_CAN_WheelSpeed() | 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; |     can_frame canMsg; | ||||||
|     static uint32_t lastRecTimestamp; |     static uint32_t lastRecTimestamp; | ||||||
| @@ -30,7 +30,7 @@ uint32_t Process_CAN_WheelSpeed() | |||||||
|         RearWheelSpeed_raw = (uint16_t)canMsg.data[5] << 8 | canMsg.data[6]; |         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 / FACTOR_RWP_KMH_890ADV -> km/h * 100000 -> cm/h / 3600 -> cm/s | ||||||
|         // raw * 500 -> 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; |         uint32_t timesincelast = millis() - lastRecTimestamp; | ||||||
|         lastRecTimestamp = millis(); |         lastRecTimestamp = millis(); | ||||||
|   | |||||||
| @@ -6,7 +6,8 @@ | |||||||
| #include <SPI.h> | #include <SPI.h> | ||||||
| #include "common.h" | #include "common.h" | ||||||
|  |  | ||||||
| struct can_frame { | struct can_frame | ||||||
|  | { | ||||||
|     uint32_t can_id; |     uint32_t can_id; | ||||||
|     uint8_t can_dlc; |     uint8_t can_dlc; | ||||||
|     uint8_t data[8] __attribute__((aligned(8))); |     uint8_t data[8] __attribute__((aligned(8))); | ||||||
|   | |||||||
| @@ -9,5 +9,4 @@ | |||||||
| void initWebUI(); | void initWebUI(); | ||||||
| void UpdateWebUI(); | void UpdateWebUI(); | ||||||
|  |  | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
		Reference in New Issue
	
	Block a user