From 5824a32ad24197628b2d27e7fbb8f28e1e15d0e9 Mon Sep 17 00:00:00 2001 From: Marcel Peterkau Date: Fri, 4 Feb 2022 23:34:51 +0100 Subject: [PATCH] Code Formatting (Prettier) --- Software/ChainLube/src/can.cpp | 4 ++-- Software/ChainLube/src/can.h | 7 ++++--- Software/ChainLube/src/rmtdbghelp.h | 2 +- Software/ChainLube/src/webui.h | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Software/ChainLube/src/can.cpp b/Software/ChainLube/src/can.cpp index ad2ef18..ba44fd1 100644 --- a/Software/ChainLube/src/can.cpp +++ b/Software/ChainLube/src/can.cpp @@ -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(); diff --git a/Software/ChainLube/src/can.h b/Software/ChainLube/src/can.h index 35f36c5..83bf498 100644 --- a/Software/ChainLube/src/can.h +++ b/Software/ChainLube/src/can.h @@ -6,10 +6,11 @@ #include #include "common.h" -struct can_frame { +struct can_frame +{ uint32_t can_id; - uint8_t can_dlc; - uint8_t data[8] __attribute__((aligned(8))); + uint8_t can_dlc; + uint8_t data[8] __attribute__((aligned(8))); }; void Init_CAN(); diff --git a/Software/ChainLube/src/rmtdbghelp.h b/Software/ChainLube/src/rmtdbghelp.h index 2ca38e1..2ae15d7 100644 --- a/Software/ChainLube/src/rmtdbghelp.h +++ b/Software/ChainLube/src/rmtdbghelp.h @@ -3,7 +3,7 @@ const char helpCmd[] = "sysinfo - System Info\r\n" "formatPDS - Format Persistence EEPROM Data\r\n" "formatCFG - Format Configuration EEPROM Data\r\n" "checkEE - Check EEPROM with checksum\r\n" - "dumpEE1k - dump the first 1kb of EEPROM to Serial\r\n" + "dumpEE1k - dump the first 1kb of EEPROM to Serial\r\n" "dumpEE - dump the whole EPPROM to Serial\r\n" "resetPageEE - Reset the PersistenceData Page\r\n" "dumpCFG - print Config struct\r\n" diff --git a/Software/ChainLube/src/webui.h b/Software/ChainLube/src/webui.h index 2894b20..d7a950f 100644 --- a/Software/ChainLube/src/webui.h +++ b/Software/ChainLube/src/webui.h @@ -9,5 +9,4 @@ void initWebUI(); void UpdateWebUI(); - #endif \ No newline at end of file