Code Formatting (Prettier)
This commit is contained in:
parent
055183ce90
commit
5824a32ad2
Software/ChainLube/src
@ -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,10 +6,11 @@
|
|||||||
#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)));
|
||||||
};
|
};
|
||||||
|
|
||||||
void Init_CAN();
|
void Init_CAN();
|
||||||
|
@ -3,7 +3,7 @@ const char helpCmd[] = "sysinfo - System Info\r\n"
|
|||||||
"formatPDS - Format Persistence EEPROM Data\r\n"
|
"formatPDS - Format Persistence EEPROM Data\r\n"
|
||||||
"formatCFG - Format Configuration EEPROM Data\r\n"
|
"formatCFG - Format Configuration EEPROM Data\r\n"
|
||||||
"checkEE - Check EEPROM with checksum\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"
|
"dumpEE - dump the whole EPPROM to Serial\r\n"
|
||||||
"resetPageEE - Reset the PersistenceData Page\r\n"
|
"resetPageEE - Reset the PersistenceData Page\r\n"
|
||||||
"dumpCFG - print Config struct\r\n"
|
"dumpCFG - print Config struct\r\n"
|
||||||
|
@ -9,5 +9,4 @@
|
|||||||
void initWebUI();
|
void initWebUI();
|
||||||
void UpdateWebUI();
|
void UpdateWebUI();
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user