From ced8dd0ab78020fc796bb82ce481afb3210a0058 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 12 May 2026 01:06:11 -0700 Subject: [PATCH 01/85] Initial changeover, totally untested Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateData.h | 2 +- ECU/Application/Inc/StateTicks.h | 2 +- ECU/Application/Inc/ecu_can.h | 140 --- ECU/Application/Inc/ecu_can_platform_deps.h | 18 - ECU/Application/Src/CANutils.c | 2 +- ECU/Application/Src/Lights.c | 2 +- ECU/Application/Src/StateTicks.c | 2 +- ECU/Application/Src/ecu_can.c | 1075 ------------------- ECU/CMakeLists.txt | 3 +- ECU/Core/Src/main.c | 3 +- ECU/Core/Src/stm32g4xx_it.c | 12 +- 11 files changed, 9 insertions(+), 1252 deletions(-) delete mode 100644 ECU/Application/Inc/ecu_can.h delete mode 100644 ECU/Application/Inc/ecu_can_platform_deps.h delete mode 100644 ECU/Application/Src/ecu_can.c diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index a0debf5cf..27fc53c48 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -3,7 +3,7 @@ #include "GRCAN_MSG_DATA.h" #include "StateMachine.h" -#include "ecu_can.h" +#include "can.h" #ifndef _STATEDATA_H_ #define _STATEDATA_H_ diff --git a/ECU/Application/Inc/StateTicks.h b/ECU/Application/Inc/StateTicks.h index 6f136f15c..636cd77a1 100644 --- a/ECU/Application/Inc/StateTicks.h +++ b/ECU/Application/Inc/StateTicks.h @@ -1,7 +1,7 @@ #include "StateData.h" #include "StateMachine.h" #include "adc.h" -#include "ecu_can.h" +#include "can.h" #ifndef _STATE_TICKS_H_ #define _STATE_TICKS_H_ diff --git a/ECU/Application/Inc/ecu_can.h b/ECU/Application/Inc/ecu_can.h deleted file mode 100644 index 6b398748e..000000000 --- a/ECU/Application/Inc/ecu_can.h +++ /dev/null @@ -1,140 +0,0 @@ -#ifndef CAN_H -#define CAN_H - -// Supported STM32 Families -#ifdef STM32G4 -#elif defined(STM32L4) -#elif defined(STM32U5) -#error "Unsupported STM32 Family" -#endif - -#include "can_cfg.h" -#include "ecu_can_platform_deps.h" -// #include "StateData.h" - -// #include "circularBuffer.h" -#include - -// RX Callback must perform a deep copy of the data -// -typedef void (*CAN_RXCallback)(uint32_t ID, void *data, uint32_t size); -typedef struct { - // can baud rate is set by fdcan prescaler and RCC clock configurations - FDCAN_GlobalTypeDef *fdcan_instance; // Base address of FDCAN peripheral in memory (FDCAN1, FDCAN2, FDCAN3 macros) - - FDCAN_InitTypeDef hal_fdcan_init; - CAN_RXCallback rx_callback; - uint32_t rx_interrupt_priority; - uint32_t tx_interrupt_priority; - - // Circular Buffer - // uint32_t tx_buffer_capacity; - - GPIO_TypeDef *rx_gpio; // Instance name, like GPIOA, GPIOB, etc. - GPIO_InitTypeDef init_rx_gpio; // GPIO Parameters - set correct Alternate Function, no pullup/pulldown, high/very_high frequency - GPIO_TypeDef *tx_gpio; - GPIO_InitTypeDef init_tx_gpio; - - // additional parameters -} CANConfig; - -#define FDCAN_MAX_DATA_BYTES 64 -// TODO - allow user to send data without needing to construct a header for the buffer -// TODO: G4 tests are dependent on the System clock configuration?? -typedef struct { - FDCAN_TxHeaderTypeDef tx_header; - uint8_t data[FDCAN_MAX_DATA_BYTES]; -} FDCANTxMessage; -typedef struct { - FDCAN_RxHeaderTypeDef rx_header; - uint8_t data[FDCAN_MAX_DATA_BYTES]; -} FDCANRxMessage; - -// FDCAN peripheral for STM32G4 -typedef struct { - FDCAN_HandleTypeDef *hal_fdcanP; - - // TX buffer - FDCANTxMessage *const tx_buffer; - volatile uint32_t tx_capacity; - volatile uint32_t tx_tail; - volatile uint32_t tx_elements; - - // RX Callback - CAN_RXCallback rx_callback; - - uint8_t rx_interrupt_priority; // only 4 bits - uint8_t tx_interrupt_priority; - - // for release - GPIO_TypeDef *rx_gpio; - uint32_t rx_pin; - GPIO_TypeDef *tx_gpio; - uint32_t tx_pin; - // uint32_t Clock_Source; - - // state - bool init; - bool started; - - // error states - uint32_t lost_rx; -} CANHandle; - -typedef enum { - CAN_SUCCESS = 0, - CAN_ERROR -} CAN_STATUS; - -CANHandle *can_init(const CANConfig *config); // user must supply an rx callback function -CAN_STATUS can_start(CANHandle *handle); -CAN_STATUS can_stop(CANHandle *handle); -CAN_STATUS can_send(CANHandle *handle, FDCANTxMessage *buffer); -CAN_STATUS can_release(CANHandle *handle); // deinit circular buffer and turn off can peripheral and gpios -CAN_STATUS can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter); -CAN_STATUS can_enqueue(CANHandle *handle, FDCANTxMessage *message); // adds to software buffer, returns error if full - -// pass in a buffer to store the status string -// int can_info(char* ); - -// alternatively use -// HAL_FDCAN_ConfigGlobalFilter() //important to accept nonmatching frames into -// HAL_FDCAN_ConfigFilter() - -#define GPIOx_CLK_ENABLE(GPIOX) \ - do { \ - if (GPIOX == GPIOA) \ - __HAL_RCC_GPIOA_CLK_ENABLE(); \ - else if (GPIOX == GPIOB) \ - __HAL_RCC_GPIOB_CLK_ENABLE(); \ - else if (GPIOX == GPIOD) \ - __HAL_RCC_GPIOD_CLK_ENABLE(); \ - else \ - LOGOMATIC("BAD FDCAN GPIO Port"); \ - } while (0) - -#define GPIOx_CLK_DISABLE(GPIOX) \ - do { \ - if (GPIOX == GPIOA) \ - __HAL_RCC_GPIOA_CLK_DISABLE(); \ - else if (GPIOX == GPIOB) \ - __HAL_RCC_GPIOB_CLK_DISABLE(); \ - else if (GPIOX == GPIOD) \ - __HAL_RCC_GPIOD_CLK_DISABLE(); \ - else \ - LOGOMATIC("BAD FDCAN GPIO Port"); \ - } while (0) - -// doesn't need a handle, CAN cores share peripheral clock -void can_set_clksource(uint32_t clksource); // ex. LL_RCC_FDCAN_CLKSOURCE_PCLK1 for STM32G474RE - -// default Configuration helpers -int get_cfg(FDCAN_GlobalTypeDef *instance, CAN_RXCallback callback, CANConfig *out_cfg, uint32_t FDCAN_Mode, uint32_t numStdFilters, uint32_t numExtFilters); - -// converts CAN FD TxHeader DataLength Field -static const uint8_t CANFD_DLCtoBytes[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 32, 48, 64}; - -void CAN_Timer_Start(void); -void can_tx_dequeue_helper(CANHandle *handle); - -#endif diff --git a/ECU/Application/Inc/ecu_can_platform_deps.h b/ECU/Application/Inc/ecu_can_platform_deps.h deleted file mode 100644 index 986329ac0..000000000 --- a/ECU/Application/Inc/ecu_can_platform_deps.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ECU_CAN_PLATFORM_DEPS_H -#define ECU_CAN_PLATFORM_DEPS_H - -#if defined(STM32G4) -#include "stm32g4xx_hal.h" -#include "stm32g4xx_hal_fdcan.h" -#include "stm32g4xx_hal_gpio.h" -#include "stm32g4xx_hal_gpio_ex.h" -#include "stm32g4xx_hal_rcc.h" -#include "stm32g4xx_ll_gpio.h" -#include "stm32g4xx_ll_rcc.h" -// #elif defined(STM32L4) -// #elif defined(STM32U5) -#else -#error "Unsupported STM32 family" -#endif - -#endif // end header guard diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 5f55662e7..473376efe 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -10,7 +10,7 @@ #include "StateData.h" #include "StateTicks.h" #include "StateUtils.h" -#include "ecu_can.h" +#include "can.h" #include "main.h" #include "stm32g4xx_hal_fdcan.h" #include "string.h" diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 9e2b04ff1..464186e51 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -5,7 +5,7 @@ #include "StateUtils.h" #include "adc.h" #include "bitManipulations.h" -#include "ecu_can.h" +#include "can.h" #include "main.h" #include "stm32g4xx_ll_gpio.h" diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 3c53bc9c2..34281c706 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -13,7 +13,7 @@ #include "StateMachine.h" #include "StateUtils.h" #include "Unused.h" -#include "ecu_can.h" +#include "can.h" #include "stm32g4xx_ll_gpio.h" /** diff --git a/ECU/Application/Src/ecu_can.c b/ECU/Application/Src/ecu_can.c deleted file mode 100644 index 7788bf745..000000000 --- a/ECU/Application/Src/ecu_can.c +++ /dev/null @@ -1,1075 +0,0 @@ -#include "ecu_can.h" - -#include -#include -#include -#include - -#include "stm32g4xx_ll_bus.h" -#include "stm32g4xx_ll_dma.h" -#include "stm32g4xx_ll_tim.h" - -// TODO: make the profiler cleaner -#include "Logomatic.h" -#include "main.h" - -// TODO: define DMA usage in a better way -// #define USEDMA -#ifdef USEDMA -#include "can_dma.h" - -#endif - -// CAN CONFIGURATION HEADER -#include "can_cfg.h" -#ifndef CAN_CFG_H -#error "can.c: Please define CAN_CFG_H and define at least one USECANx and TX_BUFFER_X_SIZE" -#endif -// =============================== - -// EXAMPLE Configuration in "can_cfg.h" -// #ifndef CAN_CFG_H -// #define CAN_CFG_H - -// #define USECAN1 -// #define TX_BUFFER_1_SIZE 10 - -// #endif - -// HAL handles -#ifdef USECAN1 -#ifndef TX_BUFFER_1_SIZE -#error "Please Define TX_BUFFER_1_SIZE" -#endif -static FDCAN_HandleTypeDef hal_fdcan1 = {.Instance = FDCAN1}; -FDCANTxMessage tx_buffer_1[TX_BUFFER_1_SIZE] = {0}; -static CANHandle CAN1 = {.hal_fdcanP = &hal_fdcan1, .tx_buffer = tx_buffer_1}; -#endif - -#ifdef USECAN2 -#ifndef TX_BUFFER_2_SIZE -#error "Please Define TX_BUFFER_2_SIZE" -#endif -static FDCAN_HandleTypeDef hal_fdcan2 = {.Instance = FDCAN2}; -FDCANTxMessage tx_buffer_2[TX_BUFFER_2_SIZE] = {0}; -static CANHandle CAN2 = {.hal_fdcanP = &hal_fdcan2, .tx_buffer = tx_buffer_2}; -#endif - -#ifdef USECAN3 -#ifndef TX_BUFFER_3_SIZE -#error "Please Define TX_BUFFER_3_SIZE" -#endif -static FDCAN_HandleTypeDef hal_fdcan3 = {.Instance = FDCAN3}; -FDCANTxMessage tx_buffer_3[TX_BUFFER_3_SIZE] = {0}; -static CANHandle CAN3 = {.hal_fdcanP = &hal_fdcan3, .tx_buffer = tx_buffer_3}; -#endif - -#define MIN(A, B) ((A < B) ? A : B) - -// bool hardwareEnabled = false; - -// macro lore -/* -#define CAT(a,b) a##b -#define CAT3(a, b, c) a##b##c -#define CAT4(a, b,c,d) a##b##c##d -#define CAT5(a, b,c,d,e) a##b##c##d##e - -#define ACTIVATE_FDCAN_HELPER(FDCANX, ITY, preirq, subirq) \ - do { \ - HAL_NVIC_SetPriority( CAT4(FDCANX##,_,ITY, _IRQn ) , preirq, subirq ); \ - HAL_NVIC_EnableIRQ( CAT4(FDCANX##,_,ITY, _IRQn ) ); \ - } while(0) - -#define HAL_NVIC_ACTIVATE_FDCAN(FDCANX, ITY, preirq, subirq) \ - do { \ - if (FDCANX == ##FDCAN1 && ITY == 0) { ACTIVATE_FDCAN_HELPER(FDCAN1, IT0, preirq, subirq); } \ - else if (FDCANX == FDCAN1 && ITY == 1) { ACTIVATE_FDCAN_HELPER(FDCAN1, IT1, preirq, subirq); } \ - else if (FDCANX == FDCAN2 && ITY == 0) { ACTIVATE_FDCAN_HELPER(FDCAN2, IT0, preirq, subirq); } \ - else if (FDCANX == FDCAN2 && ITY == 1) { ACTIVATE_FDCAN_HELPER(FDCAN2, IT1, preirq, subirq); } \ - else if (FDCANX == FDCAN3 && ITY == 0) { ACTIVATE_FDCAN_HELPER(FDCAN3, IT0, preirq, subirq); } \ - else if (FDCANX == FDCAN3 && ITY == 1) { ACTIVATE_FDCAN_HELPER(FDCAN3, IT1, preirq, subirq); } \ - else { LOGOMATIC("Unrecognized FDCAN and Interrupt Line combination"); } \ - } while(0) - -*/ - -// TODO: Modify helpers to work across families -// helpers ================= -static int fdcan_shared_clock_ref = 0; -static inline void fdcan_enable_shared_clock(void); -static inline void fdcan_disable_shared_clock(void); -static CANHandle *can_get_handle(FDCAN_HandleTypeDef *hfdcan); -static CAN_STATUS can_get_irqs(FDCAN_GlobalTypeDef *instance, IRQn_Type *it0, IRQn_Type *it1); -static CAN_STATUS validate_can_handle(CANHandle *canHandle); - -inline void can_set_clksource(uint32_t clksource) -{ - LL_RCC_SetFDCANClockSource(clksource); -} -static const char *can_get_instance_name(FDCAN_GlobalTypeDef *instance); -// static inline void gpio_clk_enable(GPIO_TypeDef *gpio) -// static inline void gpio_clk_disable(GPIO_TypeDef *gpio) - -static CAN_STATUS can_msp_init(CANHandle *canHandle, CANConfig *config); -static CAN_STATUS can_msp_deinit(CANHandle *canHandle); -static void FDCAN_InstanceDeInit(FDCAN_HandleTypeDef *hfdcan); - -//================================================= API ======================================== -CANHandle *can_init(const CANConfig *config) -{ - // config validation? - // assert(config != 0) - CANHandle *canHandle = NULL; - -#ifdef STM32G474xx -#ifdef USECAN1 - if (config->fdcan_instance == FDCAN1) { - if (CAN1.init) { - LOGOMATIC("CAN: CAN1 is already initialized\n"); - return CAN_SUCCESS; - } else { - canHandle = &CAN1; - canHandle->tx_capacity = TX_BUFFER_1_SIZE; - } - } -#endif -#ifdef USECAN2 - if (config->fdcan_instance == FDCAN2) { - if (CAN2.init) { - LOGOMATIC("CAN: CAN2 is already initialized\n"); - return CAN_SUCCESS; - } else { - canHandle = &CAN2; - canHandle->tx_capacity = TX_BUFFER_2_SIZE; - LOGOMATIC("CAN: CAN2 selected with tx capacity %lu\n", canHandle->tx_capacity); - } - } -#endif -#ifdef USECAN3 - if (config->fdcan_instance == FDCAN3) { - if (CAN3.init) { - LOGOMATIC("CAN: CAN3 is already initialized\n"); - return CAN_SUCCESS; - } else { - canHandle = &CAN3; - canHandle->tx_capacity = TX_BUFFER_3_SIZE; - } - } -#endif - -// TODO: figure out a better way to extend this to other families besides ifdef soup -#elif defined(STM32G431xx) -#ifdef USECAN1 - if (config->fdcan_instance == FDCAN1) { - if (CAN1.init) { - LOGOMATIC("CAN: CAN1 is already initialized\n"); - return CAN_SUCCESS; - } else { - canHandle = &CAN1; - canHandle->tx_capacity = TX_BUFFER_1_SIZE; - } - } -#endif - -#endif - - // #elif defined(STM32L476xx) - // #else - // #error "Unsupported STM32 family" - // #endif - - if (canHandle == NULL) { - LOGOMATIC("CAN: Unrecognized FDCAN instance"); - return NULL; - } - - canHandle->init = false; - canHandle->started = false; - - // Initialize handle - assert(config->hal_fdcan_init.TxFifoQueueMode == FDCAN_TX_FIFO_OPERATION); - // assert(config->hal_fdcan_init.FrameFormat == FDCAME); - - canHandle->hal_fdcanP->Init = config->hal_fdcan_init; // copy FDCAN parameters from user - // canHandle->hal_fdcanP->Instance = config->fdcan_instance //handles initialized with correct base instance addresses - - canHandle->rx_gpio = config->rx_gpio; - canHandle->tx_gpio = config->tx_gpio; - canHandle->rx_pin = config->init_rx_gpio.Pin; - canHandle->tx_pin = config->init_tx_gpio.Pin; - - canHandle->rx_interrupt_priority = config->rx_interrupt_priority; - canHandle->tx_interrupt_priority = config->tx_interrupt_priority; - - canHandle->rx_callback = config->rx_callback; - - // tx buffer - // canHandle->tx_capacity = TX_BUFFER_SIZE_1; //dependent on can instance - canHandle->tx_tail = 0; - canHandle->tx_elements = 0; - - // error - canHandle->lost_rx = 0; - - // alternately -> have can_msp_init setup state for HAL_FDCAN_MspInit to work correctly - // have can_msp_deinit setup state for HAL_FDCAN_MspDeInit to work correctly - // Then call HAL_FDCAN_Init() and HAL_FDCAN_DeInit() - - // Current idea, redefine HAL_FDCAN_MspInit and MspDeInit to do nothing at all, do all the work in can_msp_init() - uint32_t failure = 0; - if (failure |= (can_msp_init(canHandle, (CANConfig *)config) != CAN_SUCCESS)) { - LOGOMATIC("CAN_init: could not initialize MSP resources"); - return NULL; - } - - // PROBLEM: HAL_FDCAN_Init expects HAL_FDCAN_MspInit() to be defined - if (HAL_FDCAN_Init(canHandle->hal_fdcanP) != HAL_OK) { - failure |= HAL_ERROR; - LOGOMATIC("CAN: HAL Could not initialize FDCAN peripheral"); - return NULL; - // Error_Handler(); - } - - // Active FDCAN callbacks - rxcalback uses line0, txcallback uses line1 - // uint32_t rxevents = FDCAN_IT_RX_FIFO0_NEW_MESSAGE; - uint32_t status = 0; - uint32_t rx_events = FDCAN_IT_RX_FIFO0_NEW_MESSAGE | FDCAN_IT_RX_FIFO0_FULL | FDCAN_IT_RX_FIFO0_MESSAGE_LOST; - status |= HAL_FDCAN_ActivateNotification(canHandle->hal_fdcanP, rx_events, 0); - status |= HAL_FDCAN_ConfigInterruptLines(canHandle->hal_fdcanP, rx_events, FDCAN_INTERRUPT_LINE0); - - // uint32_t txevents = FDCAN_IT_TX_COMPLETE; - uint32_t destinations = FDCAN_TX_BUFFER0; - uint32_t tx_events = FDCAN_IT_TX_COMPLETE | FDCAN_IT_TX_FIFO_EMPTY; - status |= HAL_FDCAN_ActivateNotification(canHandle->hal_fdcanP, tx_events, destinations); - status |= HAL_FDCAN_ConfigInterruptLines(canHandle->hal_fdcanP, tx_events, FDCAN_INTERRUPT_LINE1); - - uint32_t err_events = FDCAN_IT_BUS_OFF | FDCAN_IT_ERROR_PASSIVE | FDCAN_IT_ERROR_WARNING | FDCAN_IT_ARB_PROTOCOL_ERROR | FDCAN_IT_DATA_PROTOCOL_ERROR; - status |= HAL_FDCAN_ActivateNotification(canHandle->hal_fdcanP, err_events, 0); - status |= HAL_FDCAN_ConfigInterruptLines(canHandle->hal_fdcanP, err_events, FDCAN_INTERRUPT_LINE1); - // Callbacks redefined later - - if (status & HAL_ERROR) { - LOGOMATIC("CAN: Could not activate rx, tx, and error interrupts\n"); - failure |= status; - } - - // Circular Buffer - // canHandle->tx_buffer = GR_CircularBuffer_Create(config->tx_buffer_length); - // canHandle->tx_buffer = malloc(sizeof(FDCANTxMessage)*canHandle->tx_buffer_length); - if (!canHandle->tx_buffer) { - LOGOMATIC("tx_buffer isn't valid?"); - failure |= 1; - } - - if (failure) { - can_msp_deinit(canHandle); - FDCAN_InstanceDeInit(canHandle->hal_fdcanP); - - FDCAN_HandleTypeDef *temp = canHandle->hal_fdcanP; - memset(canHandle, 0, sizeof(*canHandle)); // FIXME: Make sure instance is not being overwritten (FDCANx) - canHandle->hal_fdcanP = temp; - - return NULL; - } - -#ifdef USEDMA - // for(int i = 0; i < 10; i++); - DMA_M2M_Init(canHandle->rx_interrupt_priority, 0, canHandle->rx_callback); -#endif - - canHandle->init = true; - canHandle->started = false; - - return canHandle; -} - -CAN_STATUS can_release(CANHandle *canHandle) -{ - if (validate_can_handle(canHandle) != CAN_SUCCESS) { - return CAN_ERROR; - } - - if (!canHandle->init) { - LOGOMATIC("CAN_release: can instance is already deinitialized"); - return CAN_ERROR; - } - - if (can_stop(canHandle)) { // try to prevent more interrupts from firing - LOGOMATIC("CAN_release: could not stop instance"); - return CAN_ERROR; - } - - // No more interrupts should be firing that modify canHandle - if (can_msp_deinit(canHandle) != CAN_SUCCESS) { - LOGOMATIC("CAN_release: could not stop instance"); - return CAN_ERROR; - } - - // reset FDCANx instance and message RAM and filters, clear interrupts - // HAL_FDCAN_DeInit(canHandle->hal_fdcanP); resets a little too hard - FDCAN_InstanceDeInit(canHandle->hal_fdcanP); - - __DSB(); // Data Synchronization Barrier - __ISB(); // Instruction Synchronization Barrier - - // free circular buffer contents - // GR_CircularBuffer_Free(&(canHandle->tx_buffer)); - memset((void *)canHandle->tx_buffer, 0, canHandle->tx_capacity * sizeof(canHandle->tx_buffer[0])); - canHandle->tx_elements = 0; - canHandle->tx_tail = 0; - - // reset can handle - // FDCAN_HandleTypeDef *temp = canHandle->hal_fdcanP; - // uint32_t capacity = canHandle->tx_capacity; - // FDCANTxMessage* buff = canHandle->tx_buffer; - - canHandle->init = 0; - canHandle->started = 0; - canHandle->rx_callback = 0; - canHandle->tx_elements = 0; - canHandle->rx_gpio = 0; - canHandle->rx_interrupt_priority = 0; - canHandle->tx_interrupt_priority = 0; - canHandle->tx_gpio = 0; - canHandle->rx_pin = 0; - canHandle->tx_pin = 0; - canHandle->tx_tail = 0; - canHandle->lost_rx = 0; - - // memset(canHandle, 0, sizeof(*canHandle)); - // canHandle->hal_fdcanP = temp; - // canHandle->tx_capacity = capacity; - // canHandle->tx_buffer = buff; - - return CAN_SUCCESS; -} -// TODO: Implement timer -// lock access to Circular Buffer when sending and dequeuing -void can_tx_dequeue_helper(CANHandle *handle) -{ - // TODO: validate buffer - if (!handle->tx_buffer) { - LOGOMATIC("can_tx_buffer_helper: buffer is invalid"); - return; - } - - // LOGOMATIC("CAN %s, LOAD %2.2f \n", can_get_instance_name(handle->hal_fdcanP->Instance), (float)handle->tx_elements / (float)handle->tx_capacity); - - // use interrupt masking in case any other ISRs need to lock the circular buffer - uint32_t basepri = __get_BASEPRI(); - __set_BASEPRI(handle->tx_interrupt_priority << 4); - // single consumer shouldn't affect state of circular buffer - if (handle->tx_elements == 0) { - __set_BASEPRI(basepri); - return; - } - - FDCAN_ProtocolStatusTypeDef protocol_status = {0}; - if (HAL_FDCAN_GetProtocolStatus(handle->hal_fdcanP, &protocol_status) == HAL_OK && protocol_status.BusOff) { - LOGOMATIC("CAN_send: bus off detected, attempting recovery\n"); - if (HAL_FDCAN_Stop(handle->hal_fdcanP) != HAL_OK) { - LOGOMATIC("CAN_send: failed to stop FDCAN peripheral during bus off recovery\n"); - __set_BASEPRI(basepri); - return; - } - uint32_t abort_mask = FDCAN_TX_BUFFER0 | FDCAN_TX_BUFFER1 | FDCAN_TX_BUFFER2; - HAL_FDCAN_AbortTxRequest(handle->hal_fdcanP, abort_mask); - if (HAL_FDCAN_Start(handle->hal_fdcanP) != HAL_OK) { - LOGOMATIC("CAN_send: failed to restart FDCAN peripheral during bus off recovery\n"); - __set_BASEPRI(basepri); - return; - } - } - - if (HAL_FDCAN_IsRestrictedOperationMode(handle->hal_fdcanP)) { - LOGOMATIC("CAN_send: currently in restricted operation mode\n"); - HAL_FDCAN_ExitRestrictedOperationMode(handle->hal_fdcanP); - } - - // Can Add to Fifo Q - if (HAL_FDCAN_GetTxFifoFreeLevel(handle->hal_fdcanP)) { - const FDCANTxMessage *msg = &(handle->tx_buffer[handle->tx_tail]); - - // should call Tx Buffer Callback once complete - HAL_StatusTypeDef status = HAL_FDCAN_AddMessageToTxFifoQ(handle->hal_fdcanP, &msg->tx_header, msg->data); - - if (status != HAL_OK) { - // LOGOMATIC("CAN_tx_helper: failed to add message to FIFO\n"); //FIXME: Logomatic may not work with interrupts disabled - __set_BASEPRI(basepri); - return; // Stop trying to send more - } - // free(msg); // Successfully sent, free the entry in the circular buffer (which is pointed to by tail) - handle->tx_tail = ++handle->tx_tail % handle->tx_capacity; - handle->tx_elements--; - - } else { // FIXME: call can_tx_dequeue_helper later with a timer, if this gets implemented, need to mask timer interrupts to allow atomic access - - } // alternatively, if fifo is full, tx_dequeue should get called anyways, and we don't need the else statement - - __set_BASEPRI(basepri); -} - -#ifdef PROFILE -dwt_timer_t send_timer = {0}; -#endif - -CAN_STATUS can_enqueue(CANHandle *canHandle, FDCANTxMessage *message) -{ - - if (validate_can_handle(canHandle) != CAN_SUCCESS) { - return CAN_ERROR; - } - - if (!canHandle->started) { - LOGOMATIC("CAN_send: instance is not started\n"); - return CAN_ERROR; - } - - if (message == NULL) { - LOGOMATIC("CAN_enqueue: received null pointer for message\n"); - return CAN_ERROR; - } - - if (!canHandle->init || !canHandle->started) { - LOGOMATIC("CAN_send: CAN not initialized or started\n"); - return CAN_ERROR; - } - - // enques can message - if (canHandle->tx_elements < canHandle->tx_capacity) { - // int result = GR_CircularBuffer_Push(canHandle->tx_buffer, message, sizeof(FDCANTxMessage)); - - uint32_t idx = (canHandle->tx_tail + canHandle->tx_elements) % canHandle->tx_capacity; - canHandle->tx_buffer[idx] = *message; - canHandle->tx_elements++; - - // memcpy(&canHandle->tx_buffer[idx], message , sizeof(FDCANTxMessage) ); - - __set_BASEPRI(__get_BASEPRI()); - return CAN_SUCCESS; // added to software buffer - - /*if (result != 0) { - LOGOMATIC("CAN_send: buffer push failed\n"); - return CAN_ERROR; - } else { - return CAN_SUCCESS; - }*/ - } - - LOGOMATIC("CAN_send: all buffers full\n"); // p - __set_BASEPRI(__get_BASEPRI()); - return CAN_ERROR; -} - -// ONLY CALLED FROM A TIMER -CAN_STATUS can_send(CANHandle *canHandle, FDCANTxMessage *message) -{ - // IF TX Fifos are not full, send directly to them - // If TX Fifos are full, append to circular buffer - // If circular buffer is full, return an error code - - // stop can_tx_dequeue_helper from from interleaving - // TODO: Check BASEPRI register - uint32_t basepri = __get_BASEPRI(); - __set_BASEPRI((canHandle->tx_interrupt_priority) << 4); - - FDCAN_ProtocolStatusTypeDef protocol_status = {0}; - if (HAL_FDCAN_GetProtocolStatus(canHandle->hal_fdcanP, &protocol_status) == HAL_OK && protocol_status.BusOff) { - LOGOMATIC("CAN_send: bus off detected, attempting recovery\n"); - if (HAL_FDCAN_Stop(canHandle->hal_fdcanP) != HAL_OK) { - LOGOMATIC("CAN_send: failed to stop FDCAN peripheral during bus off recovery\n"); - __set_BASEPRI(basepri); - return CAN_ERROR; - } - uint32_t abort_mask = FDCAN_TX_BUFFER0 | FDCAN_TX_BUFFER1 | FDCAN_TX_BUFFER2; - HAL_FDCAN_AbortTxRequest(canHandle->hal_fdcanP, abort_mask); - if (HAL_FDCAN_Start(canHandle->hal_fdcanP) != HAL_OK) { - LOGOMATIC("CAN_send: failed to restart FDCAN peripheral during bus off recovery\n"); - __set_BASEPRI(basepri); - return CAN_ERROR; - } - } - - if (HAL_FDCAN_IsRestrictedOperationMode(canHandle->hal_fdcanP)) { - LOGOMATIC("CAN_send: currently in restricted operation mode\n"); - HAL_FDCAN_ExitRestrictedOperationMode(canHandle->hal_fdcanP); - } - - uint32_t free = 0; - if ((free = HAL_FDCAN_GetTxFifoFreeLevel(canHandle->hal_fdcanP)) > 0) { - HAL_StatusTypeDef status = HAL_FDCAN_AddMessageToTxFifoQ(canHandle->hal_fdcanP, &(message->tx_header), message->data); - - if (status != HAL_OK) { - LOGOMATIC("CAN_send: failed to add to HW FIFO, falling back to SW queue\n"); - } else { - __set_BASEPRI(basepri); - return CAN_SUCCESS; // Successfully added to HW FIFO - } - } - //} - - LOGOMATIC("CAN_send: all buffers full\n"); // p - __set_BASEPRI(basepri); - // Both buffers full - return CAN_ERROR; -} - -void HAL_FDCAN_ErrorStatusCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t ErrorStatusITs) -{ - CANHandle *handle = can_get_handle(hfdcan); - if (!handle || !handle->init) { - return; - } - - LOGOMATIC("%s: FDCAN error status interrupt: 0x%08lX\n", can_get_instance_name(handle->hal_fdcanP->Instance), ErrorStatusITs); - - if (HAL_FDCAN_IsRestrictedOperationMode(hfdcan)) { - HAL_FDCAN_ExitRestrictedOperationMode(hfdcan); - } -} - -// #define PROFILE -// uint32_t PROFILE_AVG_RX_CYCLES = 0; -// uint32_t PROFILE_AVG_RX_CYCLES_SAMPLES = 0; - -#ifdef PROFILE -dwt_timer_t rx_timer = {0}; -#endif - -void HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs) -{ - // dwt_timer_start_measurement(&rx_timer); - - // dwt_timer_start_measurement(&rx_timer); - - CANHandle *handle = can_get_handle(hfdcan); - - if (!handle || !handle->init || !handle->rx_callback) { - return; - } - - /*if (!handle->rx_buffer) { - LOGOMATIC("CAN: RX Complete, but %s Buffer was released\n", can_get_instance_name(hfdcan->Instance)); - return; - } */ // no rx buffer at the moment - - if (RxFifo0ITs & FDCAN_IT_RX_FIFO0_MESSAGE_LOST) { - // TODO: Synchronize access to message counters - if (__builtin_uaddl_overflow(handle->lost_rx, 1, &handle->lost_rx)) { - handle->lost_rx = 0; - LOGOMATIC("%s: lost message counter overflowed\n", can_get_instance_name(handle->hal_fdcanP->Instance)); - } - } - - // If nothing else happened besides message loss - if (!(RxFifo0ITs & ~FDCAN_IT_RX_FIFO0_MESSAGE_LOST)) { - return; - } - - if (!(RxFifo0ITs & (FDCAN_IT_RX_FIFO0_NEW_MESSAGE | FDCAN_IT_RX_FIFO0_FULL))) { - return; - } - - // if (GR_CircularBuffer_IsFull(handle->rx_buffer)) return; - FDCAN_RxHeaderTypeDef rx_header = {0}; - - // TODO: Stack allocation should be safe - // uint8_t rx_data[64] = {0}; - uint8_t rx_data[64] __attribute__((aligned(4))) = {0}; // align to word boundary for safe DMA transfer - - // TODO: Copying takes a while, may have to spread these out over multiple ISRs - while (HAL_FDCAN_GetRxFifoFillLevel(hfdcan, FDCAN_RX_FIFO0) > 0) { -#ifdef USEDMA - - // dwt_timer_start_measurement(&rx_timer); - FDCAN_GetRxMessage_DMA(hfdcan, FDCAN_RX_FIFO0, &rx_header, rx_data); - // dwt_timer_end_measurement(&rx_timer); - -#else - - // dwt_timer_start_measurement(&rx_timer); - HAL_FDCAN_GetRxMessage(hfdcan, FDCAN_RX_FIFO0, &rx_header, rx_data); - // dwt_timer_end_measurement(&rx_timer); - -#endif - - // GR_OLD_NODE_ID sendingID = (rx_header.Identifier & (0xFF << 20)) >> 20; - // GR_OLD_MSG_ID messageID = (rx_header.Identifier & (0xFFF << 8)) >> 8; - - // TODO: move callbacks to correct positions, but right now you are using polling DMA so this is fine. - handle->rx_callback(rx_header.Identifier, rx_data, CANFD_DLCtoBytes[rx_header.DataLength]); - } - - //__set_BASEPRI(prev_priority); - // dwt_timer_end_measurement(&rx_timer); -} - -/* -void can_read_rx_buffer(CANHandle* canHandle) { - //User can call this at their leisure to pop the rx_buffer - - //read rx_buffer one element at a time? - //or read until empty -}*/ - -/*void HAL_FDCAN_RxFifo1Callback(FDCAN_HandleTypeDef * hfdcan, uint32_t RxFifo0ITs) { - -}*/ - -// Just alternatively just use the HAL_FDCAN_ConfigFilter directly with the canHandle->hal_fdcan -CAN_STATUS can_add_filter(CANHandle *canHandle, FDCAN_FilterTypeDef *filter) -{ - if (validate_can_handle(canHandle) != CAN_SUCCESS) { - return CAN_ERROR; - } - - if (!canHandle->init || canHandle->started) { - LOGOMATIC("CAN_add_filter: can instance is not initialized or already started\n"); - return CAN_ERROR; - } - - if (HAL_FDCAN_ConfigFilter(canHandle->hal_fdcanP, filter) != HAL_OK) { - LOGOMATIC("CAN_add_filter: failed to configure filter\n"); - return CAN_ERROR; - } - return CAN_SUCCESS; - // check that # of filters isn't exceeding max value -} - -CAN_STATUS can_start(CANHandle *canHandle) -{ - if (validate_can_handle(canHandle) != CAN_SUCCESS) { - return CAN_ERROR; - } - - if (!canHandle->init) { - LOGOMATIC("CAN_start: can instance is not initialized\n"); - return CAN_ERROR; - } - - if (canHandle->started) { - return CAN_SUCCESS; - } - - IRQn_Type rx0it, txit; - rx0it = txit = -1; // TOOD: Check that this is a valid way to initialize an invalid value - if (can_get_irqs(canHandle->hal_fdcanP->Instance, &rx0it, &txit) != CAN_SUCCESS) { - LOGOMATIC("can_start: could not obtain irq #s\n"); - return CAN_ERROR; - } - - HAL_NVIC_ClearPendingIRQ(rx0it); // prevent a spurious interrupt - HAL_NVIC_ClearPendingIRQ(txit); - - GPIOx_CLK_ENABLE(canHandle->rx_gpio); - GPIOx_CLK_ENABLE(canHandle->tx_gpio); - - HAL_FDCAN_Start(canHandle->hal_fdcanP); - - canHandle->started = true; - - HAL_NVIC_EnableIRQ(rx0it); - HAL_NVIC_EnableIRQ(txit); - - return CAN_SUCCESS; -} - -CAN_STATUS can_stop(CANHandle *canHandle) -{ - if (validate_can_handle(canHandle) != CAN_SUCCESS) { - return CAN_ERROR; - } - - if (!canHandle->init) { - LOGOMATIC("CAN_stop: can instance is not initialized\n"); - return CAN_ERROR; - } - - if (!canHandle->started) { - return CAN_SUCCESS; - } - - // stop can interrupts from activating - uint32_t base_pri = __get_BASEPRI(); - __set_BASEPRI(MIN(canHandle->rx_interrupt_priority, canHandle->tx_interrupt_priority) << 4); - - if (HAL_FDCAN_Stop(canHandle->hal_fdcanP) != HAL_OK) { - return CAN_ERROR; - } - - IRQn_Type rx0it, txit; - rx0it = txit = -1; - if (can_get_irqs(canHandle->hal_fdcanP->Instance, &rx0it, &txit) != CAN_SUCCESS) { - return CAN_ERROR; - } - - HAL_NVIC_DisableIRQ(rx0it); - HAL_NVIC_DisableIRQ(txit); - HAL_NVIC_ClearPendingIRQ(rx0it); - HAL_NVIC_ClearPendingIRQ(txit); - - __set_BASEPRI(base_pri); - - GPIOx_CLK_DISABLE(canHandle->rx_gpio); - GPIOx_CLK_DISABLE(canHandle->tx_gpio); - - canHandle->started = false; - - // TODO: stop a DMA transfer if its in progress - - return CAN_SUCCESS; -} - -// ==================================== HELPER FUNCTIONS =============================================== -// TODO: Abstract across families - -static inline void fdcan_enable_shared_clock(void) -{ - if (fdcan_shared_clock_ref == 0) { - __HAL_RCC_FDCAN_CLK_ENABLE(); - } - fdcan_shared_clock_ref++; -} - -static inline void fdcan_disable_shared_clock(void) -{ - if (fdcan_shared_clock_ref > 0) { - fdcan_shared_clock_ref--; - if (fdcan_shared_clock_ref == 0) { - __HAL_RCC_FDCAN_CLK_DISABLE(); - } - } -} - -// valid only for STM32G4 -static CAN_STATUS can_get_irqs(FDCAN_GlobalTypeDef *instance, IRQn_Type *it0, IRQn_Type *it1) -{ -#ifdef STM32G474xx - if (instance == FDCAN1) { - *it0 = FDCAN1_IT0_IRQn; - *it1 = FDCAN1_IT1_IRQn; - return CAN_SUCCESS; - } - if (instance == FDCAN2) { - *it0 = FDCAN2_IT0_IRQn; - *it1 = FDCAN2_IT1_IRQn; - return CAN_SUCCESS; - } - if (instance == FDCAN3) { - *it0 = FDCAN3_IT0_IRQn; - *it1 = FDCAN3_IT1_IRQn; - return CAN_SUCCESS; - } - - // TODO: START of possible ifdef soup -#elif defined(STM32G431xx) - if (instance == FDCAN1) { - *it0 = FDCAN1_IT0_IRQn; - *it1 = FDCAN1_IT1_IRQn; - return CAN_SUCCESS; - } -#endif - - LOGOMATIC("can_get_irqs: could not obtain irq #s\n"); - return CAN_ERROR; // invalid instance -} - -static CANHandle *can_get_handle(FDCAN_HandleTypeDef *hfdcan) -{ -#ifdef STM32G4 -#ifdef USECAN1 - if (hfdcan->Instance == FDCAN1) { - return &CAN1; - } -#endif -#ifdef USECAN2 - if (hfdcan->Instance == FDCAN2) { - return &CAN2; - } -#endif -#ifdef USECAN3 - if (hfdcan->Instance == FDCAN3) { - return &CAN3; - } -#endif -#endif - - LOGOMATIC("CAN_get_handle: was given invalid FDCAN instance\n"); - UNUSED(hfdcan); - return NULL; -} - -static CAN_STATUS validate_can_handle(CANHandle *canHandle) -{ - - if (canHandle == NULL) { - LOGOMATIC("can.c: handle is null\n"); - return CAN_ERROR; - } - -#ifdef STM32G4 -#ifdef USECAN1 - if (canHandle == &CAN1) { - return CAN_SUCCESS; - } -#endif -#ifdef USECAN2 - if (canHandle == &CAN2) { - return CAN_SUCCESS; - } -#endif -#ifdef USECAN3 - if (canHandle == &CAN3) { - return CAN_SUCCESS; - } -#endif -#endif - - LOGOMATIC("can.c: invalid can handle\n"); - return CAN_ERROR; -} - -/* -static inline void gpio_clk_enable(GPIO_TypeDef *gpio) -{ - if (gpio == GPIOA) { - __HAL_RCC_GPIOA_CLK_ENABLE(); - } else if (gpio == GPIOB) { - __HAL_RCC_GPIOB_CLK_ENABLE(); - } else if (gpio == GPIOD) { - __HAL_RCC_GPIOD_CLK_ENABLE(); - } -} - -static inline void gpio_clk_disable(GPIO_TypeDef *gpio) -{ - if (gpio == GPIOA) { - __HAL_RCC_GPIOA_CLK_DISABLE(); - } else if (gpio == GPIOB) { - __HAL_RCC_GPIOB_CLK_DISABLE(); - } else if (gpio == GPIOD) { - __HAL_RCC_GPIOD_CLK_DISABLE(); - } -}*/ - -// only valid for #STM32G474x, must redefine for each family -static CAN_STATUS can_msp_init(CANHandle *canHandle, CANConfig *config) -{ - // MSP Init ------- This could be inside HAL_FDCAN_MspInit() instead - // FDCAN Clock Select - - fdcan_enable_shared_clock(); - - // Clock speed for FDCAN determined by APB1 clock speed and FDCAN prescaler - - // GPIOs init - GPIOx_CLK_ENABLE(config->rx_gpio); - GPIOx_CLK_ENABLE(config->tx_gpio); - - HAL_GPIO_Init(config->rx_gpio, &(config->init_rx_gpio)); - HAL_GPIO_Init(config->tx_gpio, &(config->init_tx_gpio)); - - IRQn_Type rxit = -1; - IRQn_Type txit = -1; - if (can_get_irqs(canHandle->hal_fdcanP->Instance, &rxit, &txit) != CAN_SUCCESS) { - return CAN_ERROR; - } - - // rxfifo0 - HAL_NVIC_SetPriority(rxit, config->rx_interrupt_priority, 0); - - // tx - HAL_NVIC_SetPriority(txit, config->tx_interrupt_priority, 0); - // End MSP Init -------------- - - // Call can_start() to enable interrupts - - return CAN_SUCCESS; -} - -// Valid only for STM32G474xE -static CAN_STATUS can_msp_deinit(CANHandle *canHandle) -{ - // MSP DeInit - // must disable NVIC IRQs before freeing circular buffer - - // NVIC - IRQn_Type rx0it = -1; - IRQn_Type txit = -1; - if (can_get_irqs(canHandle->hal_fdcanP->Instance, &rx0it, &txit) != CAN_SUCCESS) { - return CAN_ERROR; - } - - HAL_NVIC_DisableIRQ(rx0it); - HAL_NVIC_DisableIRQ(txit); - - // TODO: turn off gpio clocks if no other peripherals are using them??? Could implement a shared GPIO layer - // HAL_GPIO_DeInit(canHandle->rx_gpio, canHandle->rx_pin); - // HAL_GPIO_DeInit(canHandle->tx_gpio, canHandle->tx_pin); - - // MSP shared layer for GPIOs - // TODO: used to disable GPIOs clocks, but that might affect other peripherals - - // RCC - // can only disable clock after resetting all FDCAN instances - return CAN_SUCCESS; -} - -static void FDCAN_InstanceDeInit(FDCAN_HandleTypeDef *hfdcan) -{ - // Enter INIT mode - hfdcan->Instance->CCCR |= FDCAN_CCCR_INIT; - while (!(hfdcan->Instance->CCCR & FDCAN_CCCR_INIT)) - ; - hfdcan->Instance->CCCR |= FDCAN_CCCR_CCE; - - // Disable interrupts - //__HAL_FDCAN_DISABLE_IT(hfdcan, FDCAN_IT_LIST_RX_FIFO0 | FDCAN_IT_LIST_RX_FIFO1 | FDCAN_IT_LIST_SMSG | FDCAN_IT_LIST_TX_FIFO_ERROR | FDCAN_IT_LIST_MISC | //FDCAN_IT_LIST_BIT_LINE_ERROR | - // FDCAN_IT_LIST_PROTOCOL_ERROR); - - // - CLEAR_BIT(hfdcan->Instance->ILE, (FDCAN_INTERRUPT_LINE0 | FDCAN_INTERRUPT_LINE1)); - - // Clear filters - // TODO: fix magic numbers - memset((void *)hfdcan->msgRam.StandardFilterSA, 0, 0x0070); - memset((void *)hfdcan->msgRam.ExtendedFilterSA, 0, 0x0050); - - // Optionally clear FIFOs / buffers - - // Exit INIT mode - hfdcan->Instance->CCCR &= ~FDCAN_CCCR_INIT; - while (hfdcan->Instance->CCCR & FDCAN_CCCR_INIT) - ; - - // Update handle state - hfdcan->State = HAL_FDCAN_STATE_RESET; - - fdcan_disable_shared_clock(); -} - -// valid only for STM32G4 -static const char *can_get_instance_name(FDCAN_GlobalTypeDef *instance) -{ -#ifdef STM32G474xx - - if (instance == FDCAN1) { - return "FDCAN1"; - } else if (instance == FDCAN2) { - return "FDCAN2"; - } else if (instance == FDCAN3) { - return "FDCAN3"; - } -#elif defined(STM32G431xx) - if (instance == FDCAN1) { - return "FDCAN1"; - } -#endif - return "UNKNOWN"; -} - -// ===================================== HAL Callbacks ================================ -// TODO: Implement Family Checks -void FDCAN1_IT0_IRQHandler(void) -{ -#ifdef USECAN1 - HAL_FDCAN_IRQHandler(&hal_fdcan1); -#endif -} -void FDCAN1_IT1_IRQHandler(void) -{ -#ifdef USECAN1 - HAL_FDCAN_IRQHandler(&hal_fdcan1); -#endif -} - -void FDCAN2_IT0_IRQHandler(void) -{ -#ifdef USECAN2 - HAL_FDCAN_IRQHandler(&hal_fdcan2); -#endif -} -void FDCAN2_IT1_IRQHandler(void) -{ -#ifdef USECAN2 - HAL_FDCAN_IRQHandler(&hal_fdcan2); -#endif -} - -void FDCAN3_IT0_IRQHandler(void) -{ -#ifdef USECAN3 - HAL_FDCAN_IRQHandler(&hal_fdcan3); -#endif -} -void FDCAN3_IT1_IRQHandler(void) -{ -#ifdef USECAN3 - HAL_FDCAN_IRQHandler(&hal_fdcan3); -#endif -} - -// NEW THINGS - -void CAN_Timer_Start(void) -{ - static bool initialized = false; - - if (initialized) { - LOGOMATIC("CAN_Timer_Start: timer is already initialized\n"); - return; - } - - RCC_ClkInitTypeDef clkconfig = {0}; - uint32_t latency = 0; - HAL_RCC_GetClockConfig(&clkconfig, &latency); - - uint32_t apb1_div = clkconfig.APB1CLKDivider; - uint32_t tim_clock = (apb1_div == RCC_HCLK_DIV1) ? HAL_RCC_GetPCLK1Freq() : (2U * HAL_RCC_GetPCLK1Freq()); - - // 10 kHz counter clock keeps both PSC/ARR in range for a 1 second period. - const uint32_t counter_hz = 10000U; - if (tim_clock < counter_hz) { - LOGOMATIC("CAN_Timer_Start: APB1 clock is too slow to achieve desired timer frequency\n"); - return; - } - - uint32_t prescaler = (tim_clock / counter_hz) - 1U; - if (prescaler > 0xFFFFU) { - LOGOMATIC("CAN_Timer_Start: failed to initialize timer prescaler\n"); - return; - } - - uint32_t autoreload = ((CAN_TIMER_SEND_PERIOD_US * counter_hz) / 1000000U) - 1U; - if (autoreload > 0xFFFFU) { - LOGOMATIC("CAN_Timer_Start: failed to initialize timer autoreload\n"); - return; - } - - LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM5); - - LL_TIM_InitTypeDef tim_init = {0}; - tim_init.Prescaler = prescaler; - tim_init.CounterMode = LL_TIM_COUNTERMODE_UP; - tim_init.Autoreload = autoreload; - tim_init.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1; - - if (LL_TIM_Init(TIM5, &tim_init) != SUCCESS) { - LOGOMATIC("CAN_Timer_Start: failed to initialize timer\n"); - return; - } - - LL_TIM_SetClockSource(TIM5, LL_TIM_CLOCKSOURCE_INTERNAL); - LL_TIM_ClearFlag_UPDATE(TIM5); - LL_TIM_EnableIT_UPDATE(TIM5); - - HAL_NVIC_SetPriority(TIM5_IRQn, 15U, 0U); - HAL_NVIC_EnableIRQ(TIM5_IRQn); - - LL_TIM_EnableCounter(TIM5); - - initialized = true; - LOGOMATIC("CAN_Timer_Start: timer initialized\n"); - return; -} diff --git a/ECU/CMakeLists.txt b/ECU/CMakeLists.txt index d540a36e5..5c119b606 100644 --- a/ECU/CMakeLists.txt +++ b/ECU/CMakeLists.txt @@ -81,7 +81,6 @@ target_sources( Application/Src/CANutils.c Application/Src/Pinging.c Application/Src/Lights.c - Application/Src/ecu_can.c ) target_link_libraries( @@ -89,7 +88,7 @@ target_link_libraries( INTERFACE CANfigurator GR_ADC - #PERIPHERAL_CAN_LIB + PERIPHERAL_TIMEDCAN_LIB BitManipulations_Lib ) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index efc335045..66c567d5e 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -40,7 +40,7 @@ #include "StateTicks.h" #include "StateUtils.h" #include "adc.h" -#include "ecu_can.h" +#include "can.h" #include "stm32g4xx_hal.h" /* USER CODE END Includes */ @@ -343,7 +343,6 @@ void CAN_Configure(void) // timer can can_start(stateLump.primary_can); can_start(stateLump.data_can); - CAN_Timer_Start(); } /** * @brief The application entry point. diff --git a/ECU/Core/Src/stm32g4xx_it.c b/ECU/Core/Src/stm32g4xx_it.c index 97519bf4d..01ab766d9 100644 --- a/ECU/Core/Src/stm32g4xx_it.c +++ b/ECU/Core/Src/stm32g4xx_it.c @@ -20,7 +20,7 @@ /* Includes ------------------------------------------------------------------*/ #include "stm32g4xx_it.h" -#include "ecu_can.h" +#include "can.h" #include "main.h" #include "stm32g4xx_ll_tim.h" /* Private includes ----------------------------------------------------------*/ @@ -190,13 +190,5 @@ void SysTick_Handler(void) } /* USER CODE BEGIN 1 */ -void TIM5_IRQHandler(void) -{ - if (LL_TIM_IsActiveFlag_UPDATE(TIM5)) { - LL_TIM_ClearFlag_UPDATE(TIM5); - can_tx_dequeue_helper(stateLump.primary_can); // TODO: make this work for multiple instances if needed - can_tx_dequeue_helper(stateLump.data_can); - HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_11); - } -} + /* USER CODE END 1 */ From 02521ccfe91b86cf400a2069ca20ea8e1a114a46 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 12 May 2026 01:11:31 -0700 Subject: [PATCH 02/85] Bring back HOOTL testing Signed-off-by: Daniel Hansen --- ECU/CMakeLists.txt | 3 +-- ECU/Test/Inc/can.h | 2 +- ECU/Test/Inc/main.h | 2 ++ ECU/Test/Src/StateTicksTest.c | 2 +- ECU/Test/Src/can.c | 8 ++++---- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ECU/CMakeLists.txt b/ECU/CMakeLists.txt index 5c119b606..148a6806b 100644 --- a/ECU/CMakeLists.txt +++ b/ECU/CMakeLists.txt @@ -14,8 +14,7 @@ endif() get_filename_component(GR_PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) #TODO: when CAN implementation is settled, turn HOOTL tests back on -#if(CMAKE_PRESET_NAME STREQUAL "HOOTLTest") -if(FALSE) +if(CMAKE_PRESET_NAME STREQUAL "HOOTLTest") add_executable(StateTicksTest) target_include_directories( StateTicksTest diff --git a/ECU/Test/Inc/can.h b/ECU/Test/Inc/can.h index 87b34fa85..cc7810816 100644 --- a/ECU/Test/Inc/can.h +++ b/ECU/Test/Inc/can.h @@ -374,7 +374,7 @@ typedef struct { CANHandle *can_init(const CANConfig *config); // user must supply an rx callback function int can_start(CANHandle *handle); int can_stop(CANHandle *handle); -int can_send(CANHandle *handle, FDCANTxMessage *buffer); +int can_enqueue(CANHandle *canHandle, FDCANTxMessage *message); int can_release(CANHandle *handle); // deinit circular buffer and turn off can peripheral and gpios int can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter); // alternatively use diff --git a/ECU/Test/Inc/main.h b/ECU/Test/Inc/main.h index 4da12629e..64e24ccfa 100644 --- a/ECU/Test/Inc/main.h +++ b/ECU/Test/Inc/main.h @@ -1 +1,3 @@ #include "GRCAN_NODE_ID.h" + +#define FDCAN_CLASSIC_CAN 0 diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index ca33a402c..3f844fc29 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -5,7 +5,7 @@ #include "Logomatic.h" #include "StateData.h" #include "StateUtils.h" -#include "ecu_can.h" +#include "can.h" #include "stm32g4xx_hal.h" #include "stm32g4xx_hal_fdcan.h" diff --git a/ECU/Test/Src/can.c b/ECU/Test/Src/can.c index ba9e6581a..d8756c259 100644 --- a/ECU/Test/Src/can.c +++ b/ECU/Test/Src/can.c @@ -1,5 +1,5 @@ #include "Unused.h" -#include "ecu_can.h" +#include "can.h" int can_start(CANHandle *handle) { @@ -13,10 +13,10 @@ int can_stop(CANHandle *handle) return 0; } -int can_send(CANHandle *handle, FDCANTxMessage *buffer) +int can_enqueue(CANHandle *canHandle, FDCANTxMessage *message) { - UNUSED(handle); - UNUSED(buffer); + UNUSED(canHandle); + UNUSED(message); return 0; } From 44484e6cc9900d8c7722f5038ae05eedaf435f77 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Wed, 13 May 2026 00:56:45 -0700 Subject: [PATCH 03/85] Set bspd sense in test to new good value --- ECU/Test/Src/StateTicksTest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index 3f844fc29..df18705da 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -70,7 +70,7 @@ int main(void) // ## Step 0.0 ## // ########################### LOGOMATIC("State Ticks test started\n"); - ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .ams_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.5}; + ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .ams_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.2}; LOGOMATIC("Check GLV ON at boot\n"); stateLumpTest.ecu_state = GR_GLV_ON; stateLumpTest.acu_software_latch = 1; From ebe95dd3db9924cda3cbf09f8f152067b608c148 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:20:13 -0700 Subject: [PATCH 04/85] Fix analog data and inverter command frequency Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 34281c706..9420ed5b7 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -270,8 +270,8 @@ void ECU_Drive_Active(ECU_StateData *stateData) .steering_angle_signal = stateData->steering_angle_signal, .aux_signal = stateData->aux_signal}; UNUSED(message); // FIXME Eventually figure out what to do with this message here - // ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, sizeof(message)); // FIXME - last_can_inverter_request_millis = millis_since_boot; + ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, 10); // FIXME + last_can_tcm_request_millis = millis_since_boot; } } From 2e3667681c98ad2649196da95ca1002c7f13fc3b Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:21:10 -0700 Subject: [PATCH 05/85] Sanity set initial statics to 0 Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 9420ed5b7..d610546eb 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -247,7 +247,7 @@ void ECU_Drive_Active(ECU_StateData *stateData) torque_request = 0; } - static uint32_t last_can_inverter_request_millis; + static uint32_t last_can_inverter_request_millis = 0; if (RATE_LIMIT_100_HZ(millis_since_boot, last_can_inverter_request_millis)) { GRCAN_INVERTER_COMMAND_MSG message = {.set_ac_current = torque_request * 100 + 32768, .set_dc_current = torque_request * 100 + 32768, .drive_enable = 1, .rpm_limit = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inverter, GRCAN_INVERTER_COMMAND, &message, sizeof(message)); @@ -259,7 +259,7 @@ void ECU_Drive_Active(ECU_StateData *stateData) // placeholder for pedal data // TODO: determine send time (15, 20 ms?) - static uint32_t last_can_tcm_request_millis; + static uint32_t last_can_tcm_request_millis = 0; if (RATE_LIMIT_100_HZ(millis_since_boot, last_can_tcm_request_millis)) { GRCAN_ECU_ANALOG_DATA_MSG message = {.bspd_signal = stateData->bspd_signal, .bse_signal = stateData->bse_signal, From 619f576bc0f58a670f7ed44a01eb64e6bc06f972 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:21:41 -0700 Subject: [PATCH 06/85] Fix can dlc size Signed-off-by: Daniel Hansen --- ECU/Application/Src/CANutils.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 473376efe..e8d8847d1 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -28,12 +28,34 @@ void ECU_CAN_Send(GRCAN_BUS_ID bus, GRCAN_NODE_ID destNode, GRCAN_MSG_ID message uint32_t ID = ((0xFF & GRCAN_ECU) << 20) | ((0xFFF & messageID) << 8) | (0xFF & destNode); + uint8_t dlc = 0; + if (size <= 8) { + dlc = size; + } else if (size <= 12) { + dlc = 9; + } else if (size <= 16) { + dlc = 10; + } else if (size <= 20) { + dlc = 11; + } else if (size <= 24) { + dlc = 12; + } else if (size <= 32) { + dlc = 13; + } else if (size <= 48) { + dlc = 14; + } else if (size <= 64) { + dlc = 15; + } else { + dlc = FDCAN_MAX_DATA_BYTES; // should never happen due to earlier check + LOGOMATIC("Invalid CAN data size after check: %ld\n", size); + } + FDCAN_TxHeaderTypeDef header = { .Identifier = ID, .IdType = FDCAN_EXTENDED_ID, .TxFrameType = FDCAN_DATA_FRAME, .ErrorStateIndicator = FDCAN_ESI_ACTIVE, - .DataLength = size, + .DataLength = dlc, .BitRateSwitch = FDCAN_BRS_OFF, .TxEventFifoControl = FDCAN_NO_TX_EVENTS, .MessageMarker = 0, From d8bfa01da5202e2cb0bfb1612968e4addbd69308 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:21:58 -0700 Subject: [PATCH 07/85] Revise dti send can Signed-off-by: Daniel Hansen --- ECU/Application/Src/CANutils.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index e8d8847d1..04cc29398 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -100,17 +100,20 @@ void ECU_CAN_Send_DTI(GRCAN_CUSTOM_ID msgID, void *data, uint32_t size) TxHeader.Identifier = msgID; TxHeader.DataLength = size; - TxHeader.IdType = FDCAN_EXTENDED_ID; - TxHeader.FDFormat = FDCAN_CLASSIC_CAN; FDCANTxMessage msg = {0}; msg.tx_header = TxHeader; - for (uint32_t i = 0; i < size; i++) { - msg.data[size - i - 1] = ((uint8_t *)data)[i]; + uint8_t temp; + for (uint16_t i = 0; i < size / 2; ++i) { + temp = ((uint8_t *)data)[i]; + ((uint8_t *)data)[i] = ((uint8_t *)data)[size - i - 1]; + ((uint8_t *)data)[size - i - 1] = temp; } + memcpy(&(msg.data), data, size); + // can_send(primary_can, &msg); can_enqueue(stateLump.primary_can, &msg); } From b0180162925f46267d15502e7c004db1baf7ac11 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:22:14 -0700 Subject: [PATCH 08/85] Scale torque request respectfully Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index d610546eb..559f23bb7 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -251,7 +251,8 @@ void ECU_Drive_Active(ECU_StateData *stateData) if (RATE_LIMIT_100_HZ(millis_since_boot, last_can_inverter_request_millis)) { GRCAN_INVERTER_COMMAND_MSG message = {.set_ac_current = torque_request * 100 + 32768, .set_dc_current = torque_request * 100 + 32768, .drive_enable = 1, .rpm_limit = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inverter, GRCAN_INVERTER_COMMAND, &message, sizeof(message)); - ECU_CAN_Send_DTI(DTI_CONTROL_12_CAN_ID, &message.drive_enable, 2); + ECU_CAN_Send_DTI(DTI_CONTROL_12_CAN_ID, &message.drive_enable, 1); + message.set_ac_current = torque_request * 10; ECU_CAN_Send_DTI(DTI_CONTROL_1_CAN_ID, &message.set_ac_current, 2); last_can_inverter_request_millis = millis_since_boot; } From 5d63c9d7d756e37b067802b577f998abd2560516 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 06:22:27 -0700 Subject: [PATCH 09/85] Random tested values for throttle Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateUtils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index 215ca9ec7..ff9d427e7 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -15,10 +15,10 @@ uint32_t MillisecondsSinceBoot(void); #define BRAKE_F_MAX 4095 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MIN 0 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MAX 4095 // TODO: need to be determined FIXME: Rename better -#define THROTTLE_MIN_1 0 // TODO: need to be determined -#define THROTTLE_MAX_1 4095 // TODO: need to be determined -#define THROTTLE_MIN_2 0 // TODO: need to be determined -#define THROTTLE_MAX_2 4095 // TODO: need to be determined +#define THROTTLE_MIN_1 308 // TODO: need to be determined +#define THROTTLE_MAX_1 3689 // TODO: need to be determined +#define THROTTLE_MIN_2 303 // TODO: need to be determined +#define THROTTLE_MAX_2 3735 // TODO: need to be determined #define BSE_MAX 4096.0f #define BSE_DEADZONE 1.2f #define MAX_BSE_FAILURE_TIME 100 From 0b7fc64e1cde67ea46793994a5018b80e9975bc2 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 17:16:12 +0000 Subject: [PATCH 10/85] Automatic Clang-Format: Standardized formatting automatically --- ECU/Application/Inc/StateUtils.h | 4 ++-- ECU/Application/Src/StateTicks.c | 4 ++-- ECU/Test/Src/can.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index ff9d427e7..05756d270 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -15,9 +15,9 @@ uint32_t MillisecondsSinceBoot(void); #define BRAKE_F_MAX 4095 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MIN 0 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MAX 4095 // TODO: need to be determined FIXME: Rename better -#define THROTTLE_MIN_1 308 // TODO: need to be determined +#define THROTTLE_MIN_1 308 // TODO: need to be determined #define THROTTLE_MAX_1 3689 // TODO: need to be determined -#define THROTTLE_MIN_2 303 // TODO: need to be determined +#define THROTTLE_MIN_2 303 // TODO: need to be determined #define THROTTLE_MAX_2 3735 // TODO: need to be determined #define BSE_MAX 4096.0f #define BSE_DEADZONE 1.2f diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 559f23bb7..f661a1d1b 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -270,8 +270,8 @@ void ECU_Drive_Active(ECU_StateData *stateData) .brakeline_r_signal = stateData->Brake_R_Signal, .steering_angle_signal = stateData->steering_angle_signal, .aux_signal = stateData->aux_signal}; - UNUSED(message); // FIXME Eventually figure out what to do with this message here - ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, 10); // FIXME + UNUSED(message); // FIXME Eventually figure out what to do with this message here + ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, 10); // FIXME last_can_tcm_request_millis = millis_since_boot; } } diff --git a/ECU/Test/Src/can.c b/ECU/Test/Src/can.c index d8756c259..e6154a08f 100644 --- a/ECU/Test/Src/can.c +++ b/ECU/Test/Src/can.c @@ -1,6 +1,7 @@ -#include "Unused.h" #include "can.h" +#include "Unused.h" + int can_start(CANHandle *handle) { UNUSED(handle); From de6494772ce6ff5480b32992638fccb26729b333 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 10:25:54 -0700 Subject: [PATCH 11/85] Switch to custom bytes to CAN DLC function for hootl test Signed-off-by: Daniel Hansen --- ECU/Application/Src/CANutils.c | 24 +----------------------- ECU/Test/Inc/can.h | 11 ++++++----- ECU/Test/Src/can.c | 6 ++++++ Lib/Peripherals/TimedCAN/Inc/can.h | 1 + Lib/Peripherals/TimedCAN/Src/can.c | 24 ++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 28 deletions(-) diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 04cc29398..d5e11c199 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -28,34 +28,12 @@ void ECU_CAN_Send(GRCAN_BUS_ID bus, GRCAN_NODE_ID destNode, GRCAN_MSG_ID message uint32_t ID = ((0xFF & GRCAN_ECU) << 20) | ((0xFFF & messageID) << 8) | (0xFF & destNode); - uint8_t dlc = 0; - if (size <= 8) { - dlc = size; - } else if (size <= 12) { - dlc = 9; - } else if (size <= 16) { - dlc = 10; - } else if (size <= 20) { - dlc = 11; - } else if (size <= 24) { - dlc = 12; - } else if (size <= 32) { - dlc = 13; - } else if (size <= 48) { - dlc = 14; - } else if (size <= 64) { - dlc = 15; - } else { - dlc = FDCAN_MAX_DATA_BYTES; // should never happen due to earlier check - LOGOMATIC("Invalid CAN data size after check: %ld\n", size); - } - FDCAN_TxHeaderTypeDef header = { .Identifier = ID, .IdType = FDCAN_EXTENDED_ID, .TxFrameType = FDCAN_DATA_FRAME, .ErrorStateIndicator = FDCAN_ESI_ACTIVE, - .DataLength = dlc, + .DataLength = BytesToCANDLC(size), .BitRateSwitch = FDCAN_BRS_OFF, .TxEventFifoControl = FDCAN_NO_TX_EVENTS, .MessageMarker = 0, diff --git a/ECU/Test/Inc/can.h b/ECU/Test/Inc/can.h index cc7810816..c44fb112c 100644 --- a/ECU/Test/Inc/can.h +++ b/ECU/Test/Inc/can.h @@ -377,11 +377,12 @@ int can_stop(CANHandle *handle); int can_enqueue(CANHandle *canHandle, FDCANTxMessage *message); int can_release(CANHandle *handle); // deinit circular buffer and turn off can peripheral and gpios int can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter); -// alternatively use -// HAL_FDCAN_ConfigGlobalFilter() //important to accept nonmatching frames into -// HAL_FDCAN_ConfigFilter() +uint8_t BytesToCANDLC(uint32_t num_bytes); + // alternatively use + // HAL_FDCAN_ConfigGlobalFilter() //important to accept nonmatching frames into + // HAL_FDCAN_ConfigFilter() -// doesn't need a handle, CAN cores share peripheral clock -void can_set_clksource(uint32_t clksource); // ex. LL_RCC_FDCAN_CLKSOURCE_PCLK1 for STM32G474RE + // doesn't need a handle, CAN cores share peripheral clock + void can_set_clksource(uint32_t clksource); // ex. LL_RCC_FDCAN_CLKSOURCE_PCLK1 for STM32G474RE #endif diff --git a/ECU/Test/Src/can.c b/ECU/Test/Src/can.c index e6154a08f..712d1d776 100644 --- a/ECU/Test/Src/can.c +++ b/ECU/Test/Src/can.c @@ -33,3 +33,9 @@ int can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter) UNUSED(filter); return 0; } + +uint8_t BytesToCANDLC(uint32_t num_bytes) +{ + UNUSED(num_bytes); + return 0; +} diff --git a/Lib/Peripherals/TimedCAN/Inc/can.h b/Lib/Peripherals/TimedCAN/Inc/can.h index 71584c0dc..5c1bd5af7 100644 --- a/Lib/Peripherals/TimedCAN/Inc/can.h +++ b/Lib/Peripherals/TimedCAN/Inc/can.h @@ -92,6 +92,7 @@ CAN_STATUS can_stop(CANHandle *handle); CAN_STATUS can_release(CANHandle *handle); // deinit circular buffer and turn off can peripheral and gpios CAN_STATUS can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter); CAN_STATUS can_enqueue(CANHandle *handle, FDCANTxMessage *message); // adds to software buffer, returns error if full +uint8_t BytesToCANDLC(uint32_t num_bytes); // pass in a buffer to store the status string // int can_info(char* ); diff --git a/Lib/Peripherals/TimedCAN/Src/can.c b/Lib/Peripherals/TimedCAN/Src/can.c index a7a1bfaf1..34e31deed 100644 --- a/Lib/Peripherals/TimedCAN/Src/can.c +++ b/Lib/Peripherals/TimedCAN/Src/can.c @@ -420,6 +420,30 @@ void can_tx_dequeue_helper(CANHandle *handle) dwt_timer_t send_timer = {0}; #endif +uint8_t BytesToCANDLC(uint32_t num_bytes) +{ + if (num_bytes <= 8) { + return num_bytes; + } else if (num_bytes <= 12) { + return FDCAN_DLC_BYTES_12; + } else if (num_bytes <= 16) { + return FDCAN_DLC_BYTES_16; + } else if (num_bytes <= 20) { + return FDCAN_DLC_BYTES_20; + } else if (num_bytes <= 24) { + return FDCAN_DLC_BYTES_24; + } else if (num_bytes <= 32) { + return FDCAN_DLC_BYTES_32; + } else if (num_bytes <= 48) { + return FDCAN_DLC_BYTES_48; + } else if (num_bytes <= 64) { + return FDCAN_DLC_BYTES_64; + } else { // Should never happen + return FDCAN_DLC_BYTES_0; + LOGOMATIC("Invalid CAN data size after check: %ld\n", num_bytes); + } +} + CAN_STATUS can_enqueue(CANHandle *canHandle, FDCANTxMessage *message) { From 3a1c3904267f9ef2c195e5bc799802d922e4949a Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 14:12:36 -0700 Subject: [PATCH 12/85] Allegedly fix rtd button press latch Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index f661a1d1b..74c5e9708 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -179,6 +179,9 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) ECU_Transition_To_Drive_Active(stateData); stateData->rtd_button_pressed = false; return; + } else { + // Demand that we only transition to drive active if the RTD button is pressed while pressing the brake. + stateData->rtd_button_pressed = false; } } From a2a6beeeb62d5b3cfde6afc65d892a339a8a08ae Mon Sep 17 00:00:00 2001 From: kzwicker Date: Wed, 13 May 2026 15:17:42 -0700 Subject: [PATCH 13/85] Read and reset the variable set by the button read interrupt exactly once to prevent footguns and race conditions (#477) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …y once and reset in exactly one place that always executes # ## Problem and Scope ## Description ## Gotchas and Limitations ## Testing - [x] HOOTL testing - [ ] HITL testing - [ ] Human tested ### Testing Details ## Larger Impact ## Additional Context and Ticket --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- ECU/Application/Inc/StateData.h | 2 ++ ECU/Application/Src/CANdler.c | 10 ++++------ ECU/Application/Src/StateTicks.c | 23 ++++++++++++++--------- ECU/Test/Inc/can.h | 10 +++++----- ECU/Test/Src/StateTicksTest.c | 28 +++++++++++++++++++++------- Lib/Peripherals/TimedCAN/Src/can.c | 2 +- 6 files changed, 47 insertions(+), 28 deletions(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 27fc53c48..47b3cd03a 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -87,7 +87,9 @@ typedef volatile struct ECU_StateData { uint8_t glv_soc; uint8_t acu_error_warning_bits; uint8_t inverter_fault_map; + bool ts_active_button_press_interrupt; bool ts_active_button_pressed; + bool rtd_button_press_interrupt; bool rtd_button_pressed; bool ir_plus; bool ir_minus; diff --git a/ECU/Application/Src/CANdler.c b/ECU/Application/Src/CANdler.c index db0354b09..30ff94704 100644 --- a/ECU/Application/Src/CANdler.c +++ b/ECU/Application/Src/CANdler.c @@ -110,17 +110,15 @@ void ECU_CAN_MessageHandler(ECU_StateData *state_data, GRCAN_BUS_ID bus_id, GRCA // LET IT BE KNOWN: these things are LSB FIRST, TODO: I'll get it right later if (state_data->ecu_state == GR_GLV_ON) { - state_data->ts_active_button_pressed = dash_data->button_flags & 1; + state_data->ts_active_button_press_interrupt = dash_data->button_flags & 1; } else { - state_data->ts_active_button_pressed = (dash_data->button_flags >> 2) & 1; + state_data->ts_active_button_press_interrupt = (dash_data->button_flags >> 2) & 1; } if (state_data->ecu_state == GR_PRECHARGE_COMPLETE) { - state_data->rtd_button_pressed = (dash_data->button_flags >> 1) & 1; + state_data->rtd_button_press_interrupt = (dash_data->button_flags >> 1) & 1; } else if (state_data->ecu_state == GR_DRIVE_ACTIVE) { - state_data->rtd_button_pressed = (dash_data->button_flags >> 3) & 1; - } else { - state_data->rtd_button_pressed = false; + state_data->rtd_button_press_interrupt = (dash_data->button_flags >> 3) & 1; } break; diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 74c5e9708..fa23465de 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -60,6 +60,20 @@ void ECU_State_Tick(void) // bmsFailure(&stateLump) || imdFailure(&stateLump); + if (stateLump.ts_active_button_press_interrupt) { + stateLump.ts_active_button_press_interrupt = false; + stateLump.ts_active_button_pressed = true; + } else { + stateLump.ts_active_button_pressed = false; + } + + if (stateLump.rtd_button_press_interrupt) { + stateLump.rtd_button_press_interrupt = false; + stateLump.rtd_button_pressed = true; + } else { + stateLump.rtd_button_pressed = false; + } + switch (stateLump.ecu_state) { case GR_GLV_OFF: ECU_GLV_Off(&stateLump); @@ -106,7 +120,6 @@ void ECU_GLV_On(ECU_StateData *stateData) if (stateData->ts_active_button_pressed /* && stateData->ir_plus*/) { // TODO: Talk to Owen if this is correct for precharge start confirmation LOGOMATIC("GLV ON to PRECHARGE START!\n"); ECU_Transition_To_Precharge_Engaged(stateData); - stateData->ts_active_button_pressed = false; return; } } @@ -142,7 +155,6 @@ void ECU_Precharge_Engaged(ECU_StateData *stateData) LOGOMATIC("ERROR: ts_active PRESSED! PRECHARGE ENGAGED to TS DISCHARGE START!\n"); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Debugger, GRCAN_DEBUG_2_0, "TS-P-ITR", 8); ECU_Transition_To_Tractive_System_Discharge(stateData); - stateData->ts_active_button_pressed = false; return; } } @@ -153,7 +165,6 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) if (stateData->ts_active_button_pressed) { LOGOMATIC("TS Active Toggled Off. Discharging Tractive System.\n"); ECU_Transition_To_Tractive_System_Discharge(stateData); - stateData->ts_active_button_pressed = false; return; } if (CriticalError(stateData)) { @@ -177,11 +188,7 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &pedals_message, sizeof(pedals_message)); LOGOMATIC("PRECHARGE COMPLETE to DRIVE START/ACTIVE!\n"); ECU_Transition_To_Drive_Active(stateData); - stateData->rtd_button_pressed = false; return; - } else { - // Demand that we only transition to drive active if the RTD button is pressed while pressing the brake. - stateData->rtd_button_pressed = false; } } @@ -205,7 +212,6 @@ void ECU_Drive_Active(ECU_StateData *stateData) LOGOMATIC("Error: TS active button pressed in Drive Active state. Discharging Tractive System.\n"); ECU_Transition_To_Tractive_System_Discharge(stateData); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Debugger, GRCAN_DEBUG_2_0, "DA-CritE", 8); - stateData->ts_active_button_pressed = false; return; } @@ -221,7 +227,6 @@ void ECU_Drive_Active(ECU_StateData *stateData) if (vehicle_is_moving(stateData)) { LOGOMATIC("Warning: Vehicle is moving during state transition.\n"); } - stateData->rtd_button_pressed = false; return; } diff --git a/ECU/Test/Inc/can.h b/ECU/Test/Inc/can.h index c44fb112c..0a3ebf422 100644 --- a/ECU/Test/Inc/can.h +++ b/ECU/Test/Inc/can.h @@ -378,11 +378,11 @@ int can_enqueue(CANHandle *canHandle, FDCANTxMessage *message); int can_release(CANHandle *handle); // deinit circular buffer and turn off can peripheral and gpios int can_add_filter(CANHandle *handle, FDCAN_FilterTypeDef *filter); uint8_t BytesToCANDLC(uint32_t num_bytes); - // alternatively use - // HAL_FDCAN_ConfigGlobalFilter() //important to accept nonmatching frames into - // HAL_FDCAN_ConfigFilter() +// alternatively use +// HAL_FDCAN_ConfigGlobalFilter() //important to accept nonmatching frames into +// HAL_FDCAN_ConfigFilter() - // doesn't need a handle, CAN cores share peripheral clock - void can_set_clksource(uint32_t clksource); // ex. LL_RCC_FDCAN_CLKSOURCE_PCLK1 for STM32G474RE +// doesn't need a handle, CAN cores share peripheral clock +void can_set_clksource(uint32_t clksource); // ex. LL_RCC_FDCAN_CLKSOURCE_PCLK1 for STM32G474RE #endif diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index df18705da..84126ad0d 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -36,6 +36,20 @@ static void ECU_Pseudo_State_Tick(ECU_StateData *stateLumpTest) LOGOMATIC("TSSI: TS Normal\n"); } + if (stateLumpTest->ts_active_button_press_interrupt) { + stateLumpTest->ts_active_button_press_interrupt = false; + stateLumpTest->ts_active_button_pressed = true; + } else { + stateLumpTest->ts_active_button_pressed = false; + } + + if (stateLumpTest->rtd_button_press_interrupt) { + stateLumpTest->rtd_button_press_interrupt = false; + stateLumpTest->rtd_button_pressed = true; + } else { + stateLumpTest->rtd_button_pressed = false; + } + switch (stateLumpTest->ecu_state) { case GR_GLV_OFF: ECU_GLV_Off(stateLumpTest); @@ -80,7 +94,7 @@ int main(void) // ## Step 0.1 ## // ########################## LOGOMATIC("Press and release RTD -> STAY IN GLV ON\n"); - stateLumpTest.rtd_button_pressed = true; + stateLumpTest.rtd_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { LOGOMATIC("0.1 Failure: ecu state not in GLV ON\n"); @@ -137,7 +151,7 @@ int main(void) // ## Step 0.3 ## // ########################## LOGOMATIC("Press TS ACTIVE: Go to PRECHARGE ENGAGE\n"); - stateLumpTest.ts_active_button_pressed = true; + stateLumpTest.ts_active_button_press_interrupt = true; stateLumpTest.ir_minus = true; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_ENGAGED) { @@ -177,7 +191,7 @@ int main(void) // ## Step 0.6 ## // ########################## LOGOMATIC("Press RTD -> STAY IN PRECHARGE COMPLETE\n"); - stateLumpTest.rtd_button_pressed = true; + stateLumpTest.rtd_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_COMPLETE) { LOGOMATIC("0.6 Failure: ecu state not in precharge complete\n"); @@ -188,7 +202,7 @@ int main(void) return 6; } LOGOMATIC("Release RTD -> STAY IN PRECHARGE COMPLETE\n"); - stateLumpTest.rtd_button_pressed = false; + stateLumpTest.rtd_button_press_interrupt = false; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_COMPLETE) { LOGOMATIC("0.6 Failure: ecu state not in precharge complete\n"); @@ -205,7 +219,7 @@ int main(void) LOGOMATIC("Press and release the RTD button WHILE pressing the brake\n"); stateLumpTest.bse_signal = BSE_MAX; LOGOMATIC("Press RTD\n"); - stateLumpTest.rtd_button_pressed = true; + stateLumpTest.rtd_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); LOGOMATIC("Release RTD\n"); ECU_Pseudo_State_Tick(&stateLumpTest); @@ -335,7 +349,7 @@ int main(void) // ## Step 0.15 ## // ########################## LOGOMATIC("Press RTD -> MOVE TO PRECHARGE COMPLETE\n"); - stateLumpTest.rtd_button_pressed = !stateLumpTest.rtd_button_pressed; + stateLumpTest.rtd_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_COMPLETE) { LOGOMATIC("0.15 Failure: ecu state not in precharge complete\n"); @@ -392,7 +406,7 @@ int main(void) // ## Step 0.18 ## // ########################## LOGOMATIC("Press TS Active Button -> MOVE to TS DISCHARGE\n"); - stateLumpTest.ts_active_button_pressed = !stateLumpTest.ts_active_button_pressed; + stateLumpTest.ts_active_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_TS_DISCHARGE) { LOGOMATIC("0.18 Failure: ecu state not in ts discharge\n"); diff --git a/Lib/Peripherals/TimedCAN/Src/can.c b/Lib/Peripherals/TimedCAN/Src/can.c index 34e31deed..486b1fcf8 100644 --- a/Lib/Peripherals/TimedCAN/Src/can.c +++ b/Lib/Peripherals/TimedCAN/Src/can.c @@ -438,7 +438,7 @@ uint8_t BytesToCANDLC(uint32_t num_bytes) return FDCAN_DLC_BYTES_48; } else if (num_bytes <= 64) { return FDCAN_DLC_BYTES_64; - } else { // Should never happen + } else { // Should never happen return FDCAN_DLC_BYTES_0; LOGOMATIC("Invalid CAN data size after check: %ld\n", num_bytes); } From 4f9ad787f6279652d01f3f0fea44491a12083de5 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 15:31:34 -0700 Subject: [PATCH 14/85] Explicitly send do not torque Co-authored-by: kzwicker Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateUtils.h | 2 ++ ECU/Application/Src/StateTicks.c | 15 +++++++++++---- ECU/Application/Src/StateUtils.c | 7 +++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index 05756d270..abc0a64f6 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -54,5 +54,7 @@ float CalcAccPedalTravel(volatile const ECU_StateData *stateData); bool APPS_Plausible(volatile const ECU_StateData *stateData); bool BSE_Plausible(volatile const ECU_StateData *stateData); bool vehicle_is_moving(volatile const ECU_StateData *stateData); +/* Disable inverter for both DTI and Custom */ +void disable_inverter(void); #endif diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index fa23465de..cc38e2404 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -103,6 +103,7 @@ void ECU_State_Tick(void) void ECU_GLV_Off(ECU_StateData *stateData) { + disable_inverter(); UNUSED(stateData); LOGOMATIC("ECU_GLV_Off state reached... this should never happen!\n"); // TODO ERROR --> GLV_OFF should never be reached @@ -110,6 +111,8 @@ void ECU_GLV_Off(ECU_StateData *stateData) void ECU_GLV_On(ECU_StateData *stateData) { + disable_inverter(); + if (stateData->ts_voltage >= SAFE_VOLTAGE_LIMIT) { LOGOMATIC("Error: TS Voltage >= %d!\n", SAFE_VOLTAGE_LIMIT); ECU_Transition_To_Tractive_System_Discharge(stateData); @@ -139,6 +142,8 @@ void ECU_Transition_To_Precharge_Engaged(ECU_StateData *stateData) void ECU_Precharge_Engaged(ECU_StateData *stateData) { + disable_inverter(); + if (stateData->ir_plus) { stateData->ecu_state = GR_PRECHARGE_COMPLETE; LOGOMATIC("PRECHARGE ENGAGED to PRECHARGE COMPLETE!\n"); @@ -162,6 +167,8 @@ void ECU_Precharge_Engaged(ECU_StateData *stateData) // TODO: change for CAN button messenging void ECU_Precharge_Complete(ECU_StateData *stateData) { + disable_inverter(); + if (stateData->ts_active_button_pressed) { LOGOMATIC("TS Active Toggled Off. Discharging Tractive System.\n"); ECU_Transition_To_Tractive_System_Discharge(stateData); @@ -188,7 +195,6 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &pedals_message, sizeof(pedals_message)); LOGOMATIC("PRECHARGE COMPLETE to DRIVE START/ACTIVE!\n"); ECU_Transition_To_Drive_Active(stateData); - return; } } @@ -291,11 +297,12 @@ void ECU_Transition_To_Tractive_System_Discharge(ECU_StateData *stateData) LOGOMATIC("ECU: ACU discharge Tractive System\n"); GRCAN_ACU_PRECHARGE_MSG message = {.set_ts_active = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ACU, GRCAN_ACU_PRECHARGE, &message, sizeof(message)); - discharge_start_millis = millis_since_boot; -} + discharge_start_millis = millis_since_boot;} void ECU_Tractive_System_Discharge(ECU_StateData *stateData) { + disable_inverter(); + /* Discharge the tractive system to below 60(SAFE_VOLTAGE_LIMIT) volts */ @@ -321,4 +328,4 @@ void ECU_Tractive_System_Discharge(ECU_StateData *stateData) ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ACU, GRCAN_ACU_PRECHARGE, &message, sizeof(message)); last_discharge_request_millis = millis_since_boot; } -} // init +} diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 53b5140a5..f4b929164 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -144,3 +144,10 @@ void SendEcuBonusInfo(const ECU_StateData *stateData) // RTT ping data // TODO Setup using data from Pinging.c per Andrey request } + +void disable_inverter(void) +{ + GRCAN_INVERTER_COMMAND_MSG inverter_msg = {.drive_enable = 0, .field_weakening = 0, .rpm_limit = 0, .set_ac_current = 0, .set_dc_current = 0}; + ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inverter, GRCAN_INVERTER_COMMAND, &inverter_msg, sizeof(inverter_msg)); + ECU_CAN_Send_DTI(DTI_CONTROL_12_CAN_ID, &inverter_msg.drive_enable, 1); +} From 55ea9e2d624791fa59f746882acf6f3b10be168b Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 16:18:35 -0700 Subject: [PATCH 15/85] Driving check? Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateUtils.h | 8 ++++---- ECU/Application/Src/StateUtils.c | 7 +++++++ ECU/Core/Src/main.c | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index abc0a64f6..cd1798501 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -15,10 +15,10 @@ uint32_t MillisecondsSinceBoot(void); #define BRAKE_F_MAX 4095 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MIN 0 // TODO: need to be determined FIXME: Rename better #define BRAKE_R_MAX 4095 // TODO: need to be determined FIXME: Rename better -#define THROTTLE_MIN_1 308 // TODO: need to be determined -#define THROTTLE_MAX_1 3689 // TODO: need to be determined -#define THROTTLE_MIN_2 303 // TODO: need to be determined -#define THROTTLE_MAX_2 3735 // TODO: need to be determined +#define THROTTLE_MIN_1 306 // TODO: need to be determined +#define THROTTLE_MAX_1 3704 // TODO: need to be determined +#define THROTTLE_MIN_2 336 // TODO: need to be determined +#define THROTTLE_MAX_2 3794 // TODO: need to be determined #define BSE_MAX 4096.0f #define BSE_DEADZONE 1.2f #define MAX_BSE_FAILURE_TIME 100 diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index f4b929164..79e7dba5d 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -78,6 +78,7 @@ bool bspdFailure(volatile const ECU_StateData *stateData) bool APPS_BSE_Violation(volatile const ECU_StateData *stateData) { + return false; // Checks 2 * APPS_1 is within 10% of APPS_2 and break + throttle at the same time return PressingBrake(stateData) && CalcAccPedalTravel(stateData) >= 0.25f; } @@ -90,12 +91,18 @@ bool PressingBrake(volatile const ECU_StateData *stateData) // bool brakeFpress = stateData->Brake_F_Signal - BRAKE_F_MIN > BSE_DEADZONE * brakeRangeF; // bool brakeRpress = stateData->Brake_R_Signal - BRAKE_R_MIN > BSE_DEADZONE * brakeRangeR; // return brakeFpress || brakeRpress; + if (stateData->ecu_state < GR_DRIVE_ACTIVE) { + return true; // don't consider brake pressed until in drive active + } else { + return false; + } return ((stateData->bse_signal) / BSE_MAX * 3.3f) > BSE_DEADZONE; // Ideally TCM receives values of 0 after this is no longer called xD. } float CalcBrakePercent(volatile const ECU_StateData *stateData) { + return 0; return stateData->bse_signal / BSE_MAX; } diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 66c567d5e..ae33da04e 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -424,6 +424,23 @@ int main(void) } lightControl(&stateLump); } + static uint16_t min_apps_1 = 4095; + static uint16_t min_apps_2 = 4095; + if (stateLump.APPS1_Signal < min_apps_1) { + min_apps_1 = stateLump.APPS1_Signal; + } + if (stateLump.APPS2_Signal < min_apps_2) { + min_apps_2 = stateLump.APPS2_Signal; + } + static uint16_t max_apps_1 = 0; + static uint16_t max_apps_2 = 0; + if (stateLump.APPS1_Signal > max_apps_1) { + max_apps_1 = stateLump.APPS1_Signal; + } + if (stateLump.APPS2_Signal > max_apps_2) { + max_apps_2 = stateLump.APPS2_Signal; + } + LOGOMATIC("APPS 1 %d, APPS 2 %d | Min: %d, %d | Max: %d, %d\n", stateLump.APPS1_Signal, stateLump.APPS2_Signal, min_apps_1, min_apps_2, max_apps_1, max_apps_2); } /* USER CODE END 3 */ } From 42392ff42eb59054bd49351a95983b62e6a3c122 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 16:33:32 -0700 Subject: [PATCH 16/85] ADC alpha is useless if not rate limited Signed-off-by: Daniel Hansen --- ECU/Core/Src/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index ae33da04e..75165f5a8 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -404,15 +404,16 @@ int main(void) while (1) { // adcs read_digital(); - ADC_UpdateAnalogValues_EMA(ADC_buffers, NUM_SIGNALS, 0.2, ADC_outputs); - write_adc_values_to_state_data(); - // main state lopp, queues can messages within it static uint32_t delay_timer; static uint32_t ping_timer; if (MillisecondsSinceBoot() >= delay_timer) { delay_timer = MillisecondsSinceBoot() + (MAIN_LOOP_PERIOD_US / 1000); + // ADC + ADC_UpdateAnalogValues_EMA(ADC_buffers, NUM_SIGNALS, 0.2, ADC_outputs); + write_adc_values_to_state_data(); + // state tick ECU_State_Tick(); From 3e558c0aa7931d14ad0979b3810779be675c7e15 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 21:00:30 -0700 Subject: [PATCH 17/85] Remove sketchy APPS debug logic Signed-off-by: Daniel Hansen --- ECU/Core/Src/main.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 75165f5a8..60f479a1c 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -425,23 +425,6 @@ int main(void) } lightControl(&stateLump); } - static uint16_t min_apps_1 = 4095; - static uint16_t min_apps_2 = 4095; - if (stateLump.APPS1_Signal < min_apps_1) { - min_apps_1 = stateLump.APPS1_Signal; - } - if (stateLump.APPS2_Signal < min_apps_2) { - min_apps_2 = stateLump.APPS2_Signal; - } - static uint16_t max_apps_1 = 0; - static uint16_t max_apps_2 = 0; - if (stateLump.APPS1_Signal > max_apps_1) { - max_apps_1 = stateLump.APPS1_Signal; - } - if (stateLump.APPS2_Signal > max_apps_2) { - max_apps_2 = stateLump.APPS2_Signal; - } - LOGOMATIC("APPS 1 %d, APPS 2 %d | Min: %d, %d | Max: %d, %d\n", stateLump.APPS1_Signal, stateLump.APPS2_Signal, min_apps_1, min_apps_2, max_apps_1, max_apps_2); } /* USER CODE END 3 */ } From 3e01c8540a0ec8b5f3c6de98979342084ead4ca6 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Wed, 13 May 2026 21:02:30 -0700 Subject: [PATCH 18/85] Migrate analog data message out of state ticks to be something always sent Signed-off-by: Daniel Hansen --- ECU/Application/Inc/CANutils.h | 1 + ECU/Application/Src/CANutils.c | 22 ++++++++++++++++++++-- ECU/Application/Src/StateTicks.c | 30 ++---------------------------- ECU/Core/Src/main.c | 1 + 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/ECU/Application/Inc/CANutils.h b/ECU/Application/Inc/CANutils.h index 505f65f63..b29172ef9 100644 --- a/ECU/Application/Inc/CANutils.h +++ b/ECU/Application/Inc/CANutils.h @@ -13,5 +13,6 @@ void ECU_CAN_Send(GRCAN_BUS_ID bus, GRCAN_NODE_ID destNode, GRCAN_MSG_ID messageID, void *data, uint32_t size); void ECU_CAN_Send_DTI(GRCAN_CUSTOM_ID msgID, void *data, uint32_t size); void SendECUStateDataOverCAN(ECU_StateData *stateData); +void SendECUAnalogDataOverCAN(ECU_StateData *stateData); #endif diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index d5e11c199..12ff59eba 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -119,9 +119,27 @@ void SendECUStateDataOverCAN(ECU_StateData *stateData) .RRWheelRPM = (uint16_t)(stateData->rr_wheel_rpm * 10 + 32768), .RLWheelRPM = (uint16_t)(stateData->rl_wheel_rpm * 10 + 32768)}; - // LOGOMATIC("Sending ECU State Data over CAN\n"); - ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_1, (void *)&messages.ECUStatusMsgOne, sizeof(messages.ECUStatusMsgOne)); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_2, (void *)&messages.ECUStatusMsgTwo, sizeof(messages.ECUStatusMsgTwo)); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_3, (void *)&messages.ECUStatusMsgThree, sizeof(messages.ECUStatusMsgThree)); } + +void SendECUAnalogDataOverCAN(ECU_StateData *stateData) +{ + uint32_t millis_since_boot = MillisecondsSinceBoot(); + + static uint32_t last_can_tcm_request_millis = 0; + + if (millis_since_boot - last_can_tcm_request_millis > 100) { + GRCAN_ECU_ANALOG_DATA_MSG message = {.bspd_signal = stateData->bspd_signal, + .bse_signal = stateData->bse_signal, + .apps_1_signal = stateData->APPS1_Signal, + .apps_2_signal = stateData->APPS2_Signal, + .brakeline_f_signal = stateData->Brake_F_Signal, + .brakeline_r_signal = stateData->Brake_R_Signal, + .steering_angle_signal = stateData->steering_angle_signal, + .aux_signal = stateData->aux_signal}; + ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, sizeof(message)); + last_can_tcm_request_millis = millis_since_boot; + } +} diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index cc38e2404..96a14ea89 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -184,15 +184,6 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) if (PressingBrake(stateData) && stateData->rtd_button_pressed) { GRCAN_INVERTER_CONFIG_MSG inverter_message = {.max_ac_current = 0xFFFF, .max_dc_current = 0xFFFF, .absolute_max_rpm_limit = 0xFFFF, .motor_direction = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inverter, GRCAN_INVERTER_CONFIG, &inverter_message, sizeof(inverter_message)); - GRCAN_ECU_ANALOG_DATA_MSG pedals_message = {.bspd_signal = stateData->bspd_signal, - .bse_signal = stateData->bse_signal, - .apps_1_signal = stateData->APPS1_Signal, - .apps_2_signal = stateData->APPS2_Signal, - .brakeline_f_signal = stateData->Brake_F_Signal, - .brakeline_r_signal = stateData->Brake_R_Signal, - .steering_angle_signal = stateData->steering_angle_signal, - .aux_signal = stateData->aux_signal}; - ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &pedals_message, sizeof(pedals_message)); LOGOMATIC("PRECHARGE COMPLETE to DRIVE START/ACTIVE!\n"); ECU_Transition_To_Drive_Active(stateData); } @@ -270,24 +261,6 @@ void ECU_Drive_Active(ECU_StateData *stateData) ECU_CAN_Send_DTI(DTI_CONTROL_1_CAN_ID, &message.set_ac_current, 2); last_can_inverter_request_millis = millis_since_boot; } - - // placeholder for pedal data - // TODO: determine send time (15, 20 ms?) - - static uint32_t last_can_tcm_request_millis = 0; - if (RATE_LIMIT_100_HZ(millis_since_boot, last_can_tcm_request_millis)) { - GRCAN_ECU_ANALOG_DATA_MSG message = {.bspd_signal = stateData->bspd_signal, - .bse_signal = stateData->bse_signal, - .apps_1_signal = stateData->APPS1_Signal, - .apps_2_signal = stateData->APPS2_Signal, - .brakeline_f_signal = stateData->Brake_F_Signal, - .brakeline_r_signal = stateData->Brake_R_Signal, - .steering_angle_signal = stateData->steering_angle_signal, - .aux_signal = stateData->aux_signal}; - UNUSED(message); // FIXME Eventually figure out what to do with this message here - ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, 10); // FIXME - last_can_tcm_request_millis = millis_since_boot; - } } static uint32_t discharge_start_millis; @@ -297,7 +270,8 @@ void ECU_Transition_To_Tractive_System_Discharge(ECU_StateData *stateData) LOGOMATIC("ECU: ACU discharge Tractive System\n"); GRCAN_ACU_PRECHARGE_MSG message = {.set_ts_active = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ACU, GRCAN_ACU_PRECHARGE, &message, sizeof(message)); - discharge_start_millis = millis_since_boot;} + discharge_start_millis = millis_since_boot; +} void ECU_Tractive_System_Discharge(ECU_StateData *stateData) { diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 60f479a1c..70ae68f58 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -419,6 +419,7 @@ int main(void) // preipheral updates SendECUStateDataOverCAN(&stateLump); + SendECUAnalogDataOverCAN(&stateLump); if (MillisecondsSinceBoot() >= ping_timer) { ping_timer = MillisecondsSinceBoot() + (MAIN_LOOP_PERIOD_US / 500); // half period pingAll(); From 32f2d3083ce025c3ed2767a264c3e9f06cf1576a Mon Sep 17 00:00:00 2001 From: Thomas Xu Date: Thu, 14 May 2026 20:54:53 -0700 Subject: [PATCH 19/85] added a scary FIXME for the code causing HOOTLTest failures --- ECU/Application/Src/StateUtils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 79e7dba5d..2162eb661 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -91,6 +91,7 @@ bool PressingBrake(volatile const ECU_StateData *stateData) // bool brakeFpress = stateData->Brake_F_Signal - BRAKE_F_MIN > BSE_DEADZONE * brakeRangeF; // bool brakeRpress = stateData->Brake_R_Signal - BRAKE_R_MIN > BSE_DEADZONE * brakeRangeR; // return brakeFpress || brakeRpress; + // FIXME: DELETE THE FOLLOWING CONTROL BLOCK FOR BRAKE TESTING if (stateData->ecu_state < GR_DRIVE_ACTIVE) { return true; // don't consider brake pressed until in drive active } else { From 524477e45b15c2d013636360e76c5df516a4e008 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 15 May 2026 00:21:21 -0700 Subject: [PATCH 20/85] No more DWT Signed-off-by: Daniel Hansen --- ECU/Core/Src/main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 70ae68f58..6afad717a 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -383,11 +383,6 @@ int main(void) // MX_FDCAN2_Init(); /* USER CODE BEGIN 2 */ - // Initialize DWT - CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; - DWT->CYCCNT = 0; - DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; - // Initialize CAN CAN_Configure(); From 0b52ba7783b077f43e0687c5d7a79b5a6fbda111 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 15 May 2026 02:58:39 -0700 Subject: [PATCH 21/85] Set clock div 4, oversample 64, bitshift right 6 Signed-off-by: Daniel Hansen --- ECU/Core/Src/adc.c | 2 +- ECU/Core/Src/main.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ECU/Core/Src/adc.c b/ECU/Core/Src/adc.c index bce86d3ff..ae1d230d3 100644 --- a/ECU/Core/Src/adc.c +++ b/ECU/Core/Src/adc.c @@ -121,7 +121,7 @@ void MX_ADC1_Init(void) LL_ADC_REG_Init(ADC1, &ADC_REG_InitStruct); LL_ADC_SetGainCompensation(ADC1, 0); LL_ADC_SetOverSamplingScope(ADC1, LL_ADC_OVS_DISABLE); - ADC_CommonInitStruct.CommonClock = LL_ADC_CLOCK_ASYNC_DIV256; + ADC_CommonInitStruct.CommonClock = LL_ADC_CLOCK_ASYNC_DIV4; ADC_CommonInitStruct.Multimode = LL_ADC_MULTI_INDEPENDENT; LL_ADC_CommonInit(__LL_ADC_COMMON_INSTANCE(ADC1), &ADC_CommonInitStruct); diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 6afad717a..3b06b43b2 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -153,6 +153,10 @@ void ADC_Configure(void) Init_Vals_ADC1.SamplingTimes = &s1; ADC_Init(&Init_Vals_ADC1); + // TODO Use ADC peripheral API for configuring ideally... but honestly its fine + LL_ADC_SetOverSamplingScope(ADC1, LL_ADC_OVS_GRP_REGULAR_CONTINUED); + LL_ADC_ConfigOverSamplingRatioShift(ADC1, LL_ADC_OVS_RATIO_64, LL_ADC_OVS_SHIFT_RIGHT_6); + // ADC 2 ADC_Init_Values Init_Vals_ADC2 = {0}; Init_Vals_ADC2.ADC = ADC2; @@ -168,6 +172,10 @@ void ADC_Configure(void) Init_Vals_ADC2.SamplingTimes = &s2; ADC_Init(&Init_Vals_ADC2); + // TODO Use ADC peripheral API for configuring ideally... but honestly its fine + LL_ADC_SetOverSamplingScope(ADC2, LL_ADC_OVS_GRP_REGULAR_CONTINUED); + LL_ADC_ConfigOverSamplingRatioShift(ADC2, LL_ADC_OVS_RATIO_64, LL_ADC_OVS_SHIFT_RIGHT_6); + /* // Initialize DMA (ADC1 = CHANNEL 1, ADC2 = CHANNEL 2) // DMA reads into buffer From 76afff777df84c0369dd44e02f797a0c352eb330 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 15 May 2026 03:20:18 -0700 Subject: [PATCH 22/85] Cycle adc init values into real values while in hot loop waiting for boot anyway Signed-off-by: Daniel Hansen --- ECU/Core/Src/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 3b06b43b2..614b570c9 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -398,7 +398,13 @@ int main(void) LOGOMATIC("Boot completed at %lu ms\n", MillisecondsSinceBoot()); - HAL_Delay(5000); // Notes per Andrey and Ryan + while (MillisecondsSinceBoot() < 5000) { // Notes per Andrey and Ryan + LL_mDelay(MAIN_LOOP_PERIOD_US / 1000); + ADC_UpdateAnalogValues_EMA(ADC_buffers, NUM_SIGNALS, 0.2, ADC_outputs); + write_adc_values_to_state_data(); + } + + LOGOMATIC("Initial ADC readings stabilized at %lu ms\n", MillisecondsSinceBoot()); /* USER CODE END 2 */ @@ -430,7 +436,7 @@ int main(void) lightControl(&stateLump); } } - /* USER CODE END 3 */ +/* USER CODE END 3 */ } /** From 928b3dc7f22c520eb6b3316f7eb0a13bedf042a1 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sun, 17 May 2026 22:59:12 -0700 Subject: [PATCH 23/85] Grab 20V level from ACU --- ECU/Application/Inc/StateData.h | 5 ++--- ECU/Application/Src/CANdler.c | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 47b3cd03a..722b33645 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -54,6 +54,7 @@ typedef volatile struct ECU_StateData { float min_amk_heat_cap_throttle_percent; float ts_voltage; + float glv_voltage_20V; float max_cell_temp_c; /** Temperature of hottest cell, celsius */ float vehicle_speed_mph; /** Vehicle speed, MPH */ @@ -62,9 +63,7 @@ typedef volatile struct ECU_StateData { float rr_wheel_rpm; /** RRv wheel, RPM */ float rl_wheel_rpm; /** RL wheel, RPM */ - // 0.5V when things go to shit (X_OK low) (BAD) - // 3V when things almost poggers (X_OK high but SDC not reset) (BAD) - // 2.4V when things are actually poggers (X_OK high and SDC is not triggered) + float ams_sense; float imd_sense; float bspd_sense; diff --git a/ECU/Application/Src/CANdler.c b/ECU/Application/Src/CANdler.c index 30ff94704..a28821a69 100644 --- a/ECU/Application/Src/CANdler.c +++ b/ECU/Application/Src/CANdler.c @@ -80,6 +80,7 @@ void ECU_CAN_MessageHandler(ECU_StateData *state_data, GRCAN_BUS_ID bus_id, GRCA state_data->ir_minus = GETBIT(acu_status_2->precharge_latch_flags, 4); state_data->ir_plus = GETBIT(acu_status_2->precharge_latch_flags, 5); state_data->acu_software_latch = GETBIT(acu_status_2->precharge_latch_flags, 6); + state_data->glv_voltage_20V = acu_status_2->_20v_voltage * 0.1f; break; case GRCAN_INVERTER_STATUS_1: From 383b2755fa3f7a8824ed0236261c5a8692057884 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sun, 17 May 2026 23:34:26 -0700 Subject: [PATCH 24/85] consolidate comparisons of ams bms bspd sense lines to one function --- ECU/Application/Inc/StateUtils.h | 9 +++++++ ECU/Application/Src/StateTicks.c | 7 ++++-- ECU/Application/Src/StateUtils.c | 42 +++++++++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index cd1798501..af185c58a 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -42,8 +42,17 @@ uint32_t MillisecondsSinceBoot(void); #define RATE_LIMIT_100_HZ(x, y) (x - y > 10) #define RATE_LIMIT_10_HZ(x, y) (x - y > 100) +typedef enum { + SDC_OK, + SDC_ONGOING_FAILURE, + SDC_LATCHED_FAILURE +} SDC_Level; + // Checks stateData for critical errors bool CriticalError(volatile const ECU_StateData *stateData); +SDC_Level bmsLevel(volatile const ECU_StateData *stateData); +SDC_Level imdLevel(volatile const ECU_StateData *stateData); +SDC_Level bspdLevel(volatile const ECU_StateData *stateData); bool bmsFailure(volatile const ECU_StateData *stateData); bool imdFailure(volatile const ECU_StateData *stateData); bool bspdFailure(volatile const ECU_StateData *stateData); diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 96a14ea89..827f27fd6 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -53,8 +53,11 @@ void ECU_State_Tick(void) // stateLump.bms_light &= (bmsFailure(&stateLump)); // stateLump.imd_light &= (imdFailure(&stateLump)); - stateLump.bms_light = (stateLump.ams_sense <= 0.5f) || (stateLump.bms_light && bmsFailure(&stateLump)); - stateLump.imd_light = (stateLump.ams_sense <= 0.5f) || (stateLump.imd_light && imdFailure(&stateLump)); + SDC_Level bms_level = bmsLevel(&stateLump); + SDC_Level imd_level = imdLevel(&stateLump); + + stateLump.bms_light = (bms_level == SDC_ONGOING_FAILURE) || (stateLump.bms_light && bmsFailure(&stateLump)); + stateLump.imd_light = (imd_level == SDC_ONGOING_FAILURE) || (stateLump.imd_light && imdFailure(&stateLump)); stateLump.tssi_fault = stateLump.bms_light || stateLump.imd_light; diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 2162eb661..bc02ba21c 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -55,9 +55,43 @@ bool CriticalError(volatile const ECU_StateData *stateData) return problem; } +SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { + // TODO: DYNAMIC LOGIC HERE + if (stateData->ams_sense < 0.5f) { + return SDC_ONGOING_FAILURE; + } else if (stateData->ams_sense > 1.6f) { + return SDC_LATCHED_FAILURE; + } + + return SDC_OK; +} + +SDC_Level imdLevel(volatile const ECU_StateData *stateData) { + // TODO: DYNAMIC LOGIC HERE + if (stateData->imd_sense < 0.5f) { + return SDC_ONGOING_FAILURE; + } else if (stateData->imd_sense > 1.6f) { + return SDC_LATCHED_FAILURE; + } + + return SDC_OK; +} + +SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { + // TODO: DYNAMIC LOGIC HERE + if (stateData->bspd_sense < 0.5f) { + return SDC_ONGOING_FAILURE; + } else if (stateData->imd_sense > 1.6f) { + return SDC_LATCHED_FAILURE; + } + + return SDC_OK; +} + bool bmsFailure(volatile const ECU_StateData *stateData) { - return stateData->ams_sense < 0.5f || stateData->ams_sense > 1.6f; // 0.5 to 1.6 is valid + SDC_Level level = bmsLevel(stateData); + return level == SDC_ONGOING_FAILURE || level == SDC_LATCHED_FAILURE; } bool imdFailure(volatile const ECU_StateData *stateData) @@ -68,12 +102,14 @@ bool imdFailure(volatile const ECU_StateData *stateData) return false; } - return stateData->imd_sense < 0.5f || stateData->imd_sense > 1.6f; // 0.5 to 1.6 is valid + SDC_Level level = imdLevel(stateData); + return level == SDC_ONGOING_FAILURE || level == SDC_LATCHED_FAILURE; } bool bspdFailure(volatile const ECU_StateData *stateData) { - return stateData->bspd_sense < 0.6f || stateData->bspd_sense > 1.35f; // possible values are 0.3, 1.2, 1.6 + SDC_Level level = bspdLevel(stateData); + return level == SDC_ONGOING_FAILURE || level == SDC_LATCHED_FAILURE; } bool APPS_BSE_Violation(volatile const ECU_StateData *stateData) From f26a0e4700ebf6829631a4df23661973dfb35247 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sun, 17 May 2026 23:44:00 -0700 Subject: [PATCH 25/85] Unfuck the bspd (does not depend on GLV 20V) --- ECU/Application/Src/StateUtils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index bc02ba21c..191f650e9 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -78,10 +78,9 @@ SDC_Level imdLevel(volatile const ECU_StateData *stateData) { } SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { - // TODO: DYNAMIC LOGIC HERE - if (stateData->bspd_sense < 0.5f) { + if (stateData->bspd_sense < 0.6f) { return SDC_ONGOING_FAILURE; - } else if (stateData->imd_sense > 1.6f) { + } else if (stateData->imd_sense > 1.35f) { return SDC_LATCHED_FAILURE; } From b1715d34f5f3ed9231c52e81826004d92fbfc3fc Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Mon, 18 May 2026 19:03:57 -0700 Subject: [PATCH 26/85] give 20v line a default value so something sensible happens on startup --- ECU/Application/Src/StateTicks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 827f27fd6..ce25bd6e3 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -25,7 +25,7 @@ * @remark Intentionally not a globally accessible variable */ -ECU_StateData stateLump = {.ecu_state = GR_GLV_ON, .acu_software_latch = 1}; +ECU_StateData stateLump = {.ecu_state = GR_GLV_ON, .acu_software_latch = 1, .glv_voltage_20V = 20.0f}; static uint32_t millis_since_boot; void ECU_State_Tick(void) From 0656b50f8bd2fc395380efb7d7c0f76ea41a4e84 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Mon, 18 May 2026 19:18:38 -0700 Subject: [PATCH 27/85] is good --- ECU/Core/Src/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 614b570c9..63dfe0044 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -123,7 +123,6 @@ void write_adc_values_to_state_data(void) stateLump.aux_signal = ADC_outputs[6]; stateLump.steering_angle_signal = ADC_outputs[10]; // TODO: convert to rad/deg...? - // TODO: determine conversion factors for all of these (uint to float) stateLump.bspd_sense = ADC_outputs[7] / 4095.0 * 3.3; stateLump.imd_sense = ADC_outputs[8] / 4095.0 * 3.3; stateLump.ams_sense = ADC_outputs[9] / 4095.0 * 3.3; From 330bbed98641ad67d7dc930fcd44ee16e4f7ad86 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Mon, 18 May 2026 20:37:19 -0700 Subject: [PATCH 28/85] double unfuck the bspd --- ECU/Application/Src/StateUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 191f650e9..ad50ce3e9 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -80,7 +80,7 @@ SDC_Level imdLevel(volatile const ECU_StateData *stateData) { SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { if (stateData->bspd_sense < 0.6f) { return SDC_ONGOING_FAILURE; - } else if (stateData->imd_sense > 1.35f) { + } else if (stateData->bspd_sense > 1.35f) { return SDC_LATCHED_FAILURE; } From 625af9736f451975ecf2e8593b306b2d1d4e5a4e Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:21:36 -0700 Subject: [PATCH 29/85] Read rtd button press on CAN in GLV On Signed-off-by: Daniel Hansen --- ECU/Application/Src/CANdler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ECU/Application/Src/CANdler.c b/ECU/Application/Src/CANdler.c index 7e9b271af..8ef9e85fc 100644 --- a/ECU/Application/Src/CANdler.c +++ b/ECU/Application/Src/CANdler.c @@ -115,7 +115,9 @@ void ECU_CAN_MessageHandler(ECU_StateData *state_data, GRCAN_BUS_ID bus_id, GRCA state_data->ts_active_button_press_interrupt = (dash_data->button_flags >> 2) & 1; } - if (state_data->ecu_state == GR_PRECHARGE_COMPLETE) { + if (state_data->ecu_state == GR_GLV_ON) { + state_data->rtd_button_press_interrupt = (dash_data->button_flags >> 1) & 1; + } else if (state_data->ecu_state == GR_PRECHARGE_COMPLETE) { state_data->rtd_button_press_interrupt = (dash_data->button_flags >> 1) & 1; } else if (state_data->ecu_state == GR_DRIVE_ACTIVE) { state_data->rtd_button_press_interrupt = (dash_data->button_flags >> 3) & 1; From e72b3e20dedfc489ee8301c91d838fde543ff7bf Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:22:05 -0700 Subject: [PATCH 30/85] Fix light blinking pattern Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 12817b010..9f77ee8c2 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -55,14 +55,14 @@ void TSActiveButtonLightControl(ECU_StateData *stateLump) void dashLights(ECU_StateData *stateLump) { - uint8_t timeState = (MillisecondsSinceBoot() >> 8) % 16; // counter from 0 to 15 that increments every 256 ms: - bool powerLevelLight = (stateLump->ecu_state == GR_GLV_ON) && (timeState == (stateLump->powerlevel + 1) * 2); // 2 Hz light: # of blinks is power level plus one + uint8_t timeState = (MillisecondsSinceBoot() >> 8) % 16; // counter from 0 to 15 that increments every 256 ms: + bool powerLevelLight = (stateLump->ecu_state == GR_GLV_ON) && (timeState < (stateLump->powerlevel + 1) * 2) && ((timeState % 2) == 0); // light control for if signal goog GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bspdFailure(stateLump) || powerLevelLight) << 2 | stateLump->imd_light << 1 | stateLump->bms_light}; // this is needed for the latch open control - message.led_latch_flags |= ((uint8_t) !(bspdFailure(stateLump) || powerLevelLight) << 5) | ((uint8_t)!stateLump->imd_light << 4) | ((uint8_t)!stateLump->bms_light << 3); + message.led_latch_flags |= ((uint8_t)!(bspdFailure(stateLump) || powerLevelLight) << 5) | ((uint8_t)!stateLump->imd_light << 4) | ((uint8_t)!stateLump->bms_light << 3); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } From 4be38f099491569c7d7709b6ef2821a9e45cd2ff Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:40:16 -0700 Subject: [PATCH 31/85] Update max current amperage per Ryan Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index 0be6ed429..fa90ac2fe 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -28,7 +28,7 @@ uint32_t MillisecondsSinceBoot(void); #define REGEN_STRENGTH 2.0f // define ratio of regen braking percent to brake pressure percent #define REGEN_MIN_SPEED_MPH 3.106856f // MPH -#define MAX_CURRENT_AMPS 250.0f // TODO: Change as appropriate +#define MAX_CURRENT_AMPS 300.0f // Determined by Ryan #define MAX_REVERSE_CURRENT_AMPS 20.0f // TODO: Change as appropriate #define MAX_PRECHARGE_TIME 8000 // in ms From 2937349e9fb9ec4f26b26c890a5d12abce47cdd0 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:40:30 -0700 Subject: [PATCH 32/85] Remove overspecifying comment on power level Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 6ac3ebe94..2e47787a4 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -83,7 +83,7 @@ typedef volatile struct ECU_StateData { uint8_t status_bits[3]; int8_t ping_block[3]; /** Node timeout status bits (1=OK, 0=Timeout) */ - uint8_t powerlevel; // 4 bits wide, currently values of 0 - 3 + uint8_t powerlevel; // 4 bits wide uint8_t torquemap; // 4 bits wide uint8_t tractivebattery_soc; From fd5ffc8916e6445567b73b3460f4e46969536e85 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:42:57 -0700 Subject: [PATCH 33/85] Clarify power level and torque maps Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 328f7c034..cb0cf6616 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -542,11 +542,11 @@ Message ID: bit_start: 32 comment: Controls the AC current limits to each of the inverters - Discrete Mapping, actual values TBD (16 possible values) + Discrete Mapping, actual current values described by the torque map data type: u4 Torque Map: bit_start: 36 - comment: The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor + comment: The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 / 100 / 150 / 200 / 250 / 275, 2 and later is tbd data type: u4 Max Cell Temp: bit_start: 40 From 7297cbdfde4c099391a3053f8be72cad6106bff9 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 00:43:24 -0700 Subject: [PATCH 34/85] Implement torque mapping Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 38 ++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 586dd056e..418d80065 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -26,7 +26,15 @@ * @remark Intentionally not a globally accessible variable */ -ECU_StateData stateLump = {.ecu_state = GR_GLV_ON, .acu_software_latch = 1, .powerlevel = 3}; +ECU_StateData stateLump = { + // Start on GLV On + .ecu_state = GR_GLV_ON, + // Assume ACU good at boot + .acu_software_latch = 1, + // Startup at minimum power + .powerlevel = 0, + // See CANdo specification + .torquemap = 1}; static uint32_t millis_since_boot; void ECU_State_Tick(void) @@ -252,7 +260,33 @@ void ECU_Drive_Active(ECU_StateData *stateData) } else if (PressingBrake(stateData) && 0 > REGEN_MIN_SPEED_MPH) { // stateData->vehicle_speed_mph torque_request = -MIN_WITH_TYPES(CalcBrakePercent(stateData) * REGEN_STRENGTH, 1.0f) * MAX_REVERSE_CURRENT_AMPS; } else { - torque_request = fminf(CalcAccPedalTravel(stateData) * MAX_CURRENT_AMPS * (1 << stateData->powerlevel) / 8.0f, MAX_CURRENT_AMPS); + uint16_t max_current = 0; + // Chosen max current for different power level / torque maps + switch (stateData->powerlevel) { + case 0: + max_current = 50; + break; + case 1: + max_current = 100; + break; + case 2: + max_current = 150; + break; + case 3: + max_current = 200; + break; + case 4: + max_current = 250; + break; + case 5: + max_current = 275; + break; + default: + LOGOMATIC("Invalid power level: %d. Defaulting to no current.\n", stateData->powerlevel); + max_current = 0; + break; + } + torque_request = fminf(CalcAccPedalTravel(stateData) * max_current, MAX_CURRENT_AMPS); } static uint32_t last_can_inverter_request_millis = 0; From c61c4723a2fa51d41fa34f4ff71318c717d5b2c6 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 01:01:28 -0700 Subject: [PATCH 35/85] Oops, 6 power levels 0 through 5 Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 418d80065..a1566c447 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -136,7 +136,7 @@ void ECU_GLV_On(ECU_StateData *stateData) } if (stateData->rtd_button_pressed) { - stateData->powerlevel = (stateData->powerlevel + 1) % 4; + stateData->powerlevel = (stateData->powerlevel + 1) % 6; LOGOMATIC("Power level now at %d\n", stateData->powerlevel); } } From 99591a4e0b33578de631dcf24c508a90ee32aa63 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 01:17:54 -0700 Subject: [PATCH 36/85] Increase APPS deadzone to be 8% Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index efef6b4a0..e1d3f43ab 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -144,7 +144,7 @@ float CalcAccPedalTravel(volatile const ECU_StateData *stateData) float appspos2 = (stateData->APPS2_Signal - THROTTLE_MIN_2) / (float)(THROTTLE_MAX_2 - THROTTLE_MIN_2); float travel = fminf(fmaxf((appspos1 + appspos2) / 2.0f, 0.0f), 1.0f); - return travel > 0.05f ? (travel - 0.05f) / 0.95f : 0.0f; + return travel > 0.08f ? (travel - 0.08f) / 0.92f : 0.0f; } // APPS implausibility check (within 10% travel) From 7be6c78b8d34019d2d0c5bbcfbcaaadc4db68889 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 01:27:58 -0700 Subject: [PATCH 37/85] Change ams to bms in ECU (rules and labels) Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateData.h | 2 +- ECU/Application/Src/StateTicks.c | 4 ++-- ECU/Application/Src/StateUtils.c | 2 +- ECU/Core/Inc/main.h | 2 +- ECU/Core/Src/main.c | 2 +- ECU/Test/Src/StateTicksTest.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 2e47787a4..1b74d0c27 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -65,7 +65,7 @@ typedef volatile struct ECU_StateData { // 0.5V when things go to shit (X_OK low) (BAD) // 3V when things almost poggers (X_OK high but SDC not reset) (BAD) // 2.4V when things are actually poggers (X_OK high and SDC is not triggered) - float ams_sense; + float bms_sense; float imd_sense; float bspd_sense; diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index a1566c447..dd39e466a 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -51,7 +51,7 @@ void ECU_State_Tick(void) // false or imd_sense > 0.5 -> false -> no light // false or imd_sense < 0.5 -> true -> light // true or imd_sense > 0.5 -> true -> light stays on - // stateLump.bms_light |= !(stateLump.ams_sense > 0.5f); + // stateLump.bms_light |= !(stateLump.bms_sense > 0.5f); // stateLump.imd_light |= !(stateLump.imd_sense > 0.5f); // lgoht control reset @@ -62,7 +62,7 @@ void ECU_State_Tick(void) // stateLump.bms_light &= (bmsFailure(&stateLump)); // stateLump.imd_light &= (imdFailure(&stateLump)); - stateLump.bms_light = (stateLump.ams_sense <= 0.4f) || (stateLump.bms_light && bmsFailure(&stateLump)); + stateLump.bms_light = (stateLump.bms_sense <= 0.4f) || (stateLump.bms_light && bmsFailure(&stateLump)); stateLump.imd_light = (stateLump.imd_sense <= 0.4f) || (stateLump.imd_light && imdFailure(&stateLump)); stateLump.tssi_fault = stateLump.bms_light || stateLump.imd_light; diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index e1d3f43ab..0174a053a 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -60,7 +60,7 @@ bool CriticalError(volatile const ECU_StateData *stateData) bool bmsFailure(volatile const ECU_StateData *stateData) { - return stateData->ams_sense < 0.5f || stateData->ams_sense > 1.6f; // 0.5 to 1.6 is valid + return stateData->bms_sense < 0.5f || stateData->bms_sense > 1.6f; // 0.5 to 1.6 is valid } bool imdFailure(volatile const ECU_StateData *stateData) diff --git a/ECU/Core/Inc/main.h b/ECU/Core/Inc/main.h index 9d4c3ae2c..881140fb7 100644 --- a/ECU/Core/Inc/main.h +++ b/ECU/Core/Inc/main.h @@ -72,7 +72,7 @@ enum { /* Insulation Monitoring Device - Sense */ ADC_BUFFER_SENSE_IMD = 8, /* Accumulator Management System - Sense */ - ADC_BUFFER_SENSE_AMS = 9, + ADC_BUFFER_SENSE_BMS = 9, /* Steering Angle - Signal */ ADC_BUFFER_SIG_STEERING_ANGLE = 10, }; diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 8e9fc3bea..376a372b5 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -209,7 +209,7 @@ void write_adc_values_to_state_data(void) // TODO: determine conversion factors for all of these (uint to float) stateLump.bspd_sense = ADC_outputs[ADC_BUFFER_SENSE_BSPD] / 4095.0 * 3.3; stateLump.imd_sense = ADC_outputs[ADC_BUFFER_SENSE_IMD] / 4095.0 * 3.3; - stateLump.ams_sense = ADC_outputs[ADC_BUFFER_SENSE_AMS] / 4095.0 * 3.3; + stateLump.bms_sense = ADC_outputs[ADC_BUFFER_SENSE_BMS] / 4095.0 * 3.3; } void ADC_Configure(void) diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index 968a86193..2fb1b9132 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -84,7 +84,7 @@ int main(void) // ## Step 0.0 ## // ########################### LOGOMATIC("State Ticks test started\n"); - ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .ams_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.2}; + ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .bms_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.2}; LOGOMATIC("Check GLV ON at boot\n"); stateLumpTest.ecu_state = GR_GLV_ON; stateLumpTest.acu_software_latch = 1; @@ -451,7 +451,7 @@ int main(void) // ## Step 1.0 ## // ########################## LOGOMATIC("Reset system\n"); - ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .ams_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.5}; + ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .bms_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.5}; LOGOMATIC("State Tick Test 1 started\n"); ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { From 831acb6e110f4ff40429cfba52628b14a40742ae Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 02:02:52 -0700 Subject: [PATCH 38/85] Reduce bms/imd thresholds from 0.4 to 0.2 Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index dd39e466a..de40d9309 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -62,8 +62,8 @@ void ECU_State_Tick(void) // stateLump.bms_light &= (bmsFailure(&stateLump)); // stateLump.imd_light &= (imdFailure(&stateLump)); - stateLump.bms_light = (stateLump.bms_sense <= 0.4f) || (stateLump.bms_light && bmsFailure(&stateLump)); - stateLump.imd_light = (stateLump.imd_sense <= 0.4f) || (stateLump.imd_light && imdFailure(&stateLump)); + stateLump.bms_light = (stateLump.bms_sense <= 0.2f) || (stateLump.bms_light && bmsFailure(&stateLump)); + stateLump.imd_light = (stateLump.imd_sense <= 0.2f) || (stateLump.imd_light && imdFailure(&stateLump)); stateLump.tssi_fault = stateLump.bms_light || stateLump.imd_light; From be93212b1340ff7eb90fd2456e8af6682dfe7d0c Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 02:06:09 -0700 Subject: [PATCH 39/85] Clean up the bms/imd/bspd dash logic to be clear booleans instead of what it currently is (not removed just commented) Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 9f77ee8c2..21e9e9a4a 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -58,11 +58,20 @@ void dashLights(ECU_StateData *stateLump) uint8_t timeState = (MillisecondsSinceBoot() >> 8) % 16; // counter from 0 to 15 that increments every 256 ms: bool powerLevelLight = (stateLump->ecu_state == GR_GLV_ON) && (timeState < (stateLump->powerlevel + 1) * 2) && ((timeState % 2) == 0); - // light control for if signal goog - GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bspdFailure(stateLump) || powerLevelLight) << 2 | stateLump->imd_light << 1 | stateLump->bms_light}; + // // light control for if signal goog + // GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bspdFailure(stateLump) || powerLevelLight) << 2 | stateLump->imd_light << 1 | stateLump->bms_light}; - // this is needed for the latch open control - message.led_latch_flags |= ((uint8_t)!(bspdFailure(stateLump) || powerLevelLight) << 5) | ((uint8_t)!stateLump->imd_light << 4) | ((uint8_t)!stateLump->bms_light << 3); + // // this is needed for the latch open control + // message.led_latch_flags |= ((uint8_t)!(bspdFailure(stateLump) || powerLevelLight) << 5) | ((uint8_t)!stateLump->imd_light << 4) | ((uint8_t)!stateLump->bms_light << 3); + + bool bms_nonlatch = stateLump->bms_light; + bool imd_nonlatch = stateLump->imd_light; + bool bspd_nonlatch = bspdFailure(stateLump) || powerLevelLight; + bool bms_latch = !stateLump->bms_light; + bool imd_latch = !stateLump->imd_light; + bool bspd_latch = !(bspdFailure(stateLump) || powerLevelLight); + + GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 0) | (imd_nonlatch << 1) | (bspd_nonlatch << 2) | (bms_latch << 3) | (imd_latch << 4) | (bspd_latch << 5)}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } From be0d4de31dc267a5210dfb7808bae6a57e0f0be0 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 03:14:13 -0700 Subject: [PATCH 40/85] Brake percent is not real, use brake pressure for everything Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 10 +++++----- ECU/Application/Inc/StateUtils.h | 2 +- ECU/Application/Src/CANutils.c | 2 +- ECU/Application/Src/StateTicks.c | 2 +- ECU/Application/Src/StateUtils.c | 30 +++++------------------------- 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index cb0cf6616..70900b1e7 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -3845,14 +3845,14 @@ Message ID: scaled min: 0 scaled max: 100 map equation: "x/655.35" - Brake Pedal Travel: + Brake Pedal Pressure: bit_start: 144 - comment: 0-100% percentage + comment: Pressure data type: u16 - units: % + units: PSI scaled min: 0 - scaled max: 100 - map equation: "x/655.35" + scaled max: 5000 + map equation: "x" GPS LAT: MSG ID: 0x031 MSG LENGTH: 8 diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index fa90ac2fe..9a68f148f 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -76,7 +76,7 @@ bool imdFailure(volatile const ECU_StateData *stateData); bool bspdFailure(volatile const ECU_StateData *stateData); bool APPS_BSE_Violation(volatile const ECU_StateData *stateData); bool PressingBrake(volatile const ECU_StateData *stateData); -float CalcBrakePercent(volatile const ECU_StateData *stateData); +float CalcBrakePressure(volatile const ECU_StateData *stateData); float CalcAccPedalTravel(volatile const ECU_StateData *stateData); bool APPS_Plausible(volatile const ECU_StateData *stateData); bool vehicle_is_moving(volatile const ECU_StateData *stateData); diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 4f1a04898..67e9beed4 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -141,7 +141,7 @@ void SendECUAnalogDataOverCAN(ECU_StateData *stateData) .steering_angle_signal = stateData->steering_angle_signal, .aux_signal = stateData->aux_signal, .acc_pedal_travel = CalcAccPedalTravel(stateData) * 65535, - .brake_pedal_travel = CalcBrakePercent(stateData) * 65535}; + .brake_pedal_travel = CalcBrakePressure(stateData)}; ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, sizeof(message)); last_can_tcm_request_millis = millis_since_boot; } diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index de40d9309..3e992d19c 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -258,7 +258,7 @@ void ECU_Drive_Active(ECU_StateData *stateData) if (stateData->apps_bse_violation || !apps_plausible) { torque_request = 0; } else if (PressingBrake(stateData) && 0 > REGEN_MIN_SPEED_MPH) { // stateData->vehicle_speed_mph - torque_request = -MIN_WITH_TYPES(CalcBrakePercent(stateData) * REGEN_STRENGTH, 1.0f) * MAX_REVERSE_CURRENT_AMPS; + torque_request = -MIN_WITH_TYPES(CalcBrakePressure(stateData) / 5000.0f * REGEN_STRENGTH, 1.0f) * MAX_REVERSE_CURRENT_AMPS; } else { uint16_t max_current = 0; // Chosen max current for different power level / torque maps diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 0174a053a..a0bf261ef 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -93,7 +93,6 @@ bool APPS_BSE_Violation(volatile const ECU_StateData *stateData) return PressingBrake(stateData) && CalcAccPedalTravel(stateData) >= 0.25f; } -// TODO: reconsider deadzones bool PressingBrake(volatile const ECU_StateData *stateData) { #ifdef PLAN_C @@ -104,37 +103,18 @@ bool PressingBrake(volatile const ECU_StateData *stateData) } #endif - // uint16_t brakeRangeF = BRAKE_F_MAX - BRAKE_F_MIN; - // uint16_t brakeRangeR = BRAKE_R_MAX - BRAKE_R_MIN; - // bool brakeFpress = stateData->Brake_F_Signal - BRAKE_F_MIN > BSE_DEADZONE * brakeRangeF; - // bool brakeRpress = stateData->Brake_R_Signal - BRAKE_R_MIN > BSE_DEADZONE * brakeRangeR; - // return brakeFpress || brakeRpress; - // FIXME: DELETE THE FOLLOWING CONTROL BLOCK FOR BRAKE TESTING - if (stateData->Brake_F_Signal > (BRAKE_F_MIN) || stateData->bse_signal > (BSE_MIN)) { - return true; - } - return false; - // Ideally TCM receives values of 0 after this is no longer called xD. + return (stateData->Brake_F_Signal > BRAKE_F_MIN) || (stateData->bse_signal > BSE_MIN); } -float CalcBrakePercent(volatile const ECU_StateData *stateData) +float CalcBrakePressure(volatile const ECU_StateData *stateData) { #ifdef PLAN_C return 0; #endif - if (stateData->bse_signal <= BSE_MIN) { - return 0; - } - - const uint16_t numerator = stateData->bse_signal - BSE_MIN; - const uint16_t denominator = BSE_MAX - BSE_MIN; - - if (numerator > denominator) { - return 1.0f; - } - - return (float)numerator / (float)denominator; + float psi_front = stateData->bse_signal / 4096.0f * 5000.0f; + float psi_rear = stateData->Brake_F_Signal / 4096.0f * 5000.0f; + return fmaxf(psi_front, psi_rear); } // TODO: reconsider deadzone From eae2d080a98b033cc02d76b448fb93602aa96225 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 10:25:26 +0000 Subject: [PATCH 41/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Data.dbc | 4 ++-- Autogen/CAN/Doc/GRCAN_Primary.dbc | 4 ++-- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Data.dbc b/Autogen/CAN/Doc/GRCAN_Data.dbc index d99029f8a..d3b065369 100644 --- a/Autogen/CAN/Doc/GRCAN_Data.dbc +++ b/Autogen/CAN/Doc/GRCAN_Data.dbc @@ -407,7 +407,7 @@ BO_ 2149592580 ECU_ECU_Analog_Data_to_TCM: 20 ECU SG_ Steering_Angle_Signal : 96|16@1+ (0.0015259022,0) [0|100] "%" TCM SG_ AUX_Signal : 112|16@1+ (0.0015259022,0) [0|100] "%" TCM SG_ Acc_Pedal_Travel : 128|16@1+ (0.0015259022,0) [0|100] "%" TCM - SG_ Brake_Pedal_Travel : 144|16@1+ (0.0015259022,0) [0|100] "%" TCM + SG_ Brake_Pedal_Pressure : 144|16@1+ (1,0) [0|5000] "PSI" TCM BO_ 2149592324 ECU_ECU_Pinging_RTT_to_TCM: 24 ECU SG_ ACU_RTT : 0|8@1+ (1,0) [0|0] "ms" TCM @@ -4281,7 +4281,7 @@ CM_ SG_ 2149592580 Brakeline_R_Signal "4-20 mA signal"; CM_ SG_ 2149592580 Steering_Angle_Signal "4-20 mA signal"; CM_ SG_ 2149592580 AUX_Signal "4-20 mA signal"; CM_ SG_ 2149592580 Acc_Pedal_Travel "0-100% percentage"; -CM_ SG_ 2149592580 Brake_Pedal_Travel "0-100% percentage"; +CM_ SG_ 2149592580 Brake_Pedal_Pressure "Pressure"; CM_ SG_ 2149592324 ACU_RTT "Round trip time"; CM_ SG_ 2149592324 GR_Inv_RTT "Round trip time"; CM_ SG_ 2149592324 Fan_Ctrl_1_RTT "Round trip time"; diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index 2910683cc..348150a68 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -476,8 +476,8 @@ CM_ SG_ 2149581568 ECU_State "[Byte 0 / Bits 0-7] ECU state machine data 0: GLV CM_ SG_ 2149581568 Ping_Group_1 "[Byte 1 / Bits 8-15] ECU ping targets 8: ACU (1: OK, 0: Timeout) 9: GR Inv (1: OK, 0: Timeout) 10: Fan Ctrl 1 (1: OK, 0: Timeout) 11: Fan Ctrl 2 (1: OK, 0: Timeout) 12: Fan Ctrl 3 (1: OK, 0: Timeout) 13: Dash Panel (1: OK, 0: Timeout) 14: TCM (1: OK, 0: Timeout) 15: DGPS (1: OK, 0: Timeout)"; CM_ SG_ 2149581568 Ping_Group_2 "[Byte 2 / Bits 16-23] ECU ping targets 16: Suspension FL (1: OK, 0: Timeout) 17: Suspension FR (1: OK, 0: Timeout) 18: Suspension RL (1: OK, 0: Timeout) 19: Suspension RR (1: OK, 0: Timeout) 20: InboardFloor FL (1: OK, 0: Timeout) 21: InboardFloor FR (1: OK, 0: Timeout) 22: InboardFloor RL (1: OK, 0: Timeout) 23: InboardFloor RR (1: OK, 0: Timeout)"; CM_ SG_ 2149581568 Ping_Group_3 "[Byte 3 / Bits 24-31] ECU ping targets 24: TireTemp FL (1: OK, 0: Timeout) 25: TireTemp FR (1: OK, 0: Timeout) 26: TireTemp RL (1: OK, 0: Timeout) 27: TireTemp RR (1: OK, 0: Timeout) 28: BrakeTemp FL (1: OK, 0: Timeout) 29: BrakeTemp FR (1: OK, 0: Timeout) 30: BrakeTemp RL (1: OK, 0: Timeout) 31: BrakeTemp RR (1: OK, 0: Timeout)"; -CM_ SG_ 2149581568 Power_Level "Controls the AC current limits to each of the inverters Discrete Mapping, actual values TBD (16 possible values)"; -CM_ SG_ 2149581568 Torque_Map "The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor"; +CM_ SG_ 2149581568 Power_Level "Controls the AC current limits to each of the inverters Discrete Mapping, actual current values described by the torque map"; +CM_ SG_ 2149581568 Torque_Map "The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 / 100 / 150 / 200 / 250 / 275, 2 and later is tbd"; CM_ SG_ 2149581568 Max_Cell_Temp "the Temp of the hottest cell of the accumulator"; CM_ SG_ 2149581568 Accumulator_State_of_Chg "% charged of the Accumulator"; CM_ SG_ 2149581568 GLV_State_of_Chg "% charged of the Low Voltage Bat"; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index 778affdab..8c5b25314 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -53,7 +53,8 @@ See diagram in StateMachine.h (Byte 0) */ 31: BrakeTemp RR (1: OK, 0: Timeout) (Byte 3) */ uint8_t ping_group_3; /** Controls the AC current limits to each of the inverters -Discrete Mapping, actual values TBD (16 possible values) The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor (Byte 4) */ +Discrete Mapping, actual current values described by the torque map The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 +/ 100 / 150 / 200 / 250 / 275, 2 and later is tbd (Byte 4) */ uint8_t power_level_torque_map; /** the Temp of the hottest cell of the accumulator (Byte 5) */ uint8_t max_cell_temp; @@ -427,8 +428,8 @@ typedef struct { uint16_t aux_signal; /** 0-100% percentage (Byte 16) */ uint16_t acc_pedal_travel; - /** 0-100% percentage (Byte 18) */ - uint16_t brake_pedal_travel; + /** Pressure (Byte 18) */ + uint16_t brake_pedal_pressure; } GRCAN_ECU_ANALOG_DATA_MSG; /** GPS LAT */ From cfc9ad969ba6fa5444c8c9145e6226358ab7cd49 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 03:43:51 -0700 Subject: [PATCH 42/85] Add in ECU Config message but do not wire it in to anything yet Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 1810 +++++++++++++++++------------------ 1 file changed, 871 insertions(+), 939 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 70900b1e7..acd6ee446 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -165,6 +165,7 @@ routing: - msg: ECU Status 3 TCM: - msg: Ping + - msg: ECU Config Data: Debugger: - msg: Debug FD @@ -244,6 +245,7 @@ routing: - msg: Ping ECU: - msg: Ping + - msg: ECU Config Data: Debugger: - msg: Ping @@ -252,7 +254,6 @@ routing: ACU: - msg: ACU Precharge - msg: Debug 2.0 - Charging SDC: DGPS: Data: ECU: @@ -3632,144 +3633,6 @@ Message ID: 5: BMS latch 6-7: Reserved data type: u8 - TCM Status: - MSG ID: 0x029 - MSG LENGTH: 8 - status_bits: - bit_start: 0 - comment: - [Byte 0 / Bits 0-7] - 0: Connection Status - 1: MQTT Status - 2: Epic Shelter Status - 3: Camera Status - 4-7: Reserved - mapache_ping: - bit_start: 8 - comment: Mapache ping (upload) - data type: u16 - units: ms - Cache Size: - bit_start: 24 - comment: # of messages on cache (non-synced) - data type: u32 - units: # - Reserved: - bit_start: 56 - TCM Resource Utilization: - MSG ID: 0x02A - MSG LENGTH: 44 - CPU 0 Freq: - bit_start: 0 - comment: core 0 frequency in MHz - data type: u16 - units: '%' - CPU 0 Util: - bit_start: 16 - comment: core 0 utilization in % - data type: u8 - units: '%' - CPU 1 Freq: - bit_start: 24 - comment: core 1 frequency in MHz - data type: u16 - units: '%' - CPU 1 Util: - bit_start: 40 - comment: core 1 utilization in % - data type: u8 - CPU 2 Freq: - bit_start: 48 - comment: core 2 frequency in MHz - data type: u16 - units: '%' - CPU 2 Util: - bit_start: 64 - comment: core 2 utilization in % - data type: u8 - CPU 3 Freq: - bit_start: 72 - comment: core 3 frequency in MHz - data type: u16 - CPU 3 Util: - bit_start: 88 - comment: core 3 utilization in % - data type: u8 - CPU 4 Freq: - bit_start: 96 - comment: core 4 frequency in MHz - data type: u16 - CPU 4 Util: - bit_start: 112 - comment: core 4 utilization in % - data type: u8 - CPU 5 Freq: - bit_start: 120 - comment: core 5 frequency in MHz - data type: u16 - CPU 5 Util: - bit_start: 136 - comment: core 5 utilization in % - data type: u8 - units: Watts - CPU Total Util: - bit_start: 144 - comment: total cpu utilization in % - data type: u8 - RAM Total: - bit_start: 152 - comment: total memory in MB - data type: u16 - RAM Used: - bit_start: 168 - comment: used memory in MB - data type: u16 - RAM Util: - bit_start: 184 - comment: memory utilization in % - data type: u8 - GPU Util: - bit_start: 192 - comment: gpu utilization in % - data type: u8 - GPU Freq: - bit_start: 200 - comment: gpu frequency in MHz - data type: u16 - Disk Total: - bit_start: 216 - comment: total disk space in MB - data type: u32 - Disk Used: - bit_start: 248 - comment: used disk space in MB - data type: u32 - Disk Util: - bit_start: 280 - comment: disk utilization in % - data type: u8 - units: Celsius - CPU Temp: - bit_start: 288 - comment: cpu temp in ˚C - data type: u8 - GPU Temp: - bit_start: 296 - comment: gpu temp in ˚C - data type: u8 - Voltage Draw: - bit_start: 304 - comment: voltage draw in mV - data type: u16 - Current Draw: - bit_start: 320 - comment: current draw in mA - data type: u16 - Power Draw: - bit_start: 336 - comment: power draw in mW - data type: u16 - units: Celsius ECU Analog Data: MSG ID: 0x02E MSG LENGTH: 20 @@ -4062,194 +3925,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 0 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 0 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 0 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 0 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 0 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 0 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 0 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 0 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 0 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 0 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 0 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 0 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 0 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 0 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 0 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 0 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 0 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 0 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 0 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 0 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 0 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 0 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 0 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 0 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 0 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 0 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 0 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 0 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 0 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 0 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 0 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 0 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 1: @@ -4257,194 +4120,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 1 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 1 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 1 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 1 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 1 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 1 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 1 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 1 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 1 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 1 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 1 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 1 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 1 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 1 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 1 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 1 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 1 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 1 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 1 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 1 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 1 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 1 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 1 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 1 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 1 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 1 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 1 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 1 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 1 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 1 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 1 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 1 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 2: @@ -4452,194 +4315,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 2 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 2 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 2 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 2 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 2 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 2 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 2 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 2 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 2 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 2 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 2 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 2 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 2 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 2 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 2 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 2 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 2 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 2 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 2 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 2 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 2 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 2 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 2 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 2 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 2 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 2 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 2 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 2 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 2 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 2 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 2 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 2 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 3: @@ -4647,194 +4510,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 3 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 3 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 3 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 3 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 3 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 3 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 3 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 3 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 3 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 3 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 3 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 3 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 3 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 3 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 3 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 3 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 3 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 3 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 3 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 3 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 3 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 3 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 3 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 3 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 3 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 3 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 3 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 3 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 3 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 3 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 3 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 3 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 4: @@ -4842,194 +4705,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 4 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 4 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 4 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 4 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 4 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 4 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 4 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 4 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 4 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 4 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 4 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 4 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 4 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 4 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 4 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 4 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 4 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 4 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 4 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 4 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 4 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 4 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 4 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 4 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 4 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 4 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 4 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 4 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 4 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 4 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 4 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 4 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 5: @@ -5037,194 +4900,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 5 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 5 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 5 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 5 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 5 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 5 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 5 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 5 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 5 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 5 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 5 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 5 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 5 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 5 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 5 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 5 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 5 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 5 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 5 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 5 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 5 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 5 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 5 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 5 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 5 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 5 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 5 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 5 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 5 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 5 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 5 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 5 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 6: @@ -5232,194 +5095,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 6 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 6 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 6 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 6 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 6 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 6 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 6 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 6 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 6 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 6 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 6 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 6 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 6 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 6 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 6 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 6 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 6 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 6 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 6 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 6 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 6 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 6 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 6 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 6 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 6 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 6 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 6 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 6 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 6 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 6 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 6 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 6 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 7: @@ -5427,194 +5290,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 7 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 7 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 7 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 7 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 7 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 7 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 7 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 7 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 7 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 7 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 7 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 7 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 7 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 7 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 7 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 7 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 7 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 7 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 7 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 7 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 7 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 7 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 7 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 7 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 7 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 7 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 7 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 7 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 7 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 7 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 7 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 7 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 8: @@ -5622,194 +5485,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 8 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 8 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 8 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 8 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 8 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 8 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 8 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 8 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 8 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 8 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 8 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 8 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 8 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 8 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 8 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 8 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 8 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 8 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 8 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 8 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 8 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 8 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 8 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 8 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 8 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 8 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 8 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 8 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 8 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 8 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 8 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 8 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 9: @@ -5817,194 +5680,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 9 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 9 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 9 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 9 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 9 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 9 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 9 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 9 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 9 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 9 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 9 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 9 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 9 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 9 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 9 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 9 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 9 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 9 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 9 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 9 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 9 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 9 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 9 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 9 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 9 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 9 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 9 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 9 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 9 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 9 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 9 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 9 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 10: @@ -6012,194 +5875,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 10 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 10 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 10 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 10 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 10 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 10 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 10 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 10 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 10 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 10 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 10 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 10 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 10 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 10 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 10 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 10 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 10 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 10 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 10 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 10 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 10 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 10 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 10 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 10 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 10 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 10 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 10 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 10 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 10 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 10 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 10 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 10 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 11: @@ -6207,194 +6070,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 11 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 11 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 11 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 11 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 11 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 11 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 11 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 11 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 11 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 11 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 11 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 11 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 11 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 11 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 11 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 11 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 11 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 11 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 11 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 11 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 11 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 11 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 11 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 11 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 11 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 11 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 11 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 11 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 11 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 11 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 11 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 11 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 12: @@ -6402,194 +6265,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 12 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 12 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 12 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 12 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 12 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 12 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 12 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 12 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 12 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 12 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 12 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 12 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 12 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 12 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 12 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 12 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 12 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 12 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 12 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 12 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 12 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 12 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 12 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 12 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 12 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 12 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 12 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 12 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 12 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 12 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 12 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 12 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 13: @@ -6597,194 +6460,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 13 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 13 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 13 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 13 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 13 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 13 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 13 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 13 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 13 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 13 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 13 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 13 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 13 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 13 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 13 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 13 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 13 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 13 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 13 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 13 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 13 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 13 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 13 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 13 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 13 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 13 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 13 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 13 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 13 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 13 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 13 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 13 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 14: @@ -6792,194 +6655,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 14 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 14 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 14 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 14 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 14 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 14 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 14 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 14 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 14 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 14 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 14 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 14 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 14 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 14 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 14 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 14 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 14 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 14 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 14 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 14 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 14 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 14 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 14 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 14 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 14 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 14 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 14 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 14 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 14 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 14 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 14 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 14 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 15: @@ -6987,194 +6850,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 15 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 15 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 15 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 15 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 15 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 15 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 15 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 15 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 15 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 15 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 15 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 15 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 15 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 15 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 15 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 15 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 15 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 15 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 15 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 15 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 15 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 15 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 15 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 15 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 15 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 15 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 15 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 15 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 15 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 15 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 15 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 15 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 16: @@ -7182,194 +7045,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 16 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 16 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 16 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 16 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 16 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 16 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 16 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 16 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 16 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 16 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 16 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 16 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 16 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 16 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 16 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 16 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 16 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 16 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 16 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 16 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 16 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 16 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 16 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 16 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 16 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 16 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 16 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 16 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 16 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 16 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 16 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 16 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 17: @@ -7377,194 +7240,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 17 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 17 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 17 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 17 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 17 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 17 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 17 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 17 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 17 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 17 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 17 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 17 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 17 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 17 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 17 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 17 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 17 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 17 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 17 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 17 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 17 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 17 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 17 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 17 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 17 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 17 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 17 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 17 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 17 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 17 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 17 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 17 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 18: @@ -7572,194 +7435,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 18 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 18 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 18 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 18 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 18 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 18 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 18 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 18 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 18 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 18 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 18 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 18 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 18 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 18 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 18 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 18 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 18 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 18 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 18 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 18 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 18 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 18 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 18 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 18 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 18 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 18 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 18 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 18 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 18 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 18 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 18 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 18 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 19: @@ -7767,194 +7630,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 19 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 19 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 19 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 19 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 19 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 19 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 19 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 19 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 19 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 19 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 19 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 19 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 19 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 19 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 19 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 19 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 19 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 19 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 19 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 19 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 19 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 19 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 19 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 19 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 19 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 19 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 19 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 19 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 19 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 19 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 19 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 19 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 20: @@ -7962,194 +7825,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 20 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 20 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 20 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 20 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 20 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 20 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 20 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 20 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 20 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 20 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 20 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 20 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 20 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 20 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 20 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 20 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 20 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 20 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 20 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 20 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 20 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 20 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 20 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 20 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 20 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 20 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 20 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 20 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 20 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 20 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 20 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 20 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 21: @@ -8157,194 +8020,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 21 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 21 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 21 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 21 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 21 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 21 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 21 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 21 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 21 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 21 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 21 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 21 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 21 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 21 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 21 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 21 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 21 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 21 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 21 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 21 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 21 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 21 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 21 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 21 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 21 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 21 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 21 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 21 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 21 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 21 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 21 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 21 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 22: @@ -8352,194 +8215,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 22 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 22 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 22 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 22 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 22 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 22 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 22 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 22 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 22 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 22 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 22 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 22 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 22 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 22 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 22 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 22 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 22 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 22 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 22 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 22 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 22 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 22 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 22 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 22 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 22 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 22 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 22 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 22 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 22 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 22 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 22 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 22 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Tire Temp Frame 23: @@ -8547,194 +8410,194 @@ Message ID: MSG LENGTH: 64 pixel0: bit_start: 0 - data type: u16 comment: Tire Temp frame 23 pixel 0 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel1: bit_start: 16 - data type: u16 comment: Tire Temp frame 23 pixel 1 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel2: bit_start: 32 - data type: u16 comment: Tire Temp frame 23 pixel 2 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel3: bit_start: 48 - data type: u16 comment: Tire Temp frame 23 pixel 3 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel4: bit_start: 64 - data type: u16 comment: Tire Temp frame 23 pixel 4 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel5: bit_start: 80 - data type: u16 comment: Tire Temp frame 23 pixel 5 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel6: bit_start: 96 - data type: u16 comment: Tire Temp frame 23 pixel 6 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel7: bit_start: 112 - data type: u16 comment: Tire Temp frame 23 pixel 7 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel8: bit_start: 128 - data type: u16 comment: Tire Temp frame 23 pixel 8 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel9: bit_start: 144 - data type: u16 comment: Tire Temp frame 23 pixel 9 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel10: bit_start: 160 - data type: u16 comment: Tire Temp frame 23 pixel 10 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel11: bit_start: 176 - data type: u16 comment: Tire Temp frame 23 pixel 11 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel12: bit_start: 192 - data type: u16 comment: Tire Temp frame 23 pixel 12 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel13: bit_start: 208 - data type: u16 comment: Tire Temp frame 23 pixel 13 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel14: bit_start: 224 - data type: u16 comment: Tire Temp frame 23 pixel 14 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel15: bit_start: 240 - data type: u16 comment: Tire Temp frame 23 pixel 15 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel16: bit_start: 256 - data type: u16 comment: Tire Temp frame 23 pixel 16 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel17: bit_start: 272 - data type: u16 comment: Tire Temp frame 23 pixel 17 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel18: bit_start: 288 - data type: u16 comment: Tire Temp frame 23 pixel 18 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel19: bit_start: 304 - data type: u16 comment: Tire Temp frame 23 pixel 19 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel20: bit_start: 320 - data type: u16 comment: Tire Temp frame 23 pixel 20 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel21: bit_start: 336 - data type: u16 comment: Tire Temp frame 23 pixel 21 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel22: bit_start: 352 - data type: u16 comment: Tire Temp frame 23 pixel 22 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel23: bit_start: 368 - data type: u16 comment: Tire Temp frame 23 pixel 23 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel24: bit_start: 384 - data type: u16 comment: Tire Temp frame 23 pixel 24 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel25: bit_start: 400 - data type: u16 comment: Tire Temp frame 23 pixel 25 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel26: bit_start: 416 - data type: u16 comment: Tire Temp frame 23 pixel 26 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel27: bit_start: 432 - data type: u16 comment: Tire Temp frame 23 pixel 27 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel28: bit_start: 448 - data type: u16 comment: Tire Temp frame 23 pixel 28 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel29: bit_start: 464 - data type: u16 comment: Tire Temp frame 23 pixel 29 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel30: bit_start: 480 - data type: u16 comment: Tire Temp frame 23 pixel 30 + data type: u16 units: C map equation: "x*340*2^-16 - 40" pixel31: bit_start: 496 - data type: u16 comment: Tire Temp frame 23 pixel 31 + data type: u16 units: C map equation: "x*340*2^-16 - 40" Brake Temp: @@ -8742,8 +8605,8 @@ Message ID: MSG LENGTH: 16 temp: bit_start: 0 - data type: u16 comment: Brake rotor Temp + data type: u16 units: C map equation: "x*340*2^-16 - 40" Wheel Speed: @@ -8751,8 +8614,8 @@ Message ID: MSG LENGTH: 16 speed: bit_start: 0 - data type: u16 comment: Wheel speed rpm + data type: u16 units: RPM map equation: "x/8" Suspension IMU Mag Data: @@ -8760,137 +8623,205 @@ Message ID: MSG LENGTH: 24 bmi323_acc_x: bit_start: 0 - data type: u16 comment: BMI323 accelerometer X + data type: u16 bmi323_acc_y: bit_start: 16 - data type: u16 comment: BMI323 accelerometer Y + data type: u16 bmi323_acc_z: bit_start: 32 - data type: u16 comment: BMI323 accelerometer Z + data type: u16 bmi323_gyro_x: bit_start: 48 - data type: u16 comment: BMI323 gyroscope X + data type: u16 bmi323_gyro_y: bit_start: 64 - data type: u16 comment: BMI323 gyroscope Y + data type: u16 bmi323_gyro_z: bit_start: 80 - data type: u16 comment: BMI323 gyroscope Z + data type: u16 bmi323_temp: bit_start: 96 - data type: u16 comment: BMI323 temperature + data type: u16 bmi323_status: bit_start: 112 - data type: u16 comment: BMI323 status + data type: u16 mag_temp: bit_start: 128 - data type: u16 comment: Magnetic encoder temperature + data type: u16 mag_hysteresis: bit_start: 144 - data type: u16 comment: The lineation of groupings for hysteresis + data type: u16 mag_angle: bit_start: 160 - data type: u16 comment: Magnetic encoder angle + data type: u16 mag_turns: bit_start: 176 - data type: i16 comment: Magnetic encoder turns + data type: i16 mag_status: bit_start: 192 + comment: Magnetic encoder status data type: b units: u8 - comment: Magnetic encoder status reserved: bit_start: 200 - data type: u16 comment: Reserved + data type: u16 InboardFloor IMU ToF Data: MSG ID: 0x052 MSG LENGTH: 32 bmi323_acc_x: bit_start: 0 - data type: u16 comment: BMI323 accelerometer X + data type: u16 bmi323_acc_y: bit_start: 16 - data type: u16 comment: BMI323 accelerometer Y + data type: u16 bmi323_acc_z: bit_start: 32 - data type: u16 comment: BMI323 accelerometer Z + data type: u16 bmi323_gyro_x: bit_start: 48 - data type: u16 comment: BMI323 gyroscope X + data type: u16 bmi323_gyro_y: bit_start: 64 - data type: u16 comment: BMI323 gyroscope Y + data type: u16 bmi323_gyro_z: bit_start: 80 - data type: u16 comment: BMI323 gyroscope Z + data type: u16 bmi323_temp: bit_start: 96 - data type: u16 comment: BMI323 temperature + data type: u16 bmi323_status: bit_start: 112 - data type: u16 comment: BMI323 status + data type: u16 range_status: bit_start: 128 - data type: u8 comment: Time-of-flight range status + data type: u8 distance_mm: bit_start: 136 + comment: Time-of-flight distance data type: u16 units: mm - comment: Time-of-flight distance ambient_rate_kcps: bit_start: 152 + comment: Time-of-flight ambient rate data type: u16 units: kcps - comment: Time-of-flight ambient rate ambient_per_spad_kcps: bit_start: 168 + comment: Time-of-flight ambient rate per SPAD data type: u16 units: kcps - comment: Time-of-flight ambient rate per SPAD signal_rate_kcps: bit_start: 184 + comment: Time-of-flight signal rate data type: u16 units: kcps - comment: Time-of-flight signal rate signal_per_spad_kcps: bit_start: 200 + comment: Time-of-flight signal rate per SPAD data type: u16 units: kcps - comment: Time-of-flight signal rate per SPAD number_of_spad: bit_start: 216 - data type: u16 comment: Time-of-flight SPAD count + data type: u16 sigma_mm: bit_start: 232 + comment: Time-of-flight sigma data type: u16 units: mm - comment: Time-of-flight sigma reserved: bit_start: 248 data type: u8 + ECU Config: + MSG ID: 0x012 + MSG LENGTH: 8 + Ping Timeout Delay: + bit_start: 0 + comment: Delay for which to consider pings timed out + data type: u8 + units: ms + scaled min: 0 + scaled max: 2550 + map equation: "10x" + Brake F Minimum: + bit_start: 8 + comment: Minimum brake f psi for which to consider the brakes pressed + data type: u8 + units: PSI + scaled min: 0 + scaled max: 6375 + map equation: "25x" + Brake R Minimum: + bit_start: 16 + comment: Minimum brake r psi for which to consider the brakes pressed + data type: u8 + units: PSI + scaled min: 0 + scaled max: 6375 + map equation: "25x" + Brake BSE Minimum: + bit_start: 24 + comment: Minimum brake bse psi for which to consider the brakes pressed + data type: u8 + units: PSI + scaled min: 0 + scaled max: 6375 + map equation: "25x" + APPS 1 Min: + bit_start: 32 + comment: Minimum value that the APPS 1 sensor is expected to read + data type: u8 + units: ADC + scaled min: 0 + scaled max: 2550 + map equation: "10x" + APPS 2 Min: + bit_start: 40 + comment: Minimum value that the APPS 2 sensor is expected to read + data type: u8 + units: ADC + scaled min: 0 + scaled max: 2550 + map equation: "10x" + APPS 1 Max: + bit_start: 48 + comment: Maximum value that the APPS 1 sensor is expected to read + data type: u8 + units: ADC + scaled min: 0 + scaled max: 2550 + map equation: "10x" + APPS 2 Max: + bit_start: 56 + comment: Maximum value that the APPS 2 sensor is expected to read + data type: u8 + units: ADC + scaled min: 0 + scaled max: 2550 + map equation: "10x" + Custom CAN ID: DTI Control 1: CAN ID: 0x116 @@ -9391,6 +9322,7 @@ Custom CAN ID: comment: Frick if I know GR ID: + ALL: "0x00" DTI Inv: "0x00" EM: "0x00" From 3bee8bd5df24437b619882a72dd9c8e373991df8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 10:44:11 +0000 Subject: [PATCH 43/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Primary.dbc | 38 +++++++++++++ Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 93 +++++++------------------------ Autogen/CAN/Inc/GRCAN_MSG_ID.h | 3 +- 3 files changed, 59 insertions(+), 75 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index 348150a68..1e26aea37 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -293,6 +293,16 @@ BO_ 2149582080 ECU_ECU_Status_3_to_ALL: 5 ECU BO_ 2149581316 ECU_Ping_to_TCM: 4 ECU SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" TCM +BO_ 2149585412 ECU_ECU_Config_to_TCM: 8 ECU + SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" TCM + SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" TCM + BO_ 2161115137 Fan_Ctrl_1_Debug_2_0_to_Debugger: 8 Fan_Ctrl_1 SG_ Debug : 0|64@1- (1,0) [0|0] "" Debugger @@ -364,6 +374,16 @@ BO_ 2151678465 TCM_Ping_to_Debugger: 4 TCM BO_ 2151678466 TCM_Ping_to_ECU: 4 TCM SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ECU +BO_ 2151682562 TCM_ECU_Config_to_ECU: 8 TCM + SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" ECU + SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" ECU + CM_ SG_ 2150629377 Debug "Essentially a print statement up to 8 bytes long that whichever targeted can parse"; CM_ SG_ 2150629889 Timestamp "Time in millis"; CM_ SG_ 2150629890 Timestamp "Time in millis"; @@ -489,6 +509,14 @@ CM_ SG_ 2149582080 RL_Wheel_RPM "RL Wheel RPM"; CM_ SG_ 2149582080 RR_Wheel_RPM "RR Wheel RPM"; CM_ SG_ 2149582080 Relay_States "[Byte 4 / Bits 32-39] 0: BMS OK 1: IMD OK 2: BSPD OK 3: Software OK 4-7: Reserved"; CM_ SG_ 2149581316 Timestamp "Time in millis"; +CM_ SG_ 2149585412 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2149585412 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2161115137 Debug "Essentially a print statement up to 8 bytes long that whichever targeted can parse"; CM_ SG_ 2161115649 Timestamp "Time in millis"; CM_ SG_ 2161115650 Timestamp "Time in millis"; @@ -520,6 +548,14 @@ CM_ SG_ 2155877634 Motor_Temp "Celsius + 40, uint8_t"; CM_ SG_ 2155877634 fault_bits "TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or timeout"; CM_ SG_ 2151678465 Timestamp "Time in millis"; CM_ SG_ 2151678466 Timestamp "Time in millis"; +CM_ SG_ 2151682562 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2151682562 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; BA_DEF_ "BusType" STRING ; BA_DEF_ BO_ "VFrameFormat" ENUM "StandardCAN","ExtendedCAN","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","StandardCAN_FD","ExtendedCAN_FD"; BA_DEF_DEF_ "BusType" "CAN"; @@ -581,6 +617,7 @@ BA_ "VFrameFormat" BO_ 2149581568 1; BA_ "VFrameFormat" BO_ 2149581824 1; BA_ "VFrameFormat" BO_ 2149582080 1; BA_ "VFrameFormat" BO_ 2149581316 1; +BA_ "VFrameFormat" BO_ 2149585412 1; BA_ "VFrameFormat" BO_ 2161115137 1; BA_ "VFrameFormat" BO_ 2161115649 1; BA_ "VFrameFormat" BO_ 2161115650 1; @@ -601,4 +638,5 @@ BA_ "VFrameFormat" BO_ 2155877378 1; BA_ "VFrameFormat" BO_ 2155877634 1; BA_ "VFrameFormat" BO_ 2151678465 1; BA_ "VFrameFormat" BO_ 2151678466 1; +BA_ "VFrameFormat" BO_ 2151682562 1; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index 8c5b25314..d6208e26d 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -335,79 +335,6 @@ typedef struct { uint8_t led_latch_flags; } GRCAN_DASH_CONFIG_MSG; -/** TCM Status */ -typedef struct { - /** [Byte 0 / Bits 0-7] -0: Connection Status -1: MQTT Status -2: Epic Shelter Status -3: Camera Status -4-7: Reserved (Byte 0) */ - uint8_t status_bits; - /** Mapache ping (upload) (Byte 1) */ - uint16_t mapache_ping; - /** # of messages on cache (non-synced) (Byte 3) */ - uint32_t cache_size; - /** Byte 7 (Byte 7) */ - uint8_t reserved; -} GRCAN_TCM_STATUS_MSG; - -/** TCM Resource Utilization */ -typedef struct { - /** core 0 frequency in MHz (Byte 0) */ - uint16_t cpu_0_freq; - /** core 0 utilization in % (Byte 2) */ - uint8_t cpu_0_util; - /** core 1 frequency in MHz (Byte 3) */ - uint16_t cpu_1_freq; - /** core 1 utilization in % (Byte 5) */ - uint8_t cpu_1_util; - /** core 2 frequency in MHz (Byte 6) */ - uint16_t cpu_2_freq; - /** core 2 utilization in % (Byte 8) */ - uint8_t cpu_2_util; - /** core 3 frequency in MHz (Byte 9) */ - uint16_t cpu_3_freq; - /** core 3 utilization in % (Byte 11) */ - uint8_t cpu_3_util; - /** core 4 frequency in MHz (Byte 12) */ - uint16_t cpu_4_freq; - /** core 4 utilization in % (Byte 14) */ - uint8_t cpu_4_util; - /** core 5 frequency in MHz (Byte 15) */ - uint16_t cpu_5_freq; - /** core 5 utilization in % (Byte 17) */ - uint8_t cpu_5_util; - /** total cpu utilization in % (Byte 18) */ - uint8_t cpu_total_util; - /** total memory in MB (Byte 19) */ - uint16_t ram_total; - /** used memory in MB (Byte 21) */ - uint16_t ram_used; - /** memory utilization in % (Byte 23) */ - uint8_t ram_util; - /** gpu utilization in % (Byte 24) */ - uint8_t gpu_util; - /** gpu frequency in MHz (Byte 25) */ - uint16_t gpu_freq; - /** total disk space in MB (Byte 27) */ - uint32_t disk_total; - /** used disk space in MB (Byte 31) */ - uint32_t disk_used; - /** disk utilization in % (Byte 35) */ - uint8_t disk_util; - /** cpu temp in ˚C (Byte 36) */ - uint8_t cpu_temp; - /** gpu temp in ˚C (Byte 37) */ - uint8_t gpu_temp; - /** voltage draw in mV (Byte 38) */ - uint16_t voltage_draw; - /** current draw in mA (Byte 40) */ - uint16_t current_draw; - /** power draw in mW (Byte 42) */ - uint16_t power_draw; -} GRCAN_TCM_RESOURCE_UTILIZATION_MSG; - /** ECU Analog Data */ typedef struct { /** 4-20 mA signal (Byte 0) */ @@ -2256,4 +2183,24 @@ typedef struct { uint8_t reserved; } GRCAN_INBOARDFLOOR_IMU_TOF_DATA_MSG; +/** ECU Config */ +typedef struct { + /** Delay for which to consider pings timed out (Byte 0) */ + uint8_t ping_timeout_delay; + /** Minimum brake f psi for which to consider the brakes pressed (Byte 1) */ + uint8_t brake_f_minimum; + /** Minimum brake r psi for which to consider the brakes pressed (Byte 2) */ + uint8_t brake_r_minimum; + /** Minimum brake bse psi for which to consider the brakes pressed (Byte 3) */ + uint8_t brake_bse_minimum; + /** Minimum value that the APPS 1 sensor is expected to read (Byte 4) */ + uint8_t apps_1_min; + /** Minimum value that the APPS 2 sensor is expected to read (Byte 5) */ + uint8_t apps_2_min; + /** Maximum value that the APPS 1 sensor is expected to read (Byte 6) */ + uint8_t apps_1_max; + /** Maximum value that the APPS 2 sensor is expected to read (Byte 7) */ + uint8_t apps_2_max; +} GRCAN_ECU_CONFIG_MSG; + #endif diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index f08a20273..aa6044ec8 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -20,6 +20,7 @@ typedef enum { GRCAN_ACU_CELL_DATA_3 = 0x00F, GRCAN_ACU_CELL_DATA_4 = 0x010, GRCAN_ACU_CELL_DATA_5 = 0x011, + GRCAN_ECU_CONFIG = 0x012, GRCAN_INV_STATUS_1 = 0x013, GRCAN_INV_STATUS_2 = 0x014, GRCAN_INV_STATUS_3 = 0x015, @@ -29,8 +30,6 @@ typedef enum { GRCAN_FAN_CMD = 0x019, GRCAN_DASH_STATUS = 0x01A, GRCAN_DASH_CONFIG = 0x01B, - GRCAN_TCM_STATUS = 0x029, - GRCAN_TCM_RESOURCE_UTILIZATION = 0x02A, GRCAN_ECU_PINGING_RTT = 0x2D, GRCAN_ECU_ANALOG_DATA = 0x02E, GRCAN_UVW_DGPS = 0x030, From 97d6bead8b525827cac3f70f968cc8b1cf78d4b8 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 03:45:18 -0700 Subject: [PATCH 44/85] Fix brake pedal travel canfigurator name Signed-off-by: Daniel Hansen --- ECU/Application/Src/CANutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 67e9beed4..4fbeb224c 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -141,7 +141,7 @@ void SendECUAnalogDataOverCAN(ECU_StateData *stateData) .steering_angle_signal = stateData->steering_angle_signal, .aux_signal = stateData->aux_signal, .acc_pedal_travel = CalcAccPedalTravel(stateData) * 65535, - .brake_pedal_travel = CalcBrakePressure(stateData)}; + .brake_pedal_pressure = CalcBrakePressure(stateData)}; ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_ANALOG_DATA, &message, sizeof(message)); last_can_tcm_request_millis = millis_since_boot; } From 3c08a1049723acd01d0f3f5954c4feaf3dc14910 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:16:06 -0700 Subject: [PATCH 45/85] Add more fields to ECU Config Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 88 +++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index acd6ee446..8f9fc3d2e 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -165,7 +165,6 @@ routing: - msg: ECU Status 3 TCM: - msg: Ping - - msg: ECU Config Data: Debugger: - msg: Debug FD @@ -173,6 +172,7 @@ routing: TCM: - msg: ECU Analog Data - msg: ECU Pinging RTT + - msg: ECU Config ALL: - msg: Ping EM: @@ -245,8 +245,9 @@ routing: - msg: Ping ECU: - msg: Ping - - msg: ECU Config Data: + ECU: + - msg: ECU Config Debugger: - msg: Ping CCU: @@ -8756,7 +8757,7 @@ Message ID: data type: u8 ECU Config: MSG ID: 0x012 - MSG LENGTH: 8 + MSG LENGTH: 20 Ping Timeout Delay: bit_start: 0 comment: Delay for which to consider pings timed out @@ -8821,6 +8822,87 @@ Message ID: scaled min: 0 scaled max: 2550 map equation: "10x" + APPS Deadzone: + bit_start: 64 + comment: Percentage deadzone of the APPS for which to not consider the pedals to have traveled + data type: u8 + units: % + scaled min: 0 + scaled max: 100 + map equation: "x/25.5" + BMS Minimum Threshold: + bit_start: 72 + comment: Minimum acceptable BMS sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + BMS Maximum Threshold: + bit_start: 80 + comment: Maximum acceptable BMS sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + IMD Minimum Threshold: + bit_start: 88 + comment: Minimum acceptable IMD sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + IMD Maximum Threshold: + bit_start: 96 + comment: Maximum acceptable IMD sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + BSPD Minimum Threshold: + bit_start: 104 + comment: Minimum acceptable BSPD sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + BSPD Maximum Threshold: + bit_start: 112 + comment: Maximum acceptable BSPD sense value such that the BMS is not considered in failure + data type: u8 + units: V + scaled min: 0 + scaled max: 12.75 + map equation: "x/20" + Max Precharge Time: + bit_start: 120 + comment: Maximum acceptable time to remain precharging before discharging + data type: u8 + units: ms + scaled min: 0 + scaled max: 255 + map equation: "x" + Regen Strength: + bit_start: 128 + comment: TBD + data type: u8 + units: Ratio + scaled min: 0 + scaled max: 25.5 + map equation: "x/10" + Enable Regen: + bit_start: 136 + comment: Enable or disable regenerative braking + data type: b + units: Bool + Reserved: + bit_start: 144 + comment: Reserved + data type: u16 Custom CAN ID: DTI Control 1: From a2237e138a35608aabf714b60ccba82af6987f49 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 18:16:28 +0000 Subject: [PATCH 46/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Data.dbc | 78 +++++++++++++++++++++++++++++++ Autogen/CAN/Doc/GRCAN_Primary.dbc | 38 --------------- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 22 +++++++++ 3 files changed, 100 insertions(+), 38 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Data.dbc b/Autogen/CAN/Doc/GRCAN_Data.dbc index d3b065369..088f4a539 100644 --- a/Autogen/CAN/Doc/GRCAN_Data.dbc +++ b/Autogen/CAN/Doc/GRCAN_Data.dbc @@ -435,9 +435,49 @@ BO_ 2149592324 ECU_ECU_Pinging_RTT_to_TCM: 24 ECU SG_ Brake_Temp_RR_RTT : 176|8@1+ (1,0) [0|0] "ms" TCM SG_ DGPS_RTT : 184|8@1+ (1,0) [0|0] "ms" TCM +BO_ 2149585412 ECU_ECU_Config_to_TCM: 20 ECU + SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" TCM + SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" TCM + SG_ APPS_Deadzone : 64|8@1+ (0.0392156863,0) [0|100] "%" TCM + SG_ BMS_Minimum_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BMS_Maximum_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ IMD_Minimum_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ IMD_Maximum_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BSPD_Minimum_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BSPD_Maximum_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" TCM + SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" TCM + SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" TCM + BO_ 2149581312 ECU_Ping_to_ALL: 4 ECU SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ALL +BO_ 2151682562 TCM_ECU_Config_to_ECU: 20 TCM + SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" ECU + SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" ECU + SG_ APPS_Deadzone : 64|8@1+ (0.0392156863,0) [0|100] "%" ECU + SG_ BMS_Minimum_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BMS_Maximum_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ IMD_Minimum_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ IMD_Maximum_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BSPD_Minimum_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BSPD_Maximum_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" ECU + SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" ECU + SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" ECU + BO_ 2151678465 TCM_Ping_to_Debugger: 4 TCM SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Debugger @@ -4306,7 +4346,43 @@ CM_ SG_ 2149592324 Brake_Temp_FR_RTT "Round trip time"; CM_ SG_ 2149592324 Brake_Temp_RL_RTT "Round trip time"; CM_ SG_ 2149592324 Brake_Temp_RR_RTT "Round trip time"; CM_ SG_ 2149592324 DGPS_RTT "Round trip time"; +CM_ SG_ 2149585412 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2149585412 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2149585412 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; +CM_ SG_ 2149585412 BMS_Minimum_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BMS_Maximum_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 IMD_Minimum_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 IMD_Maximum_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BSPD_Minimum_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BSPD_Maximum_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; +CM_ SG_ 2149585412 Regen_Strength "TBD"; +CM_ SG_ 2149585412 Enable_Regen "Enable or disable regenerative braking"; CM_ SG_ 2149581312 Timestamp "Time in millis"; +CM_ SG_ 2151682562 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2151682562 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2151682562 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; +CM_ SG_ 2151682562 BMS_Minimum_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BMS_Maximum_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 IMD_Minimum_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 IMD_Maximum_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BSPD_Minimum_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BSPD_Maximum_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; +CM_ SG_ 2151682562 Regen_Strength "TBD"; +CM_ SG_ 2151682562 Enable_Regen "Enable or disable regenerative braking"; CM_ SG_ 2151678465 Timestamp "Time in millis"; CM_ SG_ 2181038594 Timestamp "Time in millis"; CM_ SG_ 2181051140 ALT "altitude"; @@ -7551,7 +7627,9 @@ BA_ "VFrameFormat" BO_ 2149581057 15; BA_ "VFrameFormat" BO_ 2149581313 15; BA_ "VFrameFormat" BO_ 2149592580 15; BA_ "VFrameFormat" BO_ 2149592324 15; +BA_ "VFrameFormat" BO_ 2149585412 15; BA_ "VFrameFormat" BO_ 2149581312 15; +BA_ "VFrameFormat" BO_ 2151682562 15; BA_ "VFrameFormat" BO_ 2151678465 15; BA_ "VFrameFormat" BO_ 2181038594 15; BA_ "VFrameFormat" BO_ 2181051140 15; diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index 1e26aea37..348150a68 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -293,16 +293,6 @@ BO_ 2149582080 ECU_ECU_Status_3_to_ALL: 5 ECU BO_ 2149581316 ECU_Ping_to_TCM: 4 ECU SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" TCM -BO_ 2149585412 ECU_ECU_Config_to_TCM: 8 ECU - SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" TCM - SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" TCM - SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" TCM - SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" TCM - SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" TCM - SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" TCM - SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" TCM - SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" TCM - BO_ 2161115137 Fan_Ctrl_1_Debug_2_0_to_Debugger: 8 Fan_Ctrl_1 SG_ Debug : 0|64@1- (1,0) [0|0] "" Debugger @@ -374,16 +364,6 @@ BO_ 2151678465 TCM_Ping_to_Debugger: 4 TCM BO_ 2151678466 TCM_Ping_to_ECU: 4 TCM SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ECU -BO_ 2151682562 TCM_ECU_Config_to_ECU: 8 TCM - SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" ECU - SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" ECU - SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" ECU - SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" ECU - SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" ECU - SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" ECU - SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" ECU - SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" ECU - CM_ SG_ 2150629377 Debug "Essentially a print statement up to 8 bytes long that whichever targeted can parse"; CM_ SG_ 2150629889 Timestamp "Time in millis"; CM_ SG_ 2150629890 Timestamp "Time in millis"; @@ -509,14 +489,6 @@ CM_ SG_ 2149582080 RL_Wheel_RPM "RL Wheel RPM"; CM_ SG_ 2149582080 RR_Wheel_RPM "RR Wheel RPM"; CM_ SG_ 2149582080 Relay_States "[Byte 4 / Bits 32-39] 0: BMS OK 1: IMD OK 2: BSPD OK 3: Software OK 4-7: Reserved"; CM_ SG_ 2149581316 Timestamp "Time in millis"; -CM_ SG_ 2149585412 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2149585412 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2161115137 Debug "Essentially a print statement up to 8 bytes long that whichever targeted can parse"; CM_ SG_ 2161115649 Timestamp "Time in millis"; CM_ SG_ 2161115650 Timestamp "Time in millis"; @@ -548,14 +520,6 @@ CM_ SG_ 2155877634 Motor_Temp "Celsius + 40, uint8_t"; CM_ SG_ 2155877634 fault_bits "TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or timeout"; CM_ SG_ 2151678465 Timestamp "Time in millis"; CM_ SG_ 2151678466 Timestamp "Time in millis"; -CM_ SG_ 2151682562 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2151682562 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; BA_DEF_ "BusType" STRING ; BA_DEF_ BO_ "VFrameFormat" ENUM "StandardCAN","ExtendedCAN","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","reserved","StandardCAN_FD","ExtendedCAN_FD"; BA_DEF_DEF_ "BusType" "CAN"; @@ -617,7 +581,6 @@ BA_ "VFrameFormat" BO_ 2149581568 1; BA_ "VFrameFormat" BO_ 2149581824 1; BA_ "VFrameFormat" BO_ 2149582080 1; BA_ "VFrameFormat" BO_ 2149581316 1; -BA_ "VFrameFormat" BO_ 2149585412 1; BA_ "VFrameFormat" BO_ 2161115137 1; BA_ "VFrameFormat" BO_ 2161115649 1; BA_ "VFrameFormat" BO_ 2161115650 1; @@ -638,5 +601,4 @@ BA_ "VFrameFormat" BO_ 2155877378 1; BA_ "VFrameFormat" BO_ 2155877634 1; BA_ "VFrameFormat" BO_ 2151678465 1; BA_ "VFrameFormat" BO_ 2151678466 1; -BA_ "VFrameFormat" BO_ 2151682562 1; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index d6208e26d..be274fde0 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -2201,6 +2201,28 @@ typedef struct { uint8_t apps_1_max; /** Maximum value that the APPS 2 sensor is expected to read (Byte 7) */ uint8_t apps_2_max; + /** Percentage deadzone of the APPS for which to not consider the pedals to have traveled (Byte 8) */ + uint8_t apps_deadzone; + /** Minimum acceptable BMS sense value such that the BMS is not considered in failure (Byte 9) */ + uint8_t bms_minimum_threshold; + /** Maximum acceptable BMS sense value such that the BMS is not considered in failure (Byte 10) */ + uint8_t bms_maximum_threshold; + /** Minimum acceptable IMD sense value such that the BMS is not considered in failure (Byte 11) */ + uint8_t imd_minimum_threshold; + /** Maximum acceptable IMD sense value such that the BMS is not considered in failure (Byte 12) */ + uint8_t imd_maximum_threshold; + /** Minimum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 13) */ + uint8_t bspd_minimum_threshold; + /** Maximum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 14) */ + uint8_t bspd_maximum_threshold; + /** Maximum acceptable time to remain precharging before discharging (Byte 15) */ + uint8_t max_precharge_time; + /** TBD (Byte 16) */ + uint8_t regen_strength; + /** Enable or disable regenerative braking (Byte 17) */ + uint8_t enable_regen; + /** Reserved (Byte 18) */ + uint16_t reserved; } GRCAN_ECU_CONFIG_MSG; #endif From 6925b1b2e00f1a4cf8a95ceaa5b41b55dcac219f Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:18:51 -0700 Subject: [PATCH 47/85] Rename min/max to be shorter in cando --- Autogen/CAN/Doc/GRCAN.CANdo | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 8f9fc3d2e..395fa6991 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -8766,7 +8766,7 @@ Message ID: scaled min: 0 scaled max: 2550 map equation: "10x" - Brake F Minimum: + Brake F Min: bit_start: 8 comment: Minimum brake f psi for which to consider the brakes pressed data type: u8 @@ -8774,7 +8774,7 @@ Message ID: scaled min: 0 scaled max: 6375 map equation: "25x" - Brake R Minimum: + Brake R Min: bit_start: 16 comment: Minimum brake r psi for which to consider the brakes pressed data type: u8 @@ -8782,7 +8782,7 @@ Message ID: scaled min: 0 scaled max: 6375 map equation: "25x" - Brake BSE Minimum: + Brake BSE Min: bit_start: 24 comment: Minimum brake bse psi for which to consider the brakes pressed data type: u8 @@ -8830,7 +8830,7 @@ Message ID: scaled min: 0 scaled max: 100 map equation: "x/25.5" - BMS Minimum Threshold: + BMS Min Threshold: bit_start: 72 comment: Minimum acceptable BMS sense value such that the BMS is not considered in failure data type: u8 @@ -8838,7 +8838,7 @@ Message ID: scaled min: 0 scaled max: 12.75 map equation: "x/20" - BMS Maximum Threshold: + BMS Max Threshold: bit_start: 80 comment: Maximum acceptable BMS sense value such that the BMS is not considered in failure data type: u8 @@ -8846,7 +8846,7 @@ Message ID: scaled min: 0 scaled max: 12.75 map equation: "x/20" - IMD Minimum Threshold: + IMD Min Threshold: bit_start: 88 comment: Minimum acceptable IMD sense value such that the BMS is not considered in failure data type: u8 @@ -8854,7 +8854,7 @@ Message ID: scaled min: 0 scaled max: 12.75 map equation: "x/20" - IMD Maximum Threshold: + IMD Max Threshold: bit_start: 96 comment: Maximum acceptable IMD sense value such that the BMS is not considered in failure data type: u8 @@ -8862,7 +8862,7 @@ Message ID: scaled min: 0 scaled max: 12.75 map equation: "x/20" - BSPD Minimum Threshold: + BSPD Min Threshold: bit_start: 104 comment: Minimum acceptable BSPD sense value such that the BMS is not considered in failure data type: u8 @@ -8870,7 +8870,7 @@ Message ID: scaled min: 0 scaled max: 12.75 map equation: "x/20" - BSPD Maximum Threshold: + BSPD Max Threshold: bit_start: 112 comment: Maximum acceptable BSPD sense value such that the BMS is not considered in failure data type: u8 From 43ec4930fbdddb986a69294894651d44d7094446 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 18:19:32 +0000 Subject: [PATCH 48/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Data.dbc | 72 ++++++++++++++++---------------- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 18 ++++---- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Data.dbc b/Autogen/CAN/Doc/GRCAN_Data.dbc index 088f4a539..3f5b907e7 100644 --- a/Autogen/CAN/Doc/GRCAN_Data.dbc +++ b/Autogen/CAN/Doc/GRCAN_Data.dbc @@ -437,20 +437,20 @@ BO_ 2149592324 ECU_ECU_Pinging_RTT_to_TCM: 24 ECU BO_ 2149585412 ECU_ECU_Config_to_TCM: 20 ECU SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" TCM - SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" TCM - SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" TCM - SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_F_Min : 8|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_R_Min : 16|8@1+ (25,0) [0|6375] "PSI" TCM + SG_ Brake_BSE_Min : 24|8@1+ (25,0) [0|6375] "PSI" TCM SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" TCM SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" TCM SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" TCM SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" TCM SG_ APPS_Deadzone : 64|8@1+ (0.0392156863,0) [0|100] "%" TCM - SG_ BMS_Minimum_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ BMS_Maximum_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ IMD_Minimum_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ IMD_Maximum_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ BSPD_Minimum_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ BSPD_Maximum_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BMS_Min_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BMS_Max_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ IMD_Min_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ IMD_Max_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BSPD_Min_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" TCM + SG_ BSPD_Max_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" TCM SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" TCM SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" TCM SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" TCM @@ -460,20 +460,20 @@ BO_ 2149581312 ECU_Ping_to_ALL: 4 ECU BO_ 2151682562 TCM_ECU_Config_to_ECU: 20 TCM SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" ECU - SG_ Brake_F_Minimum : 8|8@1+ (25,0) [0|6375] "PSI" ECU - SG_ Brake_R_Minimum : 16|8@1+ (25,0) [0|6375] "PSI" ECU - SG_ Brake_BSE_Minimum : 24|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_F_Min : 8|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_R_Min : 16|8@1+ (25,0) [0|6375] "PSI" ECU + SG_ Brake_BSE_Min : 24|8@1+ (25,0) [0|6375] "PSI" ECU SG_ APPS_1_Min : 32|8@1+ (10,0) [0|2550] "ADC" ECU SG_ APPS_2_Min : 40|8@1+ (10,0) [0|2550] "ADC" ECU SG_ APPS_1_Max : 48|8@1+ (10,0) [0|2550] "ADC" ECU SG_ APPS_2_Max : 56|8@1+ (10,0) [0|2550] "ADC" ECU SG_ APPS_Deadzone : 64|8@1+ (0.0392156863,0) [0|100] "%" ECU - SG_ BMS_Minimum_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ BMS_Maximum_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ IMD_Minimum_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ IMD_Maximum_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ BSPD_Minimum_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ BSPD_Maximum_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BMS_Min_Threshold : 72|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BMS_Max_Threshold : 80|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ IMD_Min_Threshold : 88|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ IMD_Max_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BSPD_Min_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" ECU + SG_ BSPD_Max_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" ECU SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" ECU SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" ECU SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" ECU @@ -4347,39 +4347,39 @@ CM_ SG_ 2149592324 Brake_Temp_RL_RTT "Round trip time"; CM_ SG_ 2149592324 Brake_Temp_RR_RTT "Round trip time"; CM_ SG_ 2149592324 DGPS_RTT "Round trip time"; CM_ SG_ 2149585412 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2149585412 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2149585412 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; CM_ SG_ 2149585412 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; CM_ SG_ 2149585412 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2149585412 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; CM_ SG_ 2149585412 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2149585412 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; -CM_ SG_ 2149585412 BMS_Minimum_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BMS_Maximum_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 IMD_Minimum_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 IMD_Maximum_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BSPD_Minimum_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BSPD_Maximum_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149585412 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; CM_ SG_ 2149585412 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; CM_ SG_ 2149585412 Regen_Strength "TBD"; CM_ SG_ 2149585412 Enable_Regen "Enable or disable regenerative braking"; CM_ SG_ 2149581312 Timestamp "Time in millis"; CM_ SG_ 2151682562 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2151682562 Brake_F_Minimum "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_R_Minimum "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_BSE_Minimum "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2151682562 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; CM_ SG_ 2151682562 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; CM_ SG_ 2151682562 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2151682562 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; CM_ SG_ 2151682562 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; CM_ SG_ 2151682562 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; -CM_ SG_ 2151682562 BMS_Minimum_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BMS_Maximum_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 IMD_Minimum_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 IMD_Maximum_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BSPD_Minimum_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BSPD_Maximum_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151682562 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; CM_ SG_ 2151682562 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; CM_ SG_ 2151682562 Regen_Strength "TBD"; CM_ SG_ 2151682562 Enable_Regen "Enable or disable regenerative braking"; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index be274fde0..40952bad9 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -2188,11 +2188,11 @@ typedef struct { /** Delay for which to consider pings timed out (Byte 0) */ uint8_t ping_timeout_delay; /** Minimum brake f psi for which to consider the brakes pressed (Byte 1) */ - uint8_t brake_f_minimum; + uint8_t brake_f_min; /** Minimum brake r psi for which to consider the brakes pressed (Byte 2) */ - uint8_t brake_r_minimum; + uint8_t brake_r_min; /** Minimum brake bse psi for which to consider the brakes pressed (Byte 3) */ - uint8_t brake_bse_minimum; + uint8_t brake_bse_min; /** Minimum value that the APPS 1 sensor is expected to read (Byte 4) */ uint8_t apps_1_min; /** Minimum value that the APPS 2 sensor is expected to read (Byte 5) */ @@ -2204,17 +2204,17 @@ typedef struct { /** Percentage deadzone of the APPS for which to not consider the pedals to have traveled (Byte 8) */ uint8_t apps_deadzone; /** Minimum acceptable BMS sense value such that the BMS is not considered in failure (Byte 9) */ - uint8_t bms_minimum_threshold; + uint8_t bms_min_threshold; /** Maximum acceptable BMS sense value such that the BMS is not considered in failure (Byte 10) */ - uint8_t bms_maximum_threshold; + uint8_t bms_max_threshold; /** Minimum acceptable IMD sense value such that the BMS is not considered in failure (Byte 11) */ - uint8_t imd_minimum_threshold; + uint8_t imd_min_threshold; /** Maximum acceptable IMD sense value such that the BMS is not considered in failure (Byte 12) */ - uint8_t imd_maximum_threshold; + uint8_t imd_max_threshold; /** Minimum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 13) */ - uint8_t bspd_minimum_threshold; + uint8_t bspd_min_threshold; /** Maximum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 14) */ - uint8_t bspd_maximum_threshold; + uint8_t bspd_max_threshold; /** Maximum acceptable time to remain precharging before discharging (Byte 15) */ uint8_t max_precharge_time; /** TBD (Byte 16) */ From 6d7915adbf11854ff92753cca822feb4612f7426 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:50:33 -0700 Subject: [PATCH 49/85] Fix scaling for max precharge time Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 395fa6991..38b02620b 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -8884,8 +8884,8 @@ Message ID: data type: u8 units: ms scaled min: 0 - scaled max: 255 - map equation: "x" + scaled max: 2550 + map equation: "10x" Regen Strength: bit_start: 128 comment: TBD From d045b5a76fb6697d8149dcd924bb8b1eedcd630f Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:51:17 -0700 Subject: [PATCH 50/85] Remove unneded extern Signed-off-by: Daniel Hansen --- ECU/Core/Inc/stm32g4xx_it.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Core/Inc/stm32g4xx_it.h b/ECU/Core/Inc/stm32g4xx_it.h index 3ae674261..e08bcd52a 100644 --- a/ECU/Core/Inc/stm32g4xx_it.h +++ b/ECU/Core/Inc/stm32g4xx_it.h @@ -56,7 +56,7 @@ void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); /* USER CODE BEGIN EFP */ -extern ECU_StateData stateLump; + /* USER CODE END EFP */ #ifdef __cplusplus From 1ffec3dafc835a22fdf9e5e443e1626b730ccb62 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:51:44 -0700 Subject: [PATCH 51/85] Remove unused CANdler callbacks and add ecu config Signed-off-by: Daniel Hansen --- ECU/Application/Inc/StateData.h | 23 ++++++++++++++ ECU/Application/Src/CANdler.c | 56 +++++++++++++-------------------- 2 files changed, 44 insertions(+), 35 deletions(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 1b74d0c27..048629cda 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -50,6 +50,16 @@ typedef union { typedef volatile struct ECU_StateData { + float apps_deadzone; + float bms_min_thresh; + float bms_max_thresh; + float imd_min_thresh; + float imd_max_thresh; + float bspd_min_thresh; + float bspd_max_thresh; + + float regen_strength; + // TODO: Remove unneeded states float min_amk_heat_cap_throttle_percent; @@ -80,6 +90,16 @@ typedef volatile struct ECU_StateData { uint16_t Brake_F_Signal; uint16_t aux_signal; uint16_t steering_angle_signal; + uint16_t ping_timeout_delay_ms; + uint16_t brake_f_min; + uint16_t brake_r_min; + uint16_t brake_bse_min; + uint16_t apps_1_min; + uint16_t apps_2_min; + uint16_t apps_1_max; + uint16_t apps_2_max; + uint16_t max_precharge_time_ms; + uint8_t status_bits[3]; int8_t ping_block[3]; /** Node timeout status bits (1=OK, 0=Timeout) */ @@ -90,6 +110,7 @@ typedef volatile struct ECU_StateData { uint8_t glv_soc; uint8_t acu_error_warning_bits; uint8_t inverter_fault_map; + bool ts_active_button_press_interrupt; bool ts_active_button_pressed; bool rtd_button_press_interrupt; @@ -102,6 +123,8 @@ typedef volatile struct ECU_StateData { bool imd_light; bool tssi_fault; + bool enable_regen; + bool apps_bse_violation; GR_ECU_State ecu_state; diff --git a/ECU/Application/Src/CANdler.c b/ECU/Application/Src/CANdler.c index 8ef9e85fc..011611071 100644 --- a/ECU/Application/Src/CANdler.c +++ b/ECU/Application/Src/CANdler.c @@ -12,8 +12,6 @@ #define WHEEL_RPM_TO_MPH_RATIO 0.0476f -extern ECU_StateData stateLump; - void ReportBadMessageLength(GRCAN_BUS_ID bus_id, GRCAN_MSG_ID msg_id, GRCAN_NODE_ID sender_id) { // TODO Ideally change some state data to note a bad message, ie if ACU @@ -125,45 +123,33 @@ void ECU_CAN_MessageHandler(ECU_StateData *state_data, GRCAN_BUS_ID bus_id, GRCA break; - case GRCAN_ECU_ANALOG_DATA: - if (data_length != sizeof(GRCAN_ECU_ANALOG_DATA_MSG)) { + case GRCAN_ECU_CONFIG: + if (data_length != sizeof(GRCAN_ECU_CONFIG_MSG)) { ReportBadMessageLength(bus_id, msg_id, sender_id); break; } - GRCAN_ECU_ANALOG_DATA_MSG *analog_data = (GRCAN_ECU_ANALOG_DATA_MSG *)data; - state_data->bspd_signal = analog_data->bspd_signal; - state_data->bse_signal = analog_data->bse_signal; - state_data->APPS1_Signal = analog_data->apps_1_signal; - state_data->APPS2_Signal = analog_data->apps_2_signal; - state_data->Brake_F_Signal = analog_data->brakeline_f_signal; - state_data->Brake_R_Signal = analog_data->brakeline_r_signal; - state_data->steering_angle_signal = analog_data->steering_angle_signal; - state_data->aux_signal = analog_data->aux_signal; - break; + GRCAN_ECU_CONFIG_MSG *ecu_config = (GRCAN_ECU_CONFIG_MSG *)data; + state_data->ping_timeout_delay_ms = ecu_config->ping_timeout_delay * 10; + state_data->brake_f_min = ecu_config->brake_f_min * 25; + state_data->brake_r_min = ecu_config->brake_r_min * 25; + state_data->brake_bse_min = ecu_config->brake_bse_min * 25; + state_data->apps_1_min = ecu_config->apps_1_min * 10; + state_data->apps_2_min = ecu_config->apps_2_min * 10; + state_data->apps_1_max = ecu_config->apps_1_max * 10; + state_data->apps_2_max = ecu_config->apps_2_max * 10; + state_data->apps_deadzone = ecu_config->apps_deadzone / 25.5f; + state_data->bms_min_thresh = ecu_config->bms_min_threshold / 20.0f; + state_data->bms_max_thresh = ecu_config->bms_max_threshold / 20.0f; + state_data->imd_min_thresh = ecu_config->imd_min_threshold / 20.0f; + state_data->imd_max_thresh = ecu_config->imd_max_threshold / 20.0f; + state_data->bspd_min_thresh = ecu_config->bspd_min_threshold / 20.0f; + state_data->bspd_max_thresh = ecu_config->bspd_max_threshold / 20.0f; + state_data->max_precharge_time_ms = ecu_config->max_precharge_time; + state_data->regen_strength = ecu_config->regen_strength / 10.0f; + state_data->enable_regen = ecu_config->enable_regen; - /* - case GRCAN_STEERING_STATUS: - if (data_length != sizeof(GRCAN_STEERING_STATUS_MSG)) { - ReportBadMessageLength(bus_id, msg_id, sender_id); - break; - } - GRCAN_STEERING_STATUS_MSG *steering_status = (GRCAN_STEERING_STATUS_MSG *)data; - state_data->powerlevel_torquemap = steering_status->encoder_bits; break; - */ - // TODO: fix when sensors done - /* - case GRCAN_SAM_REAR_WHEELSPEED: - if (data_length != sizeof(GRCAN_SAM_REAR_WHEELSPEED_MSG)) { - ReportBadMessageLength(bus_id, msg_id, sender_id); - break; - } - GRCAN_SAM_REAR_WHEELSPEED_MSG *encoder_status = (GRCAN_SAM_REAR_WHEELSPEED_MSG *)data; - state_data->rr_wheel_rpm = encoder_status->wheel_speed * 0.1 - 32768; // TODO: find out which wheel this actually measures: one or 4 sensors? - state_data->vehicle_speed_mph = state_data->rr_wheel_rpm * WHEEL_RPM_TO_MPH_RATIO; - break; - */ default: ReportUnhandledMessage(bus_id, msg_id, sender_id); break; From 1637e9e37ce9ea9b3ab5dc2f74e464f9ebcbf4c2 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:52:17 -0700 Subject: [PATCH 52/85] Copy init values for ecu config things into state lump Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 3e992d19c..66e7dd2d2 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -34,7 +34,32 @@ ECU_StateData stateLump = { // Startup at minimum power .powerlevel = 0, // See CANdo specification - .torquemap = 1}; + .torquemap = 1, + // APPS Deadzone + .apps_deadzone = 0.08f, + // BMS thresholds + .bms_min_thresh = 0.5f, + .bms_max_thresh = 1.6f, + // IMD thresholds + .imd_min_thresh = 0.5f, + .imd_max_thresh = 1.6f, + // BSPD thresholds + .bspd_min_thresh = 0.6f, + .bspd_max_thresh = 1.35f, + // Timings + .ping_timeout_delay_ms = 250, + .max_precharge_time_ms = 8000, + // Pedals + .brake_f_min = 700, + .brake_r_min = 0, + .brake_bse_min = 720, + .apps_1_min = 2375, + .apps_2_min = 2430, + .apps_1_max = 1897, + .apps_2_max = 1926, + // Regen + .regen_strength = 2, + .enable_regen = false }; static uint32_t millis_since_boot; void ECU_State_Tick(void) From 93adf100bbbe7677f742177ab779ace0f3710581 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 11:54:04 -0700 Subject: [PATCH 53/85] Create `SendECUConfigOverCAN` and add more const-ness Signed-off-by: Daniel Hansen --- ECU/Application/Inc/CANutils.h | 6 +++--- ECU/Application/Src/CANutils.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ECU/Application/Inc/CANutils.h b/ECU/Application/Inc/CANutils.h index b29172ef9..ebe084970 100644 --- a/ECU/Application/Inc/CANutils.h +++ b/ECU/Application/Inc/CANutils.h @@ -12,7 +12,7 @@ #define ECU_STATE_DATA_SEND_INTERVAL_MS 20 void ECU_CAN_Send(GRCAN_BUS_ID bus, GRCAN_NODE_ID destNode, GRCAN_MSG_ID messageID, void *data, uint32_t size); void ECU_CAN_Send_DTI(GRCAN_CUSTOM_ID msgID, void *data, uint32_t size); -void SendECUStateDataOverCAN(ECU_StateData *stateData); -void SendECUAnalogDataOverCAN(ECU_StateData *stateData); - +void SendECUStateDataOverCAN(const ECU_StateData *stateData); +void SendECUAnalogDataOverCAN(const ECU_StateData *stateData); +void SendECUConfigOverCAN(const ECU_StateData *stateData); #endif diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index 4fbeb224c..8d6affee4 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -97,7 +97,7 @@ void ECU_CAN_Send_DTI(GRCAN_CUSTOM_ID msgID, void *data, uint32_t size) can_enqueue(stateLump.primary_can, &msg); } -void SendECUStateDataOverCAN(ECU_StateData *stateData) +void SendECUStateDataOverCAN(const ECU_StateData *stateData) { uint32_t currentTime = MillisecondsSinceBoot(); @@ -123,9 +123,11 @@ void SendECUStateDataOverCAN(ECU_StateData *stateData) ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_1, (void *)&messages.ECUStatusMsgOne, sizeof(messages.ECUStatusMsgOne)); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_2, (void *)&messages.ECUStatusMsgTwo, sizeof(messages.ECUStatusMsgTwo)); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_ALL, GRCAN_ECU_STATUS_3, (void *)&messages.ECUStatusMsgThree, sizeof(messages.ECUStatusMsgThree)); + + SendECUConfigOverCAN(stateData); } -void SendECUAnalogDataOverCAN(ECU_StateData *stateData) +void SendECUAnalogDataOverCAN(const ECU_StateData *stateData) { uint32_t millis_since_boot = MillisecondsSinceBoot(); @@ -146,3 +148,28 @@ void SendECUAnalogDataOverCAN(ECU_StateData *stateData) last_can_tcm_request_millis = millis_since_boot; } } + +void SendECUConfigOverCAN(const ECU_StateData * stateData) +{ + GRCAN_ECU_CONFIG_MSG message = {.ping_timeout_delay = (uint8_t)(stateData->ping_timeout_delay_ms / 10.0f), + .brake_f_min = (uint8_t)(stateData->brake_f_min / 25.0f), + .brake_r_min = (uint8_t)(stateData->brake_r_min / 25.0f), + .brake_bse_min = (uint8_t)(stateData->brake_bse_min / 25.0f), + .apps_1_min = (uint8_t)(stateData->apps_1_min / 10.0f), + .apps_2_min = (uint8_t)(stateData->apps_2_min / 10.0f), + .apps_1_max = (uint8_t)(stateData->apps_1_max / 10.0f), + .apps_2_max = (uint8_t)(stateData->apps_2_max / 10), + .apps_deadzone = (uint8_t)(stateData->apps_deadzone * 25.5f), + .bms_min_threshold = (uint8_t)(stateData->bms_min_thresh * 20.0f), + .bms_max_threshold = (uint8_t)(stateData->bms_max_thresh * 20.0f), + .imd_min_threshold = (uint8_t)(stateData->imd_min_thresh * 20.0f), + .imd_max_threshold = (uint8_t)(stateData->imd_max_thresh * 20.0f), + .bspd_min_threshold = (uint8_t)(stateData->bspd_min_thresh * 20.0f), + .bspd_max_threshold = (uint8_t)(stateData->bspd_max_thresh * 20.0f), + .max_precharge_time = (uint8_t)(stateData->max_precharge_time_ms / 10), + .regen_strength = (uint8_t)(stateData->regen_strength * 10), + .enable_regen = stateData->enable_regen + }; + + ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_CONFIG, &message, sizeof(message)); +} From cefa56fc4cacdbc6ebc35506a6eb69b178b7146c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 18:54:28 +0000 Subject: [PATCH 54/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Data.dbc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Data.dbc b/Autogen/CAN/Doc/GRCAN_Data.dbc index 3f5b907e7..c2b856ddc 100644 --- a/Autogen/CAN/Doc/GRCAN_Data.dbc +++ b/Autogen/CAN/Doc/GRCAN_Data.dbc @@ -451,7 +451,7 @@ BO_ 2149585412 ECU_ECU_Config_to_TCM: 20 ECU SG_ IMD_Max_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" TCM SG_ BSPD_Min_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" TCM SG_ BSPD_Max_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" TCM - SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" TCM + SG_ Max_Precharge_Time : 120|8@1+ (10,0) [0|2550] "ms" TCM SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" TCM SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" TCM @@ -474,7 +474,7 @@ BO_ 2151682562 TCM_ECU_Config_to_ECU: 20 TCM SG_ IMD_Max_Threshold : 96|8@1+ (0.05,0) [0|12.75] "V" ECU SG_ BSPD_Min_Threshold : 104|8@1+ (0.05,0) [0|12.75] "V" ECU SG_ BSPD_Max_Threshold : 112|8@1+ (0.05,0) [0|12.75] "V" ECU - SG_ Max_Precharge_Time : 120|8@1+ (1,0) [0|255] "ms" ECU + SG_ Max_Precharge_Time : 120|8@1+ (10,0) [0|2550] "ms" ECU SG_ Regen_Strength : 128|8@1+ (0.1,0) [0|25.5] "Ratio" ECU SG_ Enable_Regen : 136|1@1+ (1,0) [0|0] "Bool" ECU From 17d91b0967b69ffe296ab5b21e3aac9acd679bd8 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 12:23:08 -0700 Subject: [PATCH 55/85] Switch more things over to config Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 18 ++++++++++-------- ECU/Application/Src/StateUtils.c | 13 ++++++------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 66e7dd2d2..392455b5c 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -59,7 +59,9 @@ ECU_StateData stateLump = { .apps_2_max = 1926, // Regen .regen_strength = 2, - .enable_regen = false }; + .enable_regen = false +} +; static uint32_t millis_since_boot; void ECU_State_Tick(void) @@ -87,8 +89,8 @@ void ECU_State_Tick(void) // stateLump.bms_light &= (bmsFailure(&stateLump)); // stateLump.imd_light &= (imdFailure(&stateLump)); - stateLump.bms_light = (stateLump.bms_sense <= 0.2f) || (stateLump.bms_light && bmsFailure(&stateLump)); - stateLump.imd_light = (stateLump.imd_sense <= 0.2f) || (stateLump.imd_light && imdFailure(&stateLump)); + stateLump.bms_light = (stateLump.bms_sense <= stateLump.bms_min_thresh) || (stateLump.bms_light && bmsFailure(&stateLump)); + stateLump.imd_light = (stateLump.imd_sense <= stateLump.imd_min_thresh) || (stateLump.imd_light && imdFailure(&stateLump)); stateLump.tssi_fault = stateLump.bms_light || stateLump.imd_light; @@ -189,7 +191,7 @@ void ECU_Precharge_Engaged(ECU_StateData *stateData) return; } - if (CriticalError(stateData) || (millis_since_boot - time_start_precharge) >= MAX_PRECHARGE_TIME) { + if (CriticalError(stateData) || (millis_since_boot - time_start_precharge) >= stateData->max_precharge_time_ms) { LOGOMATIC("CRITICAL ERROR! PRECHARGE ENGAGED to TS DISCHARGE START!\n"); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Debugger, GRCAN_DEBUG_2_0, "TS-P-ITR", 8); ECU_Transition_To_Tractive_System_Discharge(stateData); @@ -220,7 +222,7 @@ void ECU_Precharge_Complete(ECU_StateData *stateData) return; } - if (PressingBrake(stateData) && stateData->rtd_button_pressed && (CalcAccPedalTravel(stateData) < 0.05f)) { + if (PressingBrake(stateData) && stateData->rtd_button_pressed && (CalcAccPedalTravel(stateData) < stateData->apps_deadzone)) { GRCAN_INV_CONFIG_MSG inverter_message = {.max_ac_current = 0xFFFF, .max_dc_current = 0xFFFF, .absolute_max_rpm_limit = 0xFFFF, .motor_direction = 0}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inv, GRCAN_INV_CONFIG, &inverter_message, sizeof(inverter_message)); LOGOMATIC("PRECHARGE COMPLETE to DRIVE START/ACTIVE!\n"); @@ -268,7 +270,7 @@ void ECU_Drive_Active(ECU_StateData *stateData) if (APPS_BSE_Violation(stateData)) { stateData->apps_bse_violation = true; - } else if (CalcAccPedalTravel(stateData) < 0.05f) { + } else if (CalcAccPedalTravel(stateData) < stateData->apps_deadzone) { stateData->apps_bse_violation = false; } @@ -282,8 +284,8 @@ void ECU_Drive_Active(ECU_StateData *stateData) if (stateData->apps_bse_violation || !apps_plausible) { torque_request = 0; - } else if (PressingBrake(stateData) && 0 > REGEN_MIN_SPEED_MPH) { // stateData->vehicle_speed_mph - torque_request = -MIN_WITH_TYPES(CalcBrakePressure(stateData) / 5000.0f * REGEN_STRENGTH, 1.0f) * MAX_REVERSE_CURRENT_AMPS; + } else if (stateData->enable_regen && PressingBrake(stateData) && 0 > REGEN_MIN_SPEED_MPH) { // stateData->vehicle_speed_mph + torque_request = -MIN_WITH_TYPES(CalcBrakePressure(stateData) / 5000.0f * stateData->regen_strength, 1.0f) * MAX_REVERSE_CURRENT_AMPS; } else { uint16_t max_current = 0; // Chosen max current for different power level / torque maps diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index a0bf261ef..52bd4ea80 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -60,7 +60,7 @@ bool CriticalError(volatile const ECU_StateData *stateData) bool bmsFailure(volatile const ECU_StateData *stateData) { - return stateData->bms_sense < 0.5f || stateData->bms_sense > 1.6f; // 0.5 to 1.6 is valid + return stateData->bms_sense < stateData->bms_min_thresh || stateData->bms_sense > stateData->bms_max_thresh; } bool imdFailure(volatile const ECU_StateData *stateData) @@ -71,7 +71,7 @@ bool imdFailure(volatile const ECU_StateData *stateData) return false; } - return stateData->imd_sense < 0.5f || stateData->imd_sense > 1.6f; // 0.5 to 1.6 is valid + return stateData->imd_sense < stateData->imd_min_thresh || stateData->imd_sense > stateData->imd_max_thresh; } bool bspdFailure(volatile const ECU_StateData *stateData) @@ -80,7 +80,7 @@ bool bspdFailure(volatile const ECU_StateData *stateData) return false; #endif - return stateData->bspd_sense < 0.6f || stateData->bspd_sense > 1.35f; // possible values are 0.3, 1.2, 1.6 + return stateData->bspd_sense < stateData->bspd_min_thresh || stateData->bspd_sense > stateData->bspd_max_thresh; } bool APPS_BSE_Violation(volatile const ECU_StateData *stateData) @@ -89,8 +89,7 @@ bool APPS_BSE_Violation(volatile const ECU_StateData *stateData) return false; #endif - // Checks 2 * APPS_1 is within 10% of APPS_2 and break + throttle at the same time - return PressingBrake(stateData) && CalcAccPedalTravel(stateData) >= 0.25f; + return PressingBrake(stateData) && CalcAccPedalTravel(stateData) > stateData->apps_deadzone; } bool PressingBrake(volatile const ECU_StateData *stateData) @@ -103,7 +102,7 @@ bool PressingBrake(volatile const ECU_StateData *stateData) } #endif - return (stateData->Brake_F_Signal > BRAKE_F_MIN) || (stateData->bse_signal > BSE_MIN); + return (stateData->Brake_F_Signal > stateData->brake_f_min) || (stateData->bse_signal > stateData->brake_bse_min); } float CalcBrakePressure(volatile const ECU_StateData *stateData) @@ -124,7 +123,7 @@ float CalcAccPedalTravel(volatile const ECU_StateData *stateData) float appspos2 = (stateData->APPS2_Signal - THROTTLE_MIN_2) / (float)(THROTTLE_MAX_2 - THROTTLE_MIN_2); float travel = fminf(fmaxf((appspos1 + appspos2) / 2.0f, 0.0f), 1.0f); - return travel > 0.08f ? (travel - 0.08f) / 0.92f : 0.0f; + return travel > stateData->apps_deadzone ? (travel - stateData->apps_deadzone) / (1.0f - stateData->apps_deadzone) : 0.0f; } // APPS implausibility check (within 10% travel) From 52e8657f8a81f93403580280e8b65f053b1322e9 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 12:39:17 -0700 Subject: [PATCH 56/85] Missed some constant usage Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateUtils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 52bd4ea80..4dbd39844 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -119,8 +119,8 @@ float CalcBrakePressure(volatile const ECU_StateData *stateData) // TODO: reconsider deadzone float CalcAccPedalTravel(volatile const ECU_StateData *stateData) { - float appspos1 = (stateData->APPS1_Signal - THROTTLE_MIN_1) / (float)(THROTTLE_MAX_1 - THROTTLE_MIN_1); - float appspos2 = (stateData->APPS2_Signal - THROTTLE_MIN_2) / (float)(THROTTLE_MAX_2 - THROTTLE_MIN_2); + float appspos1 = (stateData->APPS1_Signal - stateData->apps_1_min) / (float)(stateData->apps_1_max - stateData->apps_1_min); + float appspos2 = (stateData->APPS2_Signal - stateData->apps_2_min) / (float)(stateData->apps_2_max - stateData->apps_2_min); float travel = fminf(fmaxf((appspos1 + appspos2) / 2.0f, 0.0f), 1.0f); return travel > stateData->apps_deadzone ? (travel - stateData->apps_deadzone) / (1.0f - stateData->apps_deadzone) : 0.0f; @@ -129,8 +129,8 @@ float CalcAccPedalTravel(volatile const ECU_StateData *stateData) // APPS implausibility check (within 10% travel) bool APPS_Plausible(volatile const ECU_StateData *stateData) { - float appspos1 = (stateData->APPS1_Signal - THROTTLE_MIN_1) / (float)(THROTTLE_MAX_1 - THROTTLE_MIN_1); - float appspos2 = (stateData->APPS2_Signal - THROTTLE_MIN_2) / (float)(THROTTLE_MAX_2 - THROTTLE_MIN_2); + float appspos1 = (stateData->APPS1_Signal - stateData->apps_1_min) / (float)(stateData->apps_1_max - stateData->apps_1_min); + float appspos2 = (stateData->APPS2_Signal - stateData->apps_2_min) / (float)(stateData->apps_2_max - stateData->apps_2_min); float error = fabsf(appspos1 - appspos2); From ca76a03bf6c6d7fa95629db79f00fb1f94bd357c Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 12:39:44 -0700 Subject: [PATCH 57/85] Remove unused `#define` constants since I get easily confused Signed-off-by: Daniel Hansen --- ECU/Application/Inc/Pinging.h | 1 - ECU/Application/Inc/StateData.h | 1 - ECU/Application/Inc/StateUtils.h | 22 ++++------------------ 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/ECU/Application/Inc/Pinging.h b/ECU/Application/Inc/Pinging.h index 0d99226d3..f425b80d1 100644 --- a/ECU/Application/Inc/Pinging.h +++ b/ECU/Application/Inc/Pinging.h @@ -3,7 +3,6 @@ #ifndef PINGING_H #define PINGING_H -#define PINGTIMEOUT_TIME 250U // time in ms before a ping is considered timed out #define PINGTIMEOUT_VALUE (UINT8_MAX - 1) // return time value representing a timed out ping void pingAll(void); // ping all IDs specified, to be run every PINGTIMEOUT_TIME milliseconds diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 048629cda..008152a08 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -21,7 +21,6 @@ */ #define SAFE_VOLTAGE_LIMIT 60 -#define BUTTON_REFRESH_RATE_MS 100 #define CRITICAL_MAX_CELL_TEMP_C 60 #define CRITICAL_TS_VOLTAGE 600 diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index 9a68f148f..48783c918 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -11,28 +11,14 @@ uint32_t MillisecondsSinceBoot(void); // Constants -#define BRAKE_F_MIN 700 // TODO: need to be determined FIXME: Rename better -#define BRAKE_F_MAX 4095 // TODO: need to be determined FIXME: Rename better -#define BRAKE_R_MIN 0 // TODO: need to be determined FIXME: Rename better -#define BRAKE_R_MAX 4095 // TODO: need to be determined FIXME: Rename better -#define THROTTLE_MIN_1 2375 // TODO: need to be determined -#define THROTTLE_MAX_1 1897 // TODO: need to be determined -#define THROTTLE_MIN_2 2430 // TODO: need to be determined -#define THROTTLE_MAX_2 1926 // TODO: need to be determined -#define BSE_MAX 2000 // 1187 max , 1187/4096*3.3 = 0.96 -#define BSE_DEADZONE 500 // 688 #define MAX_APPS_IMPLAUSIBLE_TIME_MS 100 #define MAX_BUZZER_TIME_MS 1000 -#define BSE_MIN 720 -#define REGEN_STRENGTH 2.0f // define ratio of regen braking percent to brake pressure percent #define REGEN_MIN_SPEED_MPH 3.106856f // MPH #define MAX_CURRENT_AMPS 300.0f // Determined by Ryan #define MAX_REVERSE_CURRENT_AMPS 20.0f // TODO: Change as appropriate -#define MAX_PRECHARGE_TIME 8000 // in ms - #define ECU_STATUS_MSG_PERIOD_MILLIS (1000) #define TRACTIVE_SYSTEM_MAX_PERMITTED_DISCHARGE_TIME_MILLIS (5000) @@ -43,15 +29,15 @@ uint32_t MillisecondsSinceBoot(void); * Usage: * static uint32_t last_action_time = 0; * if (RATE_LIMIT_100_HZ(MillisecondsSinceBoot(), last_action_time)) { - * // Perform action * last_action_time = MillisecondsSinceBoot(); + * // Perform action * } * * @param x Current time in milliseconds (e.g., from MillisecondsSinceBoot()) * @param y Last time the action was performed in milliseconds * @return true if at least 10 ms have passed since last action, false otherwise */ -#define RATE_LIMIT_100_HZ(x, y) (x - y > 10) +#define RATE_LIMIT_100_HZ(x, y) ((x) - (y) > 10) /** * @brief Macro to rate limit an action to 10 Hz (every 100 ms) @@ -59,15 +45,15 @@ uint32_t MillisecondsSinceBoot(void); * Usage: * static uint32_t last_action_time = 0; * if (RATE_LIMIT_10_HZ(MillisecondsSinceBoot(), last_action_time)) { - * // Perform action * last_action_time = MillisecondsSinceBoot(); + * // Perform action * } * * @param x Current time in milliseconds (e.g., from MillisecondsSinceBoot()) * @param y Last time the action was performed in milliseconds * @return true if at least 100 ms have passed since last action, false otherwise */ -#define RATE_LIMIT_10_HZ(x, y) (x - y > 100) +#define RATE_LIMIT_10_HZ(x, y) ((x) - (y) > 100) // Checks stateData for critical errors bool CriticalError(volatile const ECU_StateData *stateData); From 6a73eab61e3e1677f637911ddb078bee67e3e853 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 13:07:21 -0700 Subject: [PATCH 58/85] Ensure DC-DC appear on the CAN Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 62 +++++++++++++++++++++++++++++++++- Autogen/CAN/Inc/GRCAN_MSG_ID.h | 3 +- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 38b02620b..75bb7072c 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -108,6 +108,20 @@ routing: can_id_override: 0x2316 - msg: DTI Data 5 can_id_override: 0x2416 + HV DC-DC: + Primary: + ECU: + - msg: DC-DC Status + - msg: Ping + Debugger: + - msg: Ping + LV DC-DC: + Primary: + ECU: + - msg: DC-DC Status + - msg: Ping + Debugger: + - msg: Ping ECU: Primary: DTI Inv: @@ -3921,6 +3935,7 @@ Message ID: comment: Round trip time data type: u8 units: ms + Tire Temp Frame 0: MSG ID: 0x037 MSG LENGTH: 64 @@ -8756,7 +8771,7 @@ Message ID: bit_start: 248 data type: u8 ECU Config: - MSG ID: 0x012 + MSG ID: 0x02F MSG LENGTH: 20 Ping Timeout Delay: bit_start: 0 @@ -8903,6 +8918,49 @@ Message ID: bit_start: 144 comment: Reserved data type: u16 + DC-DC Status: + MSG ID: 0x012 + MSG LENGTH: 7 + Input Voltage: + bit_start: 0 + comment: ~20v for LV (LV only. Send 0 for HV) + data type: u16 + units: V + scaled min: 0 + scaled max: 65.535 + map equation: "x/1000" + Output Voltage: + bit_start: 16 + comment: ~12v for LV and ~20v for HV + data type: u16 + units: V + scaled min: 0 + scaled max: 65.535 + map equation: "x/1000" + Input Current: + bit_start: 32 + comment: Input current (LV only. Send 0 for HV) + data type: u8 + units: A + scaled min: 0 + scaled max: 25.5 + map equation: "x/10" + Output Current: + bit_start: 40 + comment: Output current + data type: u8 + units: A + scaled min: 0 + scaled max: 25.5 + map equation: "x/10" + DC-DC Temp: + bit_start: 48 + comment: Temp of DC-DC converter + data type: u8 + units: C + scaled min: 0 + scaled max: 255 + map equation: "x" Custom CAN ID: DTI Control 1: @@ -9438,3 +9496,5 @@ GR ID: BrakeTemp RL: "0x1E" BrakeTemp RR: "0x1F" DGPS: "0x20" + LV DC-DC: "0x29" + HV DC-DC: "0x2A" diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index aa6044ec8..745165f41 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -20,7 +20,7 @@ typedef enum { GRCAN_ACU_CELL_DATA_3 = 0x00F, GRCAN_ACU_CELL_DATA_4 = 0x010, GRCAN_ACU_CELL_DATA_5 = 0x011, - GRCAN_ECU_CONFIG = 0x012, + GRCAN_DC_DC_STATUS = 0x012, GRCAN_INV_STATUS_1 = 0x013, GRCAN_INV_STATUS_2 = 0x014, GRCAN_INV_STATUS_3 = 0x015, @@ -32,6 +32,7 @@ typedef enum { GRCAN_DASH_CONFIG = 0x01B, GRCAN_ECU_PINGING_RTT = 0x2D, GRCAN_ECU_ANALOG_DATA = 0x02E, + GRCAN_ECU_CONFIG = 0x02F, GRCAN_UVW_DGPS = 0x030, GRCAN_GPS_LAT = 0x031, GRCAN_GPS_LON = 0x032, From 81cc28d3925c9687127874cf443cb83cf3bdd793 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 20:07:40 +0000 Subject: [PATCH 59/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Data.dbc | 80 +++++++++++++++---------------- Autogen/CAN/Doc/GRCAN_Primary.dbc | 48 ++++++++++++++++++- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 14 ++++++ Autogen/CAN/Inc/GRCAN_MSG_ID.h | 1 - Autogen/CAN/Inc/GRCAN_NODE_ID.h | 2 + 5 files changed, 103 insertions(+), 42 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Data.dbc b/Autogen/CAN/Doc/GRCAN_Data.dbc index c2b856ddc..99d7c5a38 100644 --- a/Autogen/CAN/Doc/GRCAN_Data.dbc +++ b/Autogen/CAN/Doc/GRCAN_Data.dbc @@ -435,7 +435,7 @@ BO_ 2149592324 ECU_ECU_Pinging_RTT_to_TCM: 24 ECU SG_ Brake_Temp_RR_RTT : 176|8@1+ (1,0) [0|0] "ms" TCM SG_ DGPS_RTT : 184|8@1+ (1,0) [0|0] "ms" TCM -BO_ 2149585412 ECU_ECU_Config_to_TCM: 20 ECU +BO_ 2149592836 ECU_ECU_Config_to_TCM: 20 ECU SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" TCM SG_ Brake_F_Min : 8|8@1+ (25,0) [0|6375] "PSI" TCM SG_ Brake_R_Min : 16|8@1+ (25,0) [0|6375] "PSI" TCM @@ -458,7 +458,7 @@ BO_ 2149585412 ECU_ECU_Config_to_TCM: 20 ECU BO_ 2149581312 ECU_Ping_to_ALL: 4 ECU SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ALL -BO_ 2151682562 TCM_ECU_Config_to_ECU: 20 TCM +BO_ 2151689986 TCM_ECU_Config_to_ECU: 20 TCM SG_ Ping_Timeout_Delay : 0|8@1+ (10,0) [0|2550] "ms" ECU SG_ Brake_F_Min : 8|8@1+ (25,0) [0|6375] "PSI" ECU SG_ Brake_R_Min : 16|8@1+ (25,0) [0|6375] "PSI" ECU @@ -4346,43 +4346,43 @@ CM_ SG_ 2149592324 Brake_Temp_FR_RTT "Round trip time"; CM_ SG_ 2149592324 Brake_Temp_RL_RTT "Round trip time"; CM_ SG_ 2149592324 Brake_Temp_RR_RTT "Round trip time"; CM_ SG_ 2149592324 DGPS_RTT "Round trip time"; -CM_ SG_ 2149585412 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2149585412 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; -CM_ SG_ 2149585412 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2149585412 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; -CM_ SG_ 2149585412 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2149585412 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; -CM_ SG_ 2149585412 Regen_Strength "TBD"; -CM_ SG_ 2149585412 Enable_Regen "Enable or disable regenerative braking"; +CM_ SG_ 2149592836 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2149592836 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2149592836 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2149592836 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2149592836 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149592836 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2149592836 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2149592836 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2149592836 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; +CM_ SG_ 2149592836 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2149592836 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; +CM_ SG_ 2149592836 Regen_Strength "TBD"; +CM_ SG_ 2149592836 Enable_Regen "Enable or disable regenerative braking"; CM_ SG_ 2149581312 Timestamp "Time in millis"; -CM_ SG_ 2151682562 Ping_Timeout_Delay "Delay for which to consider pings timed out"; -CM_ SG_ 2151682562 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; -CM_ SG_ 2151682562 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; -CM_ SG_ 2151682562 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; -CM_ SG_ 2151682562 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; -CM_ SG_ 2151682562 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; -CM_ SG_ 2151682562 Regen_Strength "TBD"; -CM_ SG_ 2151682562 Enable_Regen "Enable or disable regenerative braking"; +CM_ SG_ 2151689986 Ping_Timeout_Delay "Delay for which to consider pings timed out"; +CM_ SG_ 2151689986 Brake_F_Min "Minimum brake f psi for which to consider the brakes pressed"; +CM_ SG_ 2151689986 Brake_R_Min "Minimum brake r psi for which to consider the brakes pressed"; +CM_ SG_ 2151689986 Brake_BSE_Min "Minimum brake bse psi for which to consider the brakes pressed"; +CM_ SG_ 2151689986 APPS_1_Min "Minimum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151689986 APPS_2_Min "Minimum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2151689986 APPS_1_Max "Maximum value that the APPS 1 sensor is expected to read"; +CM_ SG_ 2151689986 APPS_2_Max "Maximum value that the APPS 2 sensor is expected to read"; +CM_ SG_ 2151689986 APPS_Deadzone "Percentage deadzone of the APPS for which to not consider the pedals to have traveled"; +CM_ SG_ 2151689986 BMS_Min_Threshold "Minimum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 BMS_Max_Threshold "Maximum acceptable BMS sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 IMD_Min_Threshold "Minimum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 IMD_Max_Threshold "Maximum acceptable IMD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 BSPD_Min_Threshold "Minimum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 BSPD_Max_Threshold "Maximum acceptable BSPD sense value such that the BMS is not considered in failure"; +CM_ SG_ 2151689986 Max_Precharge_Time "Maximum acceptable time to remain precharging before discharging"; +CM_ SG_ 2151689986 Regen_Strength "TBD"; +CM_ SG_ 2151689986 Enable_Regen "Enable or disable regenerative braking"; CM_ SG_ 2151678465 Timestamp "Time in millis"; CM_ SG_ 2181038594 Timestamp "Time in millis"; CM_ SG_ 2181051140 ALT "altitude"; @@ -7627,9 +7627,9 @@ BA_ "VFrameFormat" BO_ 2149581057 15; BA_ "VFrameFormat" BO_ 2149581313 15; BA_ "VFrameFormat" BO_ 2149592580 15; BA_ "VFrameFormat" BO_ 2149592324 15; -BA_ "VFrameFormat" BO_ 2149585412 15; +BA_ "VFrameFormat" BO_ 2149592836 15; BA_ "VFrameFormat" BO_ 2149581312 15; -BA_ "VFrameFormat" BO_ 2151682562 15; +BA_ "VFrameFormat" BO_ 2151689986 15; BA_ "VFrameFormat" BO_ 2151678465 15; BA_ "VFrameFormat" BO_ 2181038594 15; BA_ "VFrameFormat" BO_ 2181051140 15; diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index 348150a68..ae1ecabd9 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -32,7 +32,7 @@ NS_ : BS_: -BU_: ACU DTI_Inv Dash_Panel Debugger ECU Fan_Ctrl_1 Fan_Ctrl_2 Fan_Ctrl_3 GR_Inv TCM ALL +BU_: ACU DTI_Inv Dash_Panel Debugger ECU Fan_Ctrl_1 Fan_Ctrl_2 Fan_Ctrl_3 GR_Inv HV_DC_DC LV_DC_DC TCM ALL BO_ 2150629377 ACU_Debug_2_0_to_Debugger: 8 ACU SG_ Debug : 0|64@1- (1,0) [0|0] "" Debugger @@ -169,6 +169,32 @@ BO_ 2147492886 DTI_Inv_DTI_Data_5_to_ECU: 8 DTI_Inv SG_ Power_limit : 42|1@1+ (1,0) [0|0] "" ECU SG_ CAN_Version : 56|8@1+ (1,0) [0|0] "" ECU +BO_ 2191528450 HV_DC_DC_Status_to_ECU: 7 HV_DC_DC + SG_ Input_Voltage : 0|16@1+ (0.001,0) [0|65.535] "V" ECU + SG_ Output_Voltage : 16|16@1+ (0.001,0) [0|65.535] "V" ECU + SG_ Input_Current : 32|8@1+ (0.1,0) [0|25.5] "A" ECU + SG_ Output_Current : 40|8@1+ (0.1,0) [0|25.5] "A" ECU + SG_ DC_DC_Temp : 48|8@1+ (1,0) [0|255] "C" ECU + +BO_ 2191524354 HV_DC_DC_Ping_to_ECU: 4 HV_DC_DC + SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ECU + +BO_ 2191524353 HV_DC_DC_Ping_to_Debugger: 4 HV_DC_DC + SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Debugger + +BO_ 2190479874 LV_DC_DC_Status_to_ECU: 7 LV_DC_DC + SG_ Input_Voltage : 0|16@1+ (0.001,0) [0|65.535] "V" ECU + SG_ Output_Voltage : 16|16@1+ (0.001,0) [0|65.535] "V" ECU + SG_ Input_Current : 32|8@1+ (0.1,0) [0|25.5] "A" ECU + SG_ Output_Current : 40|8@1+ (0.1,0) [0|25.5] "A" ECU + SG_ DC_DC_Temp : 48|8@1+ (1,0) [0|255] "C" ECU + +BO_ 2190475778 LV_DC_DC_Ping_to_ECU: 4 LV_DC_DC + SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ECU + +BO_ 2190475777 LV_DC_DC_Ping_to_Debugger: 4 LV_DC_DC + SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Debugger + BO_ 278 ECU_DTI_Control_1_to_DTI_Inv: 2 ECU SG_ Target_AC_Current : 0|16@1+ (1,0) [0|0] "" DTI_Inv @@ -431,6 +457,20 @@ CM_ SG_ 2147492886 RPM_min_limit "1: RPM min limit active 0: RPM min limit inact CM_ SG_ 2147492886 RPM_max_limit "1: RPM max limit active 0: RPM max limit inactive"; CM_ SG_ 2147492886 Power_limit "1: Power limit by Config active 0: Power limit by Config inactive"; CM_ SG_ 2147492886 CAN_Version "Indicates the CAN map version. For ex: 23 -> 2,3 (V2,3)"; +CM_ SG_ 2191528450 Input_Voltage "~20v for LV (LV only. Send 0 for HV)"; +CM_ SG_ 2191528450 Output_Voltage "~12v for LV and ~20v for HV"; +CM_ SG_ 2191528450 Input_Current "Input current (LV only. Send 0 for HV)"; +CM_ SG_ 2191528450 Output_Current "Output current"; +CM_ SG_ 2191528450 DC_DC_Temp "Temp of DC-DC converter"; +CM_ SG_ 2191524354 Timestamp "Time in millis"; +CM_ SG_ 2191524353 Timestamp "Time in millis"; +CM_ SG_ 2190479874 Input_Voltage "~20v for LV (LV only. Send 0 for HV)"; +CM_ SG_ 2190479874 Output_Voltage "~12v for LV and ~20v for HV"; +CM_ SG_ 2190479874 Input_Current "Input current (LV only. Send 0 for HV)"; +CM_ SG_ 2190479874 Output_Current "Output current"; +CM_ SG_ 2190479874 DC_DC_Temp "Temp of DC-DC converter"; +CM_ SG_ 2190475778 Timestamp "Time in millis"; +CM_ SG_ 2190475777 Timestamp "Time in millis"; CM_ SG_ 278 Target_AC_Current "This Cmd sets the target motor AC current (peak, not RMS). When the Ctrl receives this message, it automatically switches to current control mode. This value must not be above the limits of the Inv and must be multiplied by 10 before sending. This is a signed parameter, and the sign represents the direction of the torque which correlates with the motor AC current. (For the correlation, please refer to the motor Params)"; CM_ SG_ 534 Target_Brake_Current "Targets the brake current of the motor. It will result negative torque relatively to the forward direction of the motor. This value must be multiplied by 10 before sending, only positive currents are accepted."; CM_ SG_ 790 Target_ERPM "This Cmd enables the speed control of the motor with a target ERPM. This is a signed parameter, and the sign represents the direction of the spinning. For better operation you need to tune the PID of speed control. Equation: ERPM = Motor RPM * number of the motor pole pairs"; @@ -555,6 +595,12 @@ BA_ "VFrameFormat" BO_ 2147492118 1; BA_ "VFrameFormat" BO_ 2147492374 1; BA_ "VFrameFormat" BO_ 2147492630 1; BA_ "VFrameFormat" BO_ 2147492886 1; +BA_ "VFrameFormat" BO_ 2191528450 1; +BA_ "VFrameFormat" BO_ 2191524354 1; +BA_ "VFrameFormat" BO_ 2191524353 1; +BA_ "VFrameFormat" BO_ 2190479874 1; +BA_ "VFrameFormat" BO_ 2190475778 1; +BA_ "VFrameFormat" BO_ 2190475777 1; BA_ "VFrameFormat" BO_ 2147485718 1; BA_ "VFrameFormat" BO_ 2147485974 1; BA_ "VFrameFormat" BO_ 2147486230 1; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index 40952bad9..abcba5ccb 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -2225,4 +2225,18 @@ typedef struct { uint16_t reserved; } GRCAN_ECU_CONFIG_MSG; +/** DC-DC Status */ +typedef struct { + /** ~20v for LV (LV only. Send 0 for HV) (Byte 0) */ + uint16_t input_voltage; + /** ~12v for LV and ~20v for HV (Byte 2) */ + uint16_t output_voltage; + /** Input current (LV only. Send 0 for HV) (Byte 4) */ + uint8_t input_current; + /** Output current (Byte 5) */ + uint8_t output_current; + /** Temp of DC-DC converter (Byte 6) */ + uint8_t dc_dc_temp; +} GRCAN_DC_DC_STATUS_MSG; + #endif diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index 745165f41..0a4190e53 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -20,7 +20,6 @@ typedef enum { GRCAN_ACU_CELL_DATA_3 = 0x00F, GRCAN_ACU_CELL_DATA_4 = 0x010, GRCAN_ACU_CELL_DATA_5 = 0x011, - GRCAN_DC_DC_STATUS = 0x012, GRCAN_INV_STATUS_1 = 0x013, GRCAN_INV_STATUS_2 = 0x014, GRCAN_INV_STATUS_3 = 0x015, diff --git a/Autogen/CAN/Inc/GRCAN_NODE_ID.h b/Autogen/CAN/Inc/GRCAN_NODE_ID.h index 653c04fd0..e89745227 100644 --- a/Autogen/CAN/Inc/GRCAN_NODE_ID.h +++ b/Autogen/CAN/Inc/GRCAN_NODE_ID.h @@ -36,6 +36,8 @@ typedef enum { GRCAN_BrakeTemp_RL = 0x1E, GRCAN_BrakeTemp_RR = 0x1F, GRCAN_DGPS = 0x20, + GRCAN_LV_DC_DC = 0x29, + GRCAN_HV_DC_DC = 0x2A, } GRCAN_NODE_ID; #endif // GR_IDS_H From bfb31273af0cc848e465af71db443e53595adf3d Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 13:08:35 -0700 Subject: [PATCH 60/85] Reduce BMS and IMD min thresholds Signed-off-by: Daniel Hansen --- ECU/Application/Src/StateTicks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 392455b5c..576868b4f 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -38,10 +38,10 @@ ECU_StateData stateLump = { // APPS Deadzone .apps_deadzone = 0.08f, // BMS thresholds - .bms_min_thresh = 0.5f, + .bms_min_thresh = 0.2f, .bms_max_thresh = 1.6f, // IMD thresholds - .imd_min_thresh = 0.5f, + .imd_min_thresh = 0.2f, .imd_max_thresh = 1.6f, // BSPD thresholds .bspd_min_thresh = 0.6f, From 1f075e979f41a7860f1c1e86b1c85644ee0a901a Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 13:15:02 -0700 Subject: [PATCH 61/85] Fix ping, try and fix DC-DC not showing up Signed-off-by: Daniel Hansen --- Autogen/CAN/Doc/GRCAN.CANdo | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 75bb7072c..860163f02 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -156,29 +156,26 @@ routing: - msg: ACU Precharge - msg: ACU Config Chg Params - msg: ACU Config Op Params - - msg: Ping GR Inv: - msg: Inv Config - msg: Inv Cmd - - msg: Ping Fan Ctrl 1: - msg: Fan Cmd - - msg: Ping Fan Ctrl 2: - msg: Fan Cmd - - msg: Ping Fan Ctrl 3: - msg: Fan Cmd - - msg: Ping Dash Panel: - msg: Dash Config - - msg: Ping ALL: - msg: ECU Status 1 - msg: ECU Status 2 - msg: ECU Status 3 - TCM: - msg: Ping + LV DC-DC: + - msg: DC-DC Status + HV DC-DC: + - msg: DC-DC Status Data: Debugger: - msg: Debug FD From aba356d5c44dd1ad9f340e0f53e8036e8bfbb1e1 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 20:15:22 +0000 Subject: [PATCH 62/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Primary.dbc | 64 +++++++++++++++---------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index ae1ecabd9..db517f387 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -251,9 +251,6 @@ BO_ 2149583875 ECU_ACU_Config_Op_Params_to_ACU: 2 ECU SG_ Minimium_Cell_Voltage : 0|8@1+ (0.01,2) [2|4.55] "Volts" ACU SG_ Max_Cell_Temp : 8|8@1+ (0.25,0) [0|63.75] "Celsius" ACU -BO_ 2149581315 ECU_Ping_to_ACU: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ACU - BO_ 2149586440 ECU_Inv_Config_to_GR_Inv: 7 ECU SG_ Max_AC_Current : 0|16@1+ (0.01,-327.68) [-327.68|327.67] "Amps" GR_Inv SG_ Max_DC_Current : 16|16@1+ (0.01,-327.68) [-327.68|327.67] "Amps" GR_Inv @@ -267,33 +264,18 @@ BO_ 2149586696 ECU_Inv_Cmd_to_GR_Inv: 8 ECU SG_ Field_weakening : 48|8@1+ (0.1,0) [0|25.5] "Amps" GR_Inv SG_ Drive_enable : 56|1@1+ (1,0) [0|0] "Enable" GR_Inv -BO_ 2149581320 ECU_Ping_to_GR_Inv: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" GR_Inv - BO_ 2149587213 ECU_Fan_Cmd_to_Fan_Ctrl_1: 1 ECU SG_ Fan_Cmd : 0|8@1+ (1,0) [0|255] "%" Fan_Ctrl_1 -BO_ 2149581325 ECU_Ping_to_Fan_Ctrl_1: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Fan_Ctrl_1 - BO_ 2149587214 ECU_Fan_Cmd_to_Fan_Ctrl_2: 1 ECU SG_ Fan_Cmd : 0|8@1+ (1,0) [0|255] "%" Fan_Ctrl_2 -BO_ 2149581326 ECU_Ping_to_Fan_Ctrl_2: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Fan_Ctrl_2 - BO_ 2149587215 ECU_Fan_Cmd_to_Fan_Ctrl_3: 1 ECU SG_ Fan_Cmd : 0|8@1+ (1,0) [0|255] "%" Fan_Ctrl_3 -BO_ 2149581327 ECU_Ping_to_Fan_Ctrl_3: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Fan_Ctrl_3 - BO_ 2149587717 ECU_Dash_Config_to_Dash_Panel: 1 ECU SG_ led_latch_flags : 0|8@1+ (1,0) [0|0] "" Dash_Panel -BO_ 2149581317 ECU_Ping_to_Dash_Panel: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" Dash_Panel - BO_ 2149581568 ECU_ECU_Status_1_to_ALL: 8 ECU SG_ ECU_State : 0|1@1+ (1,0) [0|0] "Bool" ALL SG_ Ping_Group_1 : 8|8@1+ (1,0) [0|0] "" ALL @@ -316,8 +298,22 @@ BO_ 2149582080 ECU_ECU_Status_3_to_ALL: 5 ECU SG_ RR_Wheel_RPM : 16|16@1+ (0.1,-3276.8) [-3276.8|3276.7] "RPM" ALL SG_ Relay_States : 32|1@1+ (1,0) [0|0] "" ALL -BO_ 2149581316 ECU_Ping_to_TCM: 4 ECU - SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" TCM +BO_ 2149581312 ECU_Ping_to_ALL: 4 ECU + SG_ Timestamp : 0|32@1+ (1,0) [0|4294967296] "ms" ALL + +BO_ 2149585449 ECU_DC_DC_Status_to_LV_DC_DC: 7 ECU + SG_ Input_Voltage : 0|16@1+ (0.001,0) [0|65.535] "V" LV_DC_DC + SG_ Output_Voltage : 16|16@1+ (0.001,0) [0|65.535] "V" LV_DC_DC + SG_ Input_Current : 32|8@1+ (0.1,0) [0|25.5] "A" LV_DC_DC + SG_ Output_Current : 40|8@1+ (0.1,0) [0|25.5] "A" LV_DC_DC + SG_ DC_DC_Temp : 48|8@1+ (1,0) [0|255] "C" LV_DC_DC + +BO_ 2149585450 ECU_DC_DC_Status_to_HV_DC_DC: 7 ECU + SG_ Input_Voltage : 0|16@1+ (0.001,0) [0|65.535] "V" HV_DC_DC + SG_ Output_Voltage : 16|16@1+ (0.001,0) [0|65.535] "V" HV_DC_DC + SG_ Input_Current : 32|8@1+ (0.1,0) [0|25.5] "A" HV_DC_DC + SG_ Output_Current : 40|8@1+ (0.1,0) [0|25.5] "A" HV_DC_DC + SG_ DC_DC_Temp : 48|8@1+ (1,0) [0|255] "C" HV_DC_DC BO_ 2161115137 Fan_Ctrl_1_Debug_2_0_to_Debugger: 8 Fan_Ctrl_1 SG_ Debug : 0|64@1- (1,0) [0|0] "" Debugger @@ -493,7 +489,6 @@ CM_ SG_ 2149583619 Chg_Voltage "Sets the Target Charging voltage"; CM_ SG_ 2149583619 Chg_Current "Sets the Target Charging Current"; CM_ SG_ 2149583875 Minimium_Cell_Voltage "Sets the threshold for Minimum Cell Voltage before Shutdown"; CM_ SG_ 2149583875 Max_Cell_Temp "Sets the threshold for Max Cell Temp before Shutdown"; -CM_ SG_ 2149581315 Timestamp "Time in millis"; CM_ SG_ 2149586440 Max_AC_Current "Max AC Current"; CM_ SG_ 2149586440 Max_DC_Current "Max DC Current"; CM_ SG_ 2149586440 Absolute_Max_RPM_Limit "0: No limit n :limited at n RPM"; @@ -503,15 +498,10 @@ CM_ SG_ 2149586696 Set_DC_Current "Commanded DC Current"; CM_ SG_ 2149586696 RPM_Limit "0: No limit n :limited at n RPM"; CM_ SG_ 2149586696 Field_weakening "Field weakening strength"; CM_ SG_ 2149586696 Drive_enable "Write this to 1 every 100ms to enable Inv"; -CM_ SG_ 2149581320 Timestamp "Time in millis"; CM_ SG_ 2149587213 Fan_Cmd "0-100 Percent"; -CM_ SG_ 2149581325 Timestamp "Time in millis"; CM_ SG_ 2149587214 Fan_Cmd "0-100 Percent"; -CM_ SG_ 2149581326 Timestamp "Time in millis"; CM_ SG_ 2149587215 Fan_Cmd "0-100 Percent"; -CM_ SG_ 2149581327 Timestamp "Time in millis"; CM_ SG_ 2149587717 led_latch_flags "[Byte 0 / Bits 0-7] 0: BSPD led 1: IMD led 2: BMS led 3: BSPD latch 4: IMD latch 5: BMS latch 6-7: Reserved"; -CM_ SG_ 2149581317 Timestamp "Time in millis"; CM_ SG_ 2149581568 ECU_State "[Byte 0 / Bits 0-7] ECU state machine data 0: GLV Off State 1: GLV On State 2: Precharge Engaged State 3: Precharge Complete State 4: Drive Active State 5: TS Discharge State 6-7: Reserved See diagram in StateMachine.h"; CM_ SG_ 2149581568 Ping_Group_1 "[Byte 1 / Bits 8-15] ECU ping targets 8: ACU (1: OK, 0: Timeout) 9: GR Inv (1: OK, 0: Timeout) 10: Fan Ctrl 1 (1: OK, 0: Timeout) 11: Fan Ctrl 2 (1: OK, 0: Timeout) 12: Fan Ctrl 3 (1: OK, 0: Timeout) 13: Dash Panel (1: OK, 0: Timeout) 14: TCM (1: OK, 0: Timeout) 15: DGPS (1: OK, 0: Timeout)"; CM_ SG_ 2149581568 Ping_Group_2 "[Byte 2 / Bits 16-23] ECU ping targets 16: Suspension FL (1: OK, 0: Timeout) 17: Suspension FR (1: OK, 0: Timeout) 18: Suspension RL (1: OK, 0: Timeout) 19: Suspension RR (1: OK, 0: Timeout) 20: InboardFloor FL (1: OK, 0: Timeout) 21: InboardFloor FR (1: OK, 0: Timeout) 22: InboardFloor RL (1: OK, 0: Timeout) 23: InboardFloor RR (1: OK, 0: Timeout)"; @@ -528,7 +518,17 @@ CM_ SG_ 2149581824 FR_Wheel_RPM "FR Wheel RPM"; CM_ SG_ 2149582080 RL_Wheel_RPM "RL Wheel RPM"; CM_ SG_ 2149582080 RR_Wheel_RPM "RR Wheel RPM"; CM_ SG_ 2149582080 Relay_States "[Byte 4 / Bits 32-39] 0: BMS OK 1: IMD OK 2: BSPD OK 3: Software OK 4-7: Reserved"; -CM_ SG_ 2149581316 Timestamp "Time in millis"; +CM_ SG_ 2149581312 Timestamp "Time in millis"; +CM_ SG_ 2149585449 Input_Voltage "~20v for LV (LV only. Send 0 for HV)"; +CM_ SG_ 2149585449 Output_Voltage "~12v for LV and ~20v for HV"; +CM_ SG_ 2149585449 Input_Current "Input current (LV only. Send 0 for HV)"; +CM_ SG_ 2149585449 Output_Current "Output current"; +CM_ SG_ 2149585449 DC_DC_Temp "Temp of DC-DC converter"; +CM_ SG_ 2149585450 Input_Voltage "~20v for LV (LV only. Send 0 for HV)"; +CM_ SG_ 2149585450 Output_Voltage "~12v for LV and ~20v for HV"; +CM_ SG_ 2149585450 Input_Current "Input current (LV only. Send 0 for HV)"; +CM_ SG_ 2149585450 Output_Current "Output current"; +CM_ SG_ 2149585450 DC_DC_Temp "Temp of DC-DC converter"; CM_ SG_ 2161115137 Debug "Essentially a print statement up to 8 bytes long that whichever targeted can parse"; CM_ SG_ 2161115649 Timestamp "Time in millis"; CM_ SG_ 2161115650 Timestamp "Time in millis"; @@ -611,22 +611,18 @@ BA_ "VFrameFormat" BO_ 2149581313 1; BA_ "VFrameFormat" BO_ 2149583363 1; BA_ "VFrameFormat" BO_ 2149583619 1; BA_ "VFrameFormat" BO_ 2149583875 1; -BA_ "VFrameFormat" BO_ 2149581315 1; BA_ "VFrameFormat" BO_ 2149586440 1; BA_ "VFrameFormat" BO_ 2149586696 1; -BA_ "VFrameFormat" BO_ 2149581320 1; BA_ "VFrameFormat" BO_ 2149587213 1; -BA_ "VFrameFormat" BO_ 2149581325 1; BA_ "VFrameFormat" BO_ 2149587214 1; -BA_ "VFrameFormat" BO_ 2149581326 1; BA_ "VFrameFormat" BO_ 2149587215 1; -BA_ "VFrameFormat" BO_ 2149581327 1; BA_ "VFrameFormat" BO_ 2149587717 1; -BA_ "VFrameFormat" BO_ 2149581317 1; BA_ "VFrameFormat" BO_ 2149581568 1; BA_ "VFrameFormat" BO_ 2149581824 1; BA_ "VFrameFormat" BO_ 2149582080 1; -BA_ "VFrameFormat" BO_ 2149581316 1; +BA_ "VFrameFormat" BO_ 2149581312 1; +BA_ "VFrameFormat" BO_ 2149585449 1; +BA_ "VFrameFormat" BO_ 2149585450 1; BA_ "VFrameFormat" BO_ 2161115137 1; BA_ "VFrameFormat" BO_ 2161115649 1; BA_ "VFrameFormat" BO_ 2161115650 1; From cdefc560f3bfecff728e047c1943cbd951add498 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 13:22:09 -0700 Subject: [PATCH 63/85] Be more explicit about `PLAN_C` Signed-off-by: Daniel Hansen --- ECU/Application/Inc/{Config.h => Plan_C.h} | 0 ECU/Application/Inc/vcp_config.h | 2 -- ECU/Application/Src/StateUtils.c | 1 + ECU/Core/Inc/main.h | 2 +- ECU/Core/Src/main.c | 2 +- 5 files changed, 3 insertions(+), 4 deletions(-) rename ECU/Application/Inc/{Config.h => Plan_C.h} (100%) diff --git a/ECU/Application/Inc/Config.h b/ECU/Application/Inc/Plan_C.h similarity index 100% rename from ECU/Application/Inc/Config.h rename to ECU/Application/Inc/Plan_C.h diff --git a/ECU/Application/Inc/vcp_config.h b/ECU/Application/Inc/vcp_config.h index c97d306a8..77a62a7f7 100644 --- a/ECU/Application/Inc/vcp_config.h +++ b/ECU/Application/Inc/vcp_config.h @@ -1,9 +1,7 @@ #ifndef VCP_CONFIG #define VCP_CONFIG -// #define VCP_CONFIG_CLAIM_USART1 #define VCP_CONFIG_CLAIM_USART2 -// #define VCP_CONFIG_CLAIM_USART3 #define VCP_TX_BUFFER_SIZE 128 diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 4dbd39844..411dc8fbb 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -17,6 +17,7 @@ #include "stm32g4xx_hal.h" #include "stm32g4xx_ll_gpio.h" #include "vcp.h" +#include "Plan_C.h" /** * @brief Delay after startup to allow IMD sense to stabilize before considering IMD sense failures valid diff --git a/ECU/Core/Inc/main.h b/ECU/Core/Inc/main.h index 881140fb7..cac9c58e6 100644 --- a/ECU/Core/Inc/main.h +++ b/ECU/Core/Inc/main.h @@ -44,7 +44,7 @@ extern "C" { /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ -#include "Config.h" +#include "Plan_C.h" #include "GRCAN_NODE_ID.h" /* USER CODE END Includes */ diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 376a372b5..e0e34a995 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -45,7 +45,7 @@ #include "can.h" #include "stm32g4xx_hal.h" #include "vcp.h" -// #define PLAN_C +#include "Plan_C.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ From bb56eeb2ed7834a2aa9c63c3a7e17ed83b8dda2c Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 13:55:12 -0700 Subject: [PATCH 64/85] Add RTD light control spec --- Autogen/CAN/Doc/GRCAN.CANdo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Autogen/CAN/Doc/GRCAN.CANdo b/Autogen/CAN/Doc/GRCAN.CANdo index 860163f02..2041234c9 100644 --- a/Autogen/CAN/Doc/GRCAN.CANdo +++ b/Autogen/CAN/Doc/GRCAN.CANdo @@ -167,6 +167,7 @@ routing: - msg: Fan Cmd Dash Panel: - msg: Dash Config + - msg: RTD Light Ctrl ALL: - msg: ECU Status 1 - msg: ECU Status 2 @@ -8958,6 +8959,24 @@ Message ID: scaled min: 0 scaled max: 255 map equation: "x" + RTD Light Ctrl: + MSG ID: 0x53 + MSG LENGTH: 3 + Red: + bit_start: 0 + comment: Intensity of the red channel on the RTD button dash light ONLY when in GLV On, ignored otherwise + data type: u8 + units: Intensity + Green: + bit_start: 0 + comment: Intensity of the green channel on the RTD button dash light ONLY when in GLV On, ignored otherwise + data type: u8 + units: Intensity + Blue: + bit_start: 0 + comment: Intensity of the blue channel on the RTD button dash light ONLY when in GLV On, ignored otherwise + data type: u8 + units: Intensity Custom CAN ID: DTI Control 1: From 086b5533eb7a0e521901fddcfac28f344f2c1a03 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 20:55:35 +0000 Subject: [PATCH 65/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Doc/GRCAN_Primary.dbc | 9 +++++++++ Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 10 ++++++++++ Autogen/CAN/Inc/GRCAN_MSG_ID.h | 1 + 3 files changed, 20 insertions(+) diff --git a/Autogen/CAN/Doc/GRCAN_Primary.dbc b/Autogen/CAN/Doc/GRCAN_Primary.dbc index db517f387..5979cc4f0 100644 --- a/Autogen/CAN/Doc/GRCAN_Primary.dbc +++ b/Autogen/CAN/Doc/GRCAN_Primary.dbc @@ -276,6 +276,11 @@ BO_ 2149587215 ECU_Fan_Cmd_to_Fan_Ctrl_3: 1 ECU BO_ 2149587717 ECU_Dash_Config_to_Dash_Panel: 1 ECU SG_ led_latch_flags : 0|8@1+ (1,0) [0|0] "" Dash_Panel +BO_ 2149602053 ECU_RTD_Light_Ctrl_to_Dash_Panel: 3 ECU + SG_ Blue : 0|8@1+ (1,0) [0|0] "Intensity" Dash_Panel + SG_ Green : 0|8@1+ (1,0) [0|0] "Intensity" Dash_Panel + SG_ Red : 0|8@1+ (1,0) [0|0] "Intensity" Dash_Panel + BO_ 2149581568 ECU_ECU_Status_1_to_ALL: 8 ECU SG_ ECU_State : 0|1@1+ (1,0) [0|0] "Bool" ALL SG_ Ping_Group_1 : 8|8@1+ (1,0) [0|0] "" ALL @@ -502,6 +507,9 @@ CM_ SG_ 2149587213 Fan_Cmd "0-100 Percent"; CM_ SG_ 2149587214 Fan_Cmd "0-100 Percent"; CM_ SG_ 2149587215 Fan_Cmd "0-100 Percent"; CM_ SG_ 2149587717 led_latch_flags "[Byte 0 / Bits 0-7] 0: BSPD led 1: IMD led 2: BMS led 3: BSPD latch 4: IMD latch 5: BMS latch 6-7: Reserved"; +CM_ SG_ 2149602053 Blue "Intensity of the blue channel on the RTD button dash light ONLY when in GLV On, ignored otherwise"; +CM_ SG_ 2149602053 Green "Intensity of the green channel on the RTD button dash light ONLY when in GLV On, ignored otherwise"; +CM_ SG_ 2149602053 Red "Intensity of the red channel on the RTD button dash light ONLY when in GLV On, ignored otherwise"; CM_ SG_ 2149581568 ECU_State "[Byte 0 / Bits 0-7] ECU state machine data 0: GLV Off State 1: GLV On State 2: Precharge Engaged State 3: Precharge Complete State 4: Drive Active State 5: TS Discharge State 6-7: Reserved See diagram in StateMachine.h"; CM_ SG_ 2149581568 Ping_Group_1 "[Byte 1 / Bits 8-15] ECU ping targets 8: ACU (1: OK, 0: Timeout) 9: GR Inv (1: OK, 0: Timeout) 10: Fan Ctrl 1 (1: OK, 0: Timeout) 11: Fan Ctrl 2 (1: OK, 0: Timeout) 12: Fan Ctrl 3 (1: OK, 0: Timeout) 13: Dash Panel (1: OK, 0: Timeout) 14: TCM (1: OK, 0: Timeout) 15: DGPS (1: OK, 0: Timeout)"; CM_ SG_ 2149581568 Ping_Group_2 "[Byte 2 / Bits 16-23] ECU ping targets 16: Suspension FL (1: OK, 0: Timeout) 17: Suspension FR (1: OK, 0: Timeout) 18: Suspension RL (1: OK, 0: Timeout) 19: Suspension RR (1: OK, 0: Timeout) 20: InboardFloor FL (1: OK, 0: Timeout) 21: InboardFloor FR (1: OK, 0: Timeout) 22: InboardFloor RL (1: OK, 0: Timeout) 23: InboardFloor RR (1: OK, 0: Timeout)"; @@ -617,6 +625,7 @@ BA_ "VFrameFormat" BO_ 2149587213 1; BA_ "VFrameFormat" BO_ 2149587214 1; BA_ "VFrameFormat" BO_ 2149587215 1; BA_ "VFrameFormat" BO_ 2149587717 1; +BA_ "VFrameFormat" BO_ 2149602053 1; BA_ "VFrameFormat" BO_ 2149581568 1; BA_ "VFrameFormat" BO_ 2149581824 1; BA_ "VFrameFormat" BO_ 2149582080 1; diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index abcba5ccb..c00113345 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -2239,4 +2239,14 @@ typedef struct { uint8_t dc_dc_temp; } GRCAN_DC_DC_STATUS_MSG; +/** RTD Light Ctrl */ +typedef struct { + /** Intensity of the red channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ + uint8_t red; + /** Intensity of the green channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ + uint8_t green; + /** Intensity of the blue channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ + uint8_t blue; +} GRCAN_RTD_LIGHT_CTRL_MSG; + #endif diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index 0a4190e53..2e49cc2d2 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -67,6 +67,7 @@ typedef enum { GRCAN_WHEEL_SPEED = 0x050, GRCAN_SUSPENSION_IMU_MAG_DATA = 0x051, GRCAN_INBOARDFLOOR_IMU_TOF_DATA = 0x052, + GRCAN_RTD_LIGHT_CTRL = 0x53, } GRCAN_MSG_ID; #endif // CAN_MSG_IDS_H From dcf3dcd01d6e0ef7a0667109ca0ff3a8dcc65cd0 Mon Sep 17 00:00:00 2001 From: Aarnav Koushik Date: Sat, 30 May 2026 14:28:37 -0700 Subject: [PATCH 66/85] rewrote MSGparser to allow hyphenated names(fixes DC-DC status not appearing) --- Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h | 60 +- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 1882 ++++++++++++++--------------- Autogen/CAN/Inc/GRCAN_MSG_ID.h | 131 +- Autogen/CAN/Inc/GRCAN_NODE_ID.h | 70 +- Autogen/CAN/Src/MSGparser.pl | 2 +- 5 files changed, 1072 insertions(+), 1073 deletions(-) diff --git a/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h b/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h index 5a70891ac..4154c2bb5 100644 --- a/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h +++ b/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h @@ -3,36 +3,36 @@ #define CUSTOM_CAN_ID_H typedef enum { - CHARGER_CONTROL_CAN_ID = 0x1806E5F4, - CHARGER_DATA_CAN_ID = 0x18FF50E5, - DTI_CONTROL_1_CAN_ID = 0x116, - DTI_CONTROL_10_CAN_ID = 0xA16, - DTI_CONTROL_11_CAN_ID = 0xB16, - DTI_CONTROL_12_CAN_ID = 0xC16, - DTI_CONTROL_2_CAN_ID = 0x216, - DTI_CONTROL_3_CAN_ID = 0x316, - DTI_CONTROL_4_CAN_ID = 0x416, - DTI_CONTROL_5_CAN_ID = 0x516, - DTI_CONTROL_6_CAN_ID = 0x616, - DTI_CONTROL_7_CAN_ID = 0x716, - DTI_CONTROL_8_CAN_ID = 0x816, - DTI_CONTROL_9_CAN_ID = 0x916, - DTI_DATA_1_CAN_ID = 0x2016, - DTI_DATA_2_CAN_ID = 0x2116, - DTI_DATA_3_CAN_ID = 0x2216, - DTI_DATA_4_CAN_ID = 0x2316, - DTI_DATA_5_CAN_ID = 0x2416, - EM_MEAS_CAN_ID = 0x10D, - EM_STATUS_CAN_ID = 0x40D, - EM_TEAM_DATA_1_CAN_ID = 0x30D, - EM_TEAM_DATA_2_CAN_ID = 0x30E, - EM_TEMP_CAN_ID = 0x60D, - IMD_IT_SYSTEM_CAN_ID = 0x18EFF4FE, - IMD_GENERAL_CAN_ID = 0x18FF01F4, - IMD_ISOLATION_INFO_CAN_ID = 0x18EFF4FE, - IMD_REQUEST_CAN_ID = 0x18EFF4FE, - IMD_RESPONSE_CAN_ID = 0x23, - IMD_VOLTAGE_CAN_ID = 0x18EFF4FE, + CHARGER_CONTROL_CAN_ID = 0x1806E5F4, + CHARGER_DATA_CAN_ID = 0x18FF50E5, + DTI_CONTROL_1_CAN_ID = 0x116, + DTI_CONTROL_10_CAN_ID = 0xA16, + DTI_CONTROL_11_CAN_ID = 0xB16, + DTI_CONTROL_12_CAN_ID = 0xC16, + DTI_CONTROL_2_CAN_ID = 0x216, + DTI_CONTROL_3_CAN_ID = 0x316, + DTI_CONTROL_4_CAN_ID = 0x416, + DTI_CONTROL_5_CAN_ID = 0x516, + DTI_CONTROL_6_CAN_ID = 0x616, + DTI_CONTROL_7_CAN_ID = 0x716, + DTI_CONTROL_8_CAN_ID = 0x816, + DTI_CONTROL_9_CAN_ID = 0x916, + DTI_DATA_1_CAN_ID = 0x2016, + DTI_DATA_2_CAN_ID = 0x2116, + DTI_DATA_3_CAN_ID = 0x2216, + DTI_DATA_4_CAN_ID = 0x2316, + DTI_DATA_5_CAN_ID = 0x2416, + EM_MEAS_CAN_ID = 0x10D, + EM_STATUS_CAN_ID = 0x40D, + EM_TEAM_DATA_1_CAN_ID = 0x30D, + EM_TEAM_DATA_2_CAN_ID = 0x30E, + EM_TEMP_CAN_ID = 0x60D, + IMD_IT_SYSTEM_CAN_ID = 0x18EFF4FE, + IMD_GENERAL_CAN_ID = 0x18FF01F4, + IMD_ISOLATION_INFO_CAN_ID = 0x18EFF4FE, + IMD_REQUEST_CAN_ID = 0x18EFF4FE, + IMD_RESPONSE_CAN_ID = 0x23, + IMD_VOLTAGE_CAN_ID = 0x18EFF4FE, } GRCAN_CUSTOM_ID; #endif // CUSTOM_CAN_ID_H diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index c00113345..739ba7344 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -7,7 +7,7 @@ /** Ping */ typedef struct { /** Time in millis (Byte 0) */ - uint32_t timestamp; + uint32_t timestamp; } GRCAN_PING_MSG; /** ECU Status 1 */ @@ -21,7 +21,7 @@ typedef struct { 5: TS Discharge State 6-7: Reserved See diagram in StateMachine.h (Byte 0) */ - uint8_t ecu_state; + uint8_t ecu_state; /** [Byte 1 / Bits 8-15] ECU ping targets 8: ACU (1: OK, 0: Timeout) 9: GR Inv (1: OK, 0: Timeout) @@ -31,7 +31,7 @@ See diagram in StateMachine.h (Byte 0) */ 13: Dash Panel (1: OK, 0: Timeout) 14: TCM (1: OK, 0: Timeout) 15: DGPS (1: OK, 0: Timeout) (Byte 1) */ - uint8_t ping_group_1; + uint8_t ping_group_1; /** [Byte 2 / Bits 16-23] ECU ping targets 16: Suspension FL (1: OK, 0: Timeout) 17: Suspension FR (1: OK, 0: Timeout) @@ -41,7 +41,7 @@ See diagram in StateMachine.h (Byte 0) */ 21: InboardFloor FR (1: OK, 0: Timeout) 22: InboardFloor RL (1: OK, 0: Timeout) 23: InboardFloor RR (1: OK, 0: Timeout) (Byte 2) */ - uint8_t ping_group_2; + uint8_t ping_group_2; /** [Byte 3 / Bits 24-31] ECU ping targets 24: TireTemp FL (1: OK, 0: Timeout) 25: TireTemp FR (1: OK, 0: Timeout) @@ -51,58 +51,57 @@ See diagram in StateMachine.h (Byte 0) */ 29: BrakeTemp FR (1: OK, 0: Timeout) 30: BrakeTemp RL (1: OK, 0: Timeout) 31: BrakeTemp RR (1: OK, 0: Timeout) (Byte 3) */ - uint8_t ping_group_3; + uint8_t ping_group_3; /** Controls the AC current limits to each of the inverters -Discrete Mapping, actual current values described by the torque map The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 -/ 100 / 150 / 200 / 250 / 275, 2 and later is tbd (Byte 4) */ - uint8_t power_level_torque_map; +Discrete Mapping, actual current values described by the torque map The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 / 100 / 150 / 200 / 250 / 275, 2 and later is tbd (Byte 4) */ + uint8_t power_level_torque_map; /** the Temp of the hottest cell of the accumulator (Byte 5) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; /** % charged of the Accumulator (Byte 6) */ - uint8_t accumulator_state_of_chg; + uint8_t accumulator_state_of_chg; /** % charged of the Low Voltage Bat (Byte 7) */ - uint8_t glv_state_of_chg; + uint8_t glv_state_of_chg; } GRCAN_ECU_STATUS_1_MSG; /** ECU Status 2 */ typedef struct { /** Output terminal voltage of accumulator (Byte 0) */ - uint16_t tractive_system_voltage; + uint16_t tractive_system_voltage; /** Absolute value of speed (Byte 2) */ - uint16_t vehicle_speed; + uint16_t vehicle_speed; /** FL Wheel RPM (Byte 4) */ - uint16_t fl_wheel_rpm; + uint16_t fl_wheel_rpm; /** FR Wheel RPM (Byte 6) */ - uint16_t fr_wheel_rpm; + uint16_t fr_wheel_rpm; } GRCAN_ECU_STATUS_2_MSG; /** ECU Status 3 */ typedef struct { /** RL Wheel RPM (Byte 0) */ - uint16_t rl_wheel_rpm; + uint16_t rl_wheel_rpm; /** RR Wheel RPM (Byte 2) */ - uint16_t rr_wheel_rpm; + uint16_t rr_wheel_rpm; /** [Byte 4 / Bits 32-39] 0: BMS OK 1: IMD OK 2: BSPD OK 3: Software OK 4-7: Reserved (Byte 4) */ - uint8_t relay_states; + uint8_t relay_states; } GRCAN_ECU_STATUS_3_MSG; /** ACU Status 1 */ typedef struct { /** All cell voltages added up (Byte 0) */ - uint16_t accumulator_voltage; + uint16_t accumulator_voltage; /** Output terminal voltage of accumulator (Byte 2) */ - uint16_t ts_voltage; + uint16_t ts_voltage; /** Current output of accumulator (Byte 4) */ - uint16_t accumulator_current; + uint16_t accumulator_current; /** Accumulator state of Chg (Based on lowest cell) (Byte 6) */ - uint8_t accumulator_soc; + uint8_t accumulator_soc; /** GLV state of Chg (Byte 7) */ - uint8_t glv_soc; + uint8_t glv_soc; } GRCAN_ACU_STATUS_1_MSG; /** ACU Status 2 */ @@ -113,35 +112,35 @@ units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 0) */ - uint8_t _20v_voltage; + uint8_t _20v_voltage; /** 12v supply voltage data type: u8 units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 1) */ - uint8_t _12v_voltage; + uint8_t _12v_voltage; /** Voltage before ACU Latch data type: u8 units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 2) */ - uint8_t sdc_voltage; + uint8_t sdc_voltage; /** Lowest cell voltage in accumulator data type: u8 units: Volts scaled min: 2 scaled max: 4.55 map equation: "0.01x+2" (Byte 3) */ - uint8_t min_cell_voltage; + uint8_t min_cell_voltage; /** Hottest cell in accumulator data type: u8 units: Celsius scaled min: 0 scaled max: 63.75 map equation: "0.25x" (Byte 4) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; /** [Byte 5 / Bits 40-47] 40: Over Temp (>60C) 41: Over Voltage (>4.2V/cell) @@ -151,48 +150,48 @@ map equation: "0.25x" (Byte 4) */ 45: 20V GLV Warning 46: 12V Supply Warning 47: SDC Warning (Byte 5) */ - uint8_t status_flags; + uint8_t status_flags; /** [Byte 6 / Bits 48-55] 55: Precharge Timeout 54: IR- / Precharge State (0:Open, 1:Closed) 53: IR+ State (0:Open, 1:Closed) 52: Software Latch (0:Open, 1:Closed) 48-51: Reserved (Byte 6) */ - uint8_t precharge_latch_flags; + uint8_t precharge_latch_flags; } GRCAN_ACU_STATUS_2_MSG; /** ACU Status 3 */ typedef struct { /** 600v input voltage (Byte 0) */ - uint16_t hv_input_voltage; + uint16_t hv_input_voltage; /** 20v output voltage (Byte 2) */ - uint16_t hv_output_voltage; + uint16_t hv_output_voltage; /** 600v input current (Byte 4) */ - uint16_t hv_input_current; + uint16_t hv_input_current; /** 20v output current (Byte 6) */ - uint16_t hv_output_current; + uint16_t hv_output_current; } GRCAN_ACU_STATUS_3_MSG; /** ACU Precharge */ typedef struct { /** 0: shutdown, 1: go TS Active/Precharge (Byte 0) */ - uint8_t set_ts_active; + uint8_t set_ts_active; } GRCAN_ACU_PRECHARGE_MSG; /** ACU Config Chg Params */ typedef struct { /** Sets the Target Charging voltage (Byte 0) */ - uint16_t chg_voltage; + uint16_t chg_voltage; /** Sets the Target Charging Current (Byte 2) */ - uint16_t chg_current; + uint16_t chg_current; } GRCAN_ACU_CONFIG_CHG_PARAMS_MSG; /** ACU Config Op Params */ typedef struct { /** Sets the threshold for Minimum Cell Voltage before Shutdown (Byte 0) */ - uint8_t minimium_cell_voltage; + uint8_t minimium_cell_voltage; /** Sets the threshold for Max Cell Temp before Shutdown (Byte 1) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; } GRCAN_ACU_CONFIG_OP_PARAMS_MSG; /** ACU Cell Data 1 */ @@ -238,72 +237,71 @@ typedef struct { /** Inv Status 1 */ typedef struct { /** 0.01 * current, int16_t (Byte 0) */ - uint16_t ac_current; + uint16_t ac_current; /** 0.01 * current, int16_t (Byte 2) */ - uint16_t dc_current; + uint16_t dc_current; /** RPM, int16_t (Byte 4) */ - uint16_t motor_rpm; + uint16_t motor_rpm; } GRCAN_INV_STATUS_1_MSG; /** Inv Status 2 */ typedef struct { /** Celsius + 40, uint8_t (Byte 0) */ - uint16_t u_mosfet_temp; + uint16_t u_mosfet_temp; /** Celsius + 40, uint8_t (Byte 2) */ - uint16_t v_mosfet_temp; + uint16_t v_mosfet_temp; /** Celsius + 40, uint8_t (Byte 4) */ - uint16_t w_mosfet_temp; + uint16_t w_mosfet_temp; } GRCAN_INV_STATUS_2_MSG; /** Inv Status 3 */ typedef struct { /** Celsius + 40, uint8_t (Byte 0) */ - uint8_t motor_temp; - /** TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or - * timeout (Byte 1) */ - uint8_t fault_bits; + uint8_t motor_temp; + /** TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or timeout (Byte 1) */ + uint8_t fault_bits; } GRCAN_INV_STATUS_3_MSG; /** Inv Config */ typedef struct { /** Max AC Current (Byte 0) */ - uint16_t max_ac_current; + uint16_t max_ac_current; /** Max DC Current (Byte 2) */ - uint16_t max_dc_current; + uint16_t max_dc_current; /** 0: No limit n :limited at n RPM (Byte 4) */ - uint16_t absolute_max_rpm_limit; + uint16_t absolute_max_rpm_limit; /** Write 1 inverts direction (Byte 6) */ - uint8_t motor_direction; + uint8_t motor_direction; } GRCAN_INV_CONFIG_MSG; /** Inv Cmd */ typedef struct { /** Commanded AC Current (Byte 0) */ - uint16_t set_ac_current; + uint16_t set_ac_current; /** Commanded DC Current (Byte 2) */ - uint16_t set_dc_current; + uint16_t set_dc_current; /** 0: No limit n :limited at n RPM (Byte 4) */ - uint16_t rpm_limit; + uint16_t rpm_limit; /** Field weakening strength (Byte 6) */ - uint8_t field_weakening; + uint8_t field_weakening; /** Write this to 1 every 100ms to enable Inv (Byte 7) */ - uint8_t drive_enable; + uint8_t drive_enable; } GRCAN_INV_CMD_MSG; /** Fan Status */ typedef struct { /** Fan RPM (Byte 0) */ - uint16_t fan_speed; + uint16_t fan_speed; /** 0-22 (Byte 2) */ - uint8_t input_voltage; + uint8_t input_voltage; /** 0-10 (Byte 3) */ - uint8_t input_current; + uint8_t input_current; } GRCAN_FAN_STATUS_MSG; /** Fan Cmd */ typedef struct { /** 0-100 Percent (Byte 0) */ - uint8_t fan_cmd; + uint8_t fan_cmd; } GRCAN_FAN_CMD_MSG; /** Dash Status */ @@ -314,12 +312,12 @@ typedef struct { 5: TS Off 6: RTD On 7: TS On (Byte 0) */ - uint8_t button_flags; + uint8_t button_flags; /** [Byte 1 / Bits 8-15] 0-5: Reserved 6: IMD 7: BMS (Byte 1) */ - uint8_t led_flags; + uint8_t led_flags; } GRCAN_DASH_STATUS_MSG; /** Dash Config */ @@ -332,1921 +330,1921 @@ typedef struct { 4: IMD latch 5: BMS latch 6-7: Reserved (Byte 0) */ - uint8_t led_latch_flags; + uint8_t led_latch_flags; } GRCAN_DASH_CONFIG_MSG; /** ECU Analog Data */ typedef struct { /** 4-20 mA signal (Byte 0) */ - uint16_t bspd_signal; + uint16_t bspd_signal; /** 4-20 mA signal (Byte 2) */ - uint16_t bse_signal; + uint16_t bse_signal; /** 4-20 mA signal (Byte 4) */ - uint16_t apps_1_signal; + uint16_t apps_1_signal; /** 4-20 mA signal (Byte 6) */ - uint16_t apps_2_signal; + uint16_t apps_2_signal; /** 4-20 mA signal (Byte 8) */ - uint16_t brakeline_f_signal; + uint16_t brakeline_f_signal; /** 4-20 mA signal (Byte 10) */ - uint16_t brakeline_r_signal; + uint16_t brakeline_r_signal; /** 4-20 mA signal (Byte 12) */ - uint16_t steering_angle_signal; + uint16_t steering_angle_signal; /** 4-20 mA signal (Byte 14) */ - uint16_t aux_signal; + uint16_t aux_signal; /** 0-100% percentage (Byte 16) */ - uint16_t acc_pedal_travel; + uint16_t acc_pedal_travel; /** Pressure (Byte 18) */ - uint16_t brake_pedal_pressure; + uint16_t brake_pedal_pressure; } GRCAN_ECU_ANALOG_DATA_MSG; /** GPS LAT */ typedef struct { /** lattitude (Byte 0) */ - uint8_t lat; + uint8_t lat; } GRCAN_GPS_LAT_MSG; /** GPS LON */ typedef struct { /** longitude (Byte 0) */ - uint8_t lon; + uint8_t lon; } GRCAN_GPS_LON_MSG; /** GPS ALT */ typedef struct { /** altitude (Byte 0) */ - uint8_t alt; + uint8_t alt; } GRCAN_GPS_ALT_MSG; /** GPS PX */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_PX_MSG; /** GPS QY */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_QY_MSG; /** GPS RZ */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_RZ_MSG; /** UVW DGPS */ typedef struct { /** U (Byte 0) */ - uint16_t dgps_u; + uint16_t dgps_u; /** V (Byte 2) */ - uint16_t dgps_v; + uint16_t dgps_v; /** W (Byte 4) */ - uint16_t dgps_w; + uint16_t dgps_w; } GRCAN_UVW_DGPS_MSG; /** ECU Pinging RTT */ typedef struct { /** Round trip time (Byte 0) */ - uint8_t acu_rtt; + uint8_t acu_rtt; /** Round trip time (Byte 1) */ - uint8_t gr_inv_rtt; + uint8_t gr_inv_rtt; /** Round trip time (Byte 2) */ - uint8_t fan_ctrl_1_rtt; + uint8_t fan_ctrl_1_rtt; /** Round trip time (Byte 3) */ - uint8_t fan_ctrl_2_rtt; + uint8_t fan_ctrl_2_rtt; /** Round trip time (Byte 4) */ - uint8_t fan_ctrl_3_rtt; + uint8_t fan_ctrl_3_rtt; /** Round trip time (Byte 5) */ - uint8_t dash_panel_rtt; + uint8_t dash_panel_rtt; /** Round trip time (Byte 6) */ - uint8_t tcm_rtt; + uint8_t tcm_rtt; /** Round trip time (Byte 7) */ - uint8_t tire_temp_fl_rtt; + uint8_t tire_temp_fl_rtt; /** Round trip time (Byte 8) */ - uint8_t tire_temp_fr_rtt; + uint8_t tire_temp_fr_rtt; /** Round trip time (Byte 9) */ - uint8_t tire_temp_rl_rtt; + uint8_t tire_temp_rl_rtt; /** Round trip time (Byte 10) */ - uint8_t tire_temp_rr_rtt; + uint8_t tire_temp_rr_rtt; /** Round trip time (Byte 11) */ - uint8_t suspension_node_fl_rtt; + uint8_t suspension_node_fl_rtt; /** Round trip time (Byte 12) */ - uint8_t suspension_node_fr_rtt; + uint8_t suspension_node_fr_rtt; /** Round trip time (Byte 13) */ - uint8_t suspension_node_rl_rtt; + uint8_t suspension_node_rl_rtt; /** Round trip time (Byte 14) */ - uint8_t suspension_node_rr_rtt; + uint8_t suspension_node_rr_rtt; /** Round trip time (Byte 15) */ - uint8_t inboard_floor_fl_rtt; + uint8_t inboard_floor_fl_rtt; /** Round trip time (Byte 16) */ - uint8_t inboard_floor_fr_rtt; + uint8_t inboard_floor_fr_rtt; /** Round trip time (Byte 17) */ - uint8_t inboard_floor_rl_rtt; + uint8_t inboard_floor_rl_rtt; /** Round trip time (Byte 18) */ - uint8_t inboard_floor_rr_rtt; + uint8_t inboard_floor_rr_rtt; /** Round trip time (Byte 19) */ - uint8_t brake_temp_fl_rtt; + uint8_t brake_temp_fl_rtt; /** Round trip time (Byte 20) */ - uint8_t brake_temp_fr_rtt; + uint8_t brake_temp_fr_rtt; /** Round trip time (Byte 21) */ - uint8_t brake_temp_rl_rtt; + uint8_t brake_temp_rl_rtt; /** Round trip time (Byte 22) */ - uint8_t brake_temp_rr_rtt; + uint8_t brake_temp_rr_rtt; /** Round trip time (Byte 23) */ - uint8_t dgps_rtt; + uint8_t dgps_rtt; } GRCAN_ECU_PINGING_RTT_MSG; /** Tire Temp Frame 0 */ typedef struct { /** Tire Temp frame 0 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 0 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 0 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 0 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 0 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 0 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 0 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 0 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 0 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 0 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 0 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 0 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 0 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 0 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 0 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 0 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 0 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 0 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 0 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 0 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 0 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 0 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 0 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 0 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 0 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 0 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 0 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 0 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 0 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 0 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 0 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 0 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_0_MSG; /** Tire Temp Frame 1 */ typedef struct { /** Tire Temp frame 1 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 1 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 1 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 1 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 1 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 1 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 1 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 1 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 1 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 1 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 1 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 1 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 1 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 1 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 1 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 1 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 1 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 1 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 1 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 1 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 1 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 1 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 1 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 1 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 1 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 1 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 1 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 1 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 1 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 1 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 1 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 1 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_1_MSG; /** Tire Temp Frame 2 */ typedef struct { /** Tire Temp frame 2 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 2 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 2 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 2 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 2 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 2 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 2 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 2 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 2 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 2 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 2 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 2 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 2 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 2 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 2 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 2 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 2 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 2 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 2 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 2 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 2 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 2 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 2 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 2 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 2 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 2 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 2 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 2 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 2 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 2 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 2 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 2 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_2_MSG; /** Tire Temp Frame 3 */ typedef struct { /** Tire Temp frame 3 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 3 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 3 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 3 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 3 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 3 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 3 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 3 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 3 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 3 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 3 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 3 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 3 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 3 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 3 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 3 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 3 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 3 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 3 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 3 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 3 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 3 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 3 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 3 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 3 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 3 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 3 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 3 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 3 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 3 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 3 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 3 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_3_MSG; /** Tire Temp Frame 4 */ typedef struct { /** Tire Temp frame 4 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 4 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 4 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 4 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 4 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 4 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 4 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 4 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 4 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 4 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 4 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 4 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 4 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 4 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 4 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 4 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 4 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 4 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 4 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 4 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 4 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 4 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 4 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 4 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 4 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 4 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 4 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 4 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 4 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 4 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 4 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 4 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_4_MSG; /** Tire Temp Frame 5 */ typedef struct { /** Tire Temp frame 5 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 5 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 5 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 5 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 5 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 5 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 5 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 5 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 5 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 5 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 5 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 5 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 5 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 5 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 5 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 5 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 5 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 5 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 5 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 5 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 5 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 5 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 5 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 5 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 5 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 5 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 5 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 5 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 5 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 5 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 5 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 5 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_5_MSG; /** Tire Temp Frame 6 */ typedef struct { /** Tire Temp frame 6 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 6 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 6 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 6 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 6 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 6 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 6 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 6 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 6 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 6 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 6 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 6 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 6 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 6 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 6 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 6 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 6 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 6 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 6 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 6 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 6 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 6 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 6 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 6 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 6 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 6 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 6 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 6 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 6 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 6 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 6 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 6 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_6_MSG; /** Tire Temp Frame 7 */ typedef struct { /** Tire Temp frame 7 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 7 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 7 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 7 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 7 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 7 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 7 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 7 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 7 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 7 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 7 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 7 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 7 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 7 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 7 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 7 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 7 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 7 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 7 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 7 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 7 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 7 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 7 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 7 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 7 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 7 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 7 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 7 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 7 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 7 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 7 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 7 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_7_MSG; /** Tire Temp Frame 8 */ typedef struct { /** Tire Temp frame 8 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 8 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 8 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 8 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 8 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 8 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 8 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 8 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 8 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 8 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 8 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 8 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 8 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 8 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 8 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 8 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 8 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 8 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 8 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 8 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 8 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 8 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 8 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 8 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 8 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 8 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 8 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 8 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 8 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 8 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 8 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 8 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_8_MSG; /** Tire Temp Frame 9 */ typedef struct { /** Tire Temp frame 9 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 9 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 9 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 9 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 9 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 9 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 9 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 9 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 9 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 9 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 9 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 9 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 9 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 9 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 9 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 9 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 9 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 9 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 9 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 9 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 9 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 9 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 9 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 9 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 9 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 9 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 9 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 9 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 9 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 9 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 9 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 9 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_9_MSG; /** Tire Temp Frame 10 */ typedef struct { /** Tire Temp frame 10 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 10 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 10 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 10 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 10 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 10 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 10 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 10 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 10 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 10 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 10 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 10 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 10 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 10 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 10 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 10 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 10 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 10 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 10 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 10 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 10 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 10 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 10 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 10 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 10 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 10 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 10 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 10 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 10 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 10 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 10 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 10 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_10_MSG; /** Tire Temp Frame 11 */ typedef struct { /** Tire Temp frame 11 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 11 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 11 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 11 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 11 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 11 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 11 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 11 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 11 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 11 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 11 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 11 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 11 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 11 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 11 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 11 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 11 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 11 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 11 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 11 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 11 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 11 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 11 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 11 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 11 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 11 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 11 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 11 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 11 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 11 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 11 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 11 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_11_MSG; /** Tire Temp Frame 12 */ typedef struct { /** Tire Temp frame 12 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 12 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 12 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 12 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 12 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 12 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 12 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 12 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 12 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 12 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 12 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 12 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 12 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 12 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 12 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 12 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 12 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 12 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 12 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 12 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 12 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 12 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 12 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 12 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 12 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 12 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 12 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 12 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 12 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 12 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 12 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 12 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_12_MSG; /** Tire Temp Frame 13 */ typedef struct { /** Tire Temp frame 13 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 13 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 13 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 13 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 13 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 13 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 13 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 13 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 13 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 13 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 13 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 13 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 13 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 13 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 13 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 13 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 13 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 13 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 13 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 13 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 13 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 13 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 13 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 13 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 13 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 13 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 13 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 13 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 13 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 13 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 13 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 13 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_13_MSG; /** Tire Temp Frame 14 */ typedef struct { /** Tire Temp frame 14 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 14 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 14 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 14 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 14 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 14 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 14 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 14 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 14 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 14 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 14 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 14 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 14 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 14 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 14 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 14 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 14 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 14 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 14 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 14 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 14 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 14 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 14 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 14 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 14 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 14 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 14 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 14 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 14 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 14 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 14 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 14 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_14_MSG; /** Tire Temp Frame 15 */ typedef struct { /** Tire Temp frame 15 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 15 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 15 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 15 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 15 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 15 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 15 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 15 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 15 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 15 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 15 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 15 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 15 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 15 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 15 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 15 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 15 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 15 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 15 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 15 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 15 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 15 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 15 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 15 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 15 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 15 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 15 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 15 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 15 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 15 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 15 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 15 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_15_MSG; /** Tire Temp Frame 16 */ typedef struct { /** Tire Temp frame 16 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 16 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 16 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 16 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 16 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 16 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 16 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 16 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 16 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 16 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 16 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 16 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 16 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 16 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 16 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 16 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 16 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 16 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 16 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 16 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 16 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 16 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 16 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 16 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 16 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 16 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 16 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 16 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 16 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 16 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 16 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 16 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_16_MSG; /** Tire Temp Frame 17 */ typedef struct { /** Tire Temp frame 17 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 17 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 17 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 17 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 17 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 17 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 17 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 17 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 17 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 17 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 17 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 17 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 17 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 17 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 17 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 17 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 17 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 17 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 17 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 17 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 17 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 17 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 17 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 17 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 17 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 17 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 17 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 17 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 17 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 17 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 17 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 17 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_17_MSG; /** Tire Temp Frame 18 */ typedef struct { /** Tire Temp frame 18 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 18 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 18 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 18 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 18 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 18 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 18 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 18 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 18 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 18 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 18 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 18 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 18 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 18 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 18 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 18 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 18 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 18 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 18 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 18 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 18 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 18 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 18 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 18 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 18 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 18 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 18 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 18 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 18 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 18 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 18 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 18 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_18_MSG; /** Tire Temp Frame 19 */ typedef struct { /** Tire Temp frame 19 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 19 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 19 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 19 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 19 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 19 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 19 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 19 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 19 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 19 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 19 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 19 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 19 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 19 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 19 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 19 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 19 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 19 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 19 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 19 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 19 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 19 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 19 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 19 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 19 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 19 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 19 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 19 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 19 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 19 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 19 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 19 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_19_MSG; /** Tire Temp Frame 20 */ typedef struct { /** Tire Temp frame 20 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 20 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 20 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 20 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 20 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 20 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 20 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 20 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 20 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 20 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 20 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 20 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 20 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 20 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 20 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 20 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 20 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 20 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 20 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 20 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 20 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 20 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 20 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 20 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 20 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 20 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 20 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 20 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 20 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 20 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 20 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 20 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_20_MSG; /** Tire Temp Frame 21 */ typedef struct { /** Tire Temp frame 21 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 21 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 21 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 21 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 21 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 21 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 21 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 21 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 21 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 21 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 21 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 21 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 21 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 21 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 21 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 21 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 21 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 21 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 21 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 21 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 21 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 21 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 21 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 21 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 21 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 21 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 21 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 21 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 21 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 21 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 21 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 21 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_21_MSG; /** Tire Temp Frame 22 */ typedef struct { /** Tire Temp frame 22 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 22 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 22 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 22 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 22 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 22 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 22 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 22 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 22 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 22 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 22 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 22 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 22 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 22 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 22 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 22 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 22 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 22 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 22 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 22 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 22 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 22 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 22 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 22 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 22 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 22 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 22 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 22 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 22 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 22 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 22 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 22 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_22_MSG; /** Tire Temp Frame 23 */ typedef struct { /** Tire Temp frame 23 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 23 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 23 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 23 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 23 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 23 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 23 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 23 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 23 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 23 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 23 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 23 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 23 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 23 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 23 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 23 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 23 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 23 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 23 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 23 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 23 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 23 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 23 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 23 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 23 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 23 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 23 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 23 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 23 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 23 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 23 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 23 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_23_MSG; /** Brake Temp */ typedef struct { /** Brake rotor Temp (Byte 0) */ - uint16_t temp; + uint16_t temp; } GRCAN_BRAKE_TEMP_MSG; /** Wheel Speed */ typedef struct { /** Wheel speed rpm (Byte 0) */ - uint16_t speed; + uint16_t speed; } GRCAN_WHEEL_SPEED_MSG; /** Suspension IMU Mag Data */ typedef struct { /** BMI323 accelerometer X (Byte 0) */ - uint16_t bmi323_acc_x; + uint16_t bmi323_acc_x; /** BMI323 accelerometer Y (Byte 2) */ - uint16_t bmi323_acc_y; + uint16_t bmi323_acc_y; /** BMI323 accelerometer Z (Byte 4) */ - uint16_t bmi323_acc_z; + uint16_t bmi323_acc_z; /** BMI323 gyroscope X (Byte 6) */ - uint16_t bmi323_gyro_x; + uint16_t bmi323_gyro_x; /** BMI323 gyroscope Y (Byte 8) */ - uint16_t bmi323_gyro_y; + uint16_t bmi323_gyro_y; /** BMI323 gyroscope Z (Byte 10) */ - uint16_t bmi323_gyro_z; + uint16_t bmi323_gyro_z; /** BMI323 temperature (Byte 12) */ - uint16_t bmi323_temp; + uint16_t bmi323_temp; /** BMI323 status (Byte 14) */ - uint16_t bmi323_status; + uint16_t bmi323_status; /** Magnetic encoder temperature (Byte 16) */ - uint16_t mag_temp; + uint16_t mag_temp; /** The lineation of groupings for hysteresis (Byte 18) */ - uint16_t mag_hysteresis; + uint16_t mag_hysteresis; /** Magnetic encoder angle (Byte 20) */ - uint16_t mag_angle; + uint16_t mag_angle; /** Magnetic encoder turns (Byte 22) */ - uint16_t mag_turns; + uint16_t mag_turns; /** Magnetic encoder status (Byte 24) */ - uint8_t mag_status; + uint8_t mag_status; /** Reserved (Byte 25) */ - uint16_t reserved; + uint16_t reserved; } GRCAN_SUSPENSION_IMU_MAG_DATA_MSG; /** InboardFloor IMU ToF Data */ typedef struct { /** BMI323 accelerometer X (Byte 0) */ - uint16_t bmi323_acc_x; + uint16_t bmi323_acc_x; /** BMI323 accelerometer Y (Byte 2) */ - uint16_t bmi323_acc_y; + uint16_t bmi323_acc_y; /** BMI323 accelerometer Z (Byte 4) */ - uint16_t bmi323_acc_z; + uint16_t bmi323_acc_z; /** BMI323 gyroscope X (Byte 6) */ - uint16_t bmi323_gyro_x; + uint16_t bmi323_gyro_x; /** BMI323 gyroscope Y (Byte 8) */ - uint16_t bmi323_gyro_y; + uint16_t bmi323_gyro_y; /** BMI323 gyroscope Z (Byte 10) */ - uint16_t bmi323_gyro_z; + uint16_t bmi323_gyro_z; /** BMI323 temperature (Byte 12) */ - uint16_t bmi323_temp; + uint16_t bmi323_temp; /** BMI323 status (Byte 14) */ - uint16_t bmi323_status; + uint16_t bmi323_status; /** Time-of-flight range status (Byte 16) */ - uint8_t range_status; + uint8_t range_status; /** Time-of-flight distance (Byte 17) */ - uint16_t distance_mm; + uint16_t distance_mm; /** Time-of-flight ambient rate (Byte 19) */ - uint16_t ambient_rate_kcps; + uint16_t ambient_rate_kcps; /** Time-of-flight ambient rate per SPAD (Byte 21) */ - uint16_t ambient_per_spad_kcps; + uint16_t ambient_per_spad_kcps; /** Time-of-flight signal rate (Byte 23) */ - uint16_t signal_rate_kcps; + uint16_t signal_rate_kcps; /** Time-of-flight signal rate per SPAD (Byte 25) */ - uint16_t signal_per_spad_kcps; + uint16_t signal_per_spad_kcps; /** Time-of-flight SPAD count (Byte 27) */ - uint16_t number_of_spad; + uint16_t number_of_spad; /** Time-of-flight sigma (Byte 29) */ - uint16_t sigma_mm; + uint16_t sigma_mm; /** Byte 31 (Byte 31) */ - uint8_t reserved; + uint8_t reserved; } GRCAN_INBOARDFLOOR_IMU_TOF_DATA_MSG; /** ECU Config */ typedef struct { /** Delay for which to consider pings timed out (Byte 0) */ - uint8_t ping_timeout_delay; + uint8_t ping_timeout_delay; /** Minimum brake f psi for which to consider the brakes pressed (Byte 1) */ - uint8_t brake_f_min; + uint8_t brake_f_min; /** Minimum brake r psi for which to consider the brakes pressed (Byte 2) */ - uint8_t brake_r_min; + uint8_t brake_r_min; /** Minimum brake bse psi for which to consider the brakes pressed (Byte 3) */ - uint8_t brake_bse_min; + uint8_t brake_bse_min; /** Minimum value that the APPS 1 sensor is expected to read (Byte 4) */ - uint8_t apps_1_min; + uint8_t apps_1_min; /** Minimum value that the APPS 2 sensor is expected to read (Byte 5) */ - uint8_t apps_2_min; + uint8_t apps_2_min; /** Maximum value that the APPS 1 sensor is expected to read (Byte 6) */ - uint8_t apps_1_max; + uint8_t apps_1_max; /** Maximum value that the APPS 2 sensor is expected to read (Byte 7) */ - uint8_t apps_2_max; + uint8_t apps_2_max; /** Percentage deadzone of the APPS for which to not consider the pedals to have traveled (Byte 8) */ - uint8_t apps_deadzone; + uint8_t apps_deadzone; /** Minimum acceptable BMS sense value such that the BMS is not considered in failure (Byte 9) */ - uint8_t bms_min_threshold; + uint8_t bms_min_threshold; /** Maximum acceptable BMS sense value such that the BMS is not considered in failure (Byte 10) */ - uint8_t bms_max_threshold; + uint8_t bms_max_threshold; /** Minimum acceptable IMD sense value such that the BMS is not considered in failure (Byte 11) */ - uint8_t imd_min_threshold; + uint8_t imd_min_threshold; /** Maximum acceptable IMD sense value such that the BMS is not considered in failure (Byte 12) */ - uint8_t imd_max_threshold; + uint8_t imd_max_threshold; /** Minimum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 13) */ - uint8_t bspd_min_threshold; + uint8_t bspd_min_threshold; /** Maximum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 14) */ - uint8_t bspd_max_threshold; + uint8_t bspd_max_threshold; /** Maximum acceptable time to remain precharging before discharging (Byte 15) */ - uint8_t max_precharge_time; + uint8_t max_precharge_time; /** TBD (Byte 16) */ - uint8_t regen_strength; + uint8_t regen_strength; /** Enable or disable regenerative braking (Byte 17) */ - uint8_t enable_regen; + uint8_t enable_regen; /** Reserved (Byte 18) */ - uint16_t reserved; + uint16_t reserved; } GRCAN_ECU_CONFIG_MSG; /** DC-DC Status */ typedef struct { /** ~20v for LV (LV only. Send 0 for HV) (Byte 0) */ - uint16_t input_voltage; + uint16_t input_voltage; /** ~12v for LV and ~20v for HV (Byte 2) */ - uint16_t output_voltage; + uint16_t output_voltage; /** Input current (LV only. Send 0 for HV) (Byte 4) */ - uint8_t input_current; + uint8_t input_current; /** Output current (Byte 5) */ - uint8_t output_current; + uint8_t output_current; /** Temp of DC-DC converter (Byte 6) */ - uint8_t dc_dc_temp; + uint8_t dc_dc_temp; } GRCAN_DC_DC_STATUS_MSG; /** RTD Light Ctrl */ typedef struct { /** Intensity of the red channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t red; + uint8_t red; /** Intensity of the green channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t green; + uint8_t green; /** Intensity of the blue channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t blue; + uint8_t blue; } GRCAN_RTD_LIGHT_CTRL_MSG; #endif diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index 2e49cc2d2..626399008 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -3,71 +3,72 @@ #define CAN_MSG_IDS_H typedef enum { - GRCAN_DEBUG_2_0 = 0x000, - GRCAN_DEBUG_FD = 0x001, - GRCAN_PING = 0x002, - GRCAN_ECU_STATUS_1 = 0x003, - GRCAN_ECU_STATUS_2 = 0x004, - GRCAN_ECU_STATUS_3 = 0x005, - GRCAN_ACU_STATUS_1 = 0x007, - GRCAN_ACU_STATUS_2 = 0x008, - GRCAN_ACU_STATUS_3 = 0x009, - GRCAN_ACU_PRECHARGE = 0x00A, - GRCAN_ACU_CONFIG_CHG_PARAMS = 0x00B, - GRCAN_ACU_CONFIG_OP_PARAMS = 0x00C, - GRCAN_ACU_CELL_DATA_1 = 0x00D, - GRCAN_ACU_CELL_DATA_2 = 0x00E, - GRCAN_ACU_CELL_DATA_3 = 0x00F, - GRCAN_ACU_CELL_DATA_4 = 0x010, - GRCAN_ACU_CELL_DATA_5 = 0x011, - GRCAN_INV_STATUS_1 = 0x013, - GRCAN_INV_STATUS_2 = 0x014, - GRCAN_INV_STATUS_3 = 0x015, - GRCAN_INV_CONFIG = 0x016, - GRCAN_INV_CMD = 0x017, - GRCAN_FAN_STATUS = 0x018, - GRCAN_FAN_CMD = 0x019, - GRCAN_DASH_STATUS = 0x01A, - GRCAN_DASH_CONFIG = 0x01B, - GRCAN_ECU_PINGING_RTT = 0x2D, - GRCAN_ECU_ANALOG_DATA = 0x02E, - GRCAN_ECU_CONFIG = 0x02F, - GRCAN_UVW_DGPS = 0x030, - GRCAN_GPS_LAT = 0x031, - GRCAN_GPS_LON = 0x032, - GRCAN_GPS_ALT = 0x033, - GRCAN_GPS_PX = 0x034, - GRCAN_GPS_QY = 0x035, - GRCAN_GPS_RZ = 0x036, - GRCAN_TIRE_TEMP_FRAME_0 = 0x037, - GRCAN_TIRE_TEMP_FRAME_1 = 0x038, - GRCAN_TIRE_TEMP_FRAME_2 = 0x039, - GRCAN_TIRE_TEMP_FRAME_3 = 0x03A, - GRCAN_TIRE_TEMP_FRAME_4 = 0x03B, - GRCAN_TIRE_TEMP_FRAME_5 = 0x03C, - GRCAN_TIRE_TEMP_FRAME_6 = 0x03D, - GRCAN_TIRE_TEMP_FRAME_7 = 0x03E, - GRCAN_TIRE_TEMP_FRAME_8 = 0x03F, - GRCAN_TIRE_TEMP_FRAME_9 = 0x040, - GRCAN_TIRE_TEMP_FRAME_10 = 0x041, - GRCAN_TIRE_TEMP_FRAME_11 = 0x042, - GRCAN_TIRE_TEMP_FRAME_12 = 0x043, - GRCAN_TIRE_TEMP_FRAME_13 = 0x044, - GRCAN_TIRE_TEMP_FRAME_14 = 0x045, - GRCAN_TIRE_TEMP_FRAME_15 = 0x046, - GRCAN_TIRE_TEMP_FRAME_16 = 0x047, - GRCAN_TIRE_TEMP_FRAME_17 = 0x048, - GRCAN_TIRE_TEMP_FRAME_18 = 0x049, - GRCAN_TIRE_TEMP_FRAME_19 = 0x04A, - GRCAN_TIRE_TEMP_FRAME_20 = 0x04B, - GRCAN_TIRE_TEMP_FRAME_21 = 0x04C, - GRCAN_TIRE_TEMP_FRAME_22 = 0x04D, - GRCAN_TIRE_TEMP_FRAME_23 = 0x04E, - GRCAN_BRAKE_TEMP = 0x04F, - GRCAN_WHEEL_SPEED = 0x050, - GRCAN_SUSPENSION_IMU_MAG_DATA = 0x051, - GRCAN_INBOARDFLOOR_IMU_TOF_DATA = 0x052, - GRCAN_RTD_LIGHT_CTRL = 0x53, +GRCAN_DEBUG_2_0 = 0x000, +GRCAN_DEBUG_FD = 0x001, +GRCAN_PING = 0x002, +GRCAN_ECU_STATUS_1 = 0x003, +GRCAN_ECU_STATUS_2 = 0x004, +GRCAN_ECU_STATUS_3 = 0x005, +GRCAN_ACU_STATUS_1 = 0x007, +GRCAN_ACU_STATUS_2 = 0x008, +GRCAN_ACU_STATUS_3 = 0x009, +GRCAN_ACU_PRECHARGE = 0x00A, +GRCAN_ACU_CONFIG_CHG_PARAMS = 0x00B, +GRCAN_ACU_CONFIG_OP_PARAMS = 0x00C, +GRCAN_ACU_CELL_DATA_1 = 0x00D, +GRCAN_ACU_CELL_DATA_2 = 0x00E, +GRCAN_ACU_CELL_DATA_3 = 0x00F, +GRCAN_ACU_CELL_DATA_4 = 0x010, +GRCAN_ACU_CELL_DATA_5 = 0x011, +GRCAN_DC_DC_STATUS = 0x012, +GRCAN_INV_STATUS_1 = 0x013, +GRCAN_INV_STATUS_2 = 0x014, +GRCAN_INV_STATUS_3 = 0x015, +GRCAN_INV_CONFIG = 0x016, +GRCAN_INV_CMD = 0x017, +GRCAN_FAN_STATUS = 0x018, +GRCAN_FAN_CMD = 0x019, +GRCAN_DASH_STATUS = 0x01A, +GRCAN_DASH_CONFIG = 0x01B, +GRCAN_ECU_PINGING_RTT = 0x2D, +GRCAN_ECU_ANALOG_DATA = 0x02E, +GRCAN_ECU_CONFIG = 0x02F, +GRCAN_UVW_DGPS = 0x030, +GRCAN_GPS_LAT = 0x031, +GRCAN_GPS_LON = 0x032, +GRCAN_GPS_ALT = 0x033, +GRCAN_GPS_PX = 0x034, +GRCAN_GPS_QY = 0x035, +GRCAN_GPS_RZ = 0x036, +GRCAN_TIRE_TEMP_FRAME_0 = 0x037, +GRCAN_TIRE_TEMP_FRAME_1 = 0x038, +GRCAN_TIRE_TEMP_FRAME_2 = 0x039, +GRCAN_TIRE_TEMP_FRAME_3 = 0x03A, +GRCAN_TIRE_TEMP_FRAME_4 = 0x03B, +GRCAN_TIRE_TEMP_FRAME_5 = 0x03C, +GRCAN_TIRE_TEMP_FRAME_6 = 0x03D, +GRCAN_TIRE_TEMP_FRAME_7 = 0x03E, +GRCAN_TIRE_TEMP_FRAME_8 = 0x03F, +GRCAN_TIRE_TEMP_FRAME_9 = 0x040, +GRCAN_TIRE_TEMP_FRAME_10 = 0x041, +GRCAN_TIRE_TEMP_FRAME_11 = 0x042, +GRCAN_TIRE_TEMP_FRAME_12 = 0x043, +GRCAN_TIRE_TEMP_FRAME_13 = 0x044, +GRCAN_TIRE_TEMP_FRAME_14 = 0x045, +GRCAN_TIRE_TEMP_FRAME_15 = 0x046, +GRCAN_TIRE_TEMP_FRAME_16 = 0x047, +GRCAN_TIRE_TEMP_FRAME_17 = 0x048, +GRCAN_TIRE_TEMP_FRAME_18 = 0x049, +GRCAN_TIRE_TEMP_FRAME_19 = 0x04A, +GRCAN_TIRE_TEMP_FRAME_20 = 0x04B, +GRCAN_TIRE_TEMP_FRAME_21 = 0x04C, +GRCAN_TIRE_TEMP_FRAME_22 = 0x04D, +GRCAN_TIRE_TEMP_FRAME_23 = 0x04E, +GRCAN_BRAKE_TEMP = 0x04F, +GRCAN_WHEEL_SPEED = 0x050, +GRCAN_SUSPENSION_IMU_MAG_DATA = 0x051, +GRCAN_INBOARDFLOOR_IMU_TOF_DATA = 0x052, +GRCAN_RTD_LIGHT_CTRL = 0x53, } GRCAN_MSG_ID; #endif // CAN_MSG_IDS_H diff --git a/Autogen/CAN/Inc/GRCAN_NODE_ID.h b/Autogen/CAN/Inc/GRCAN_NODE_ID.h index e89745227..b54f03282 100644 --- a/Autogen/CAN/Inc/GRCAN_NODE_ID.h +++ b/Autogen/CAN/Inc/GRCAN_NODE_ID.h @@ -3,41 +3,41 @@ #define GR_IDS_H typedef enum { - GRCAN_ALL = 0x00, - GRCAN_Charger = 0x00, - GRCAN_DTI_Inv = 0x00, - GRCAN_EM = 0x00, - GRCAN_IMD = 0x00, - GRCAN_Debugger = 0x01, - GRCAN_CCU = 0x02, - GRCAN_ECU = 0x02, - GRCAN_ACU = 0x03, - GRCAN_TCM = 0x04, - GRCAN_Dash_Panel = 0x05, - GRCAN_GR_Inv = 0x08, - GRCAN_Charging_SDC = 0x0C, - GRCAN_Fan_Ctrl_1 = 0x0D, - GRCAN_Fan_Ctrl_2 = 0x0E, - GRCAN_Fan_Ctrl_3 = 0x0F, - GRCAN_TireTemp_FL = 0x10, - GRCAN_TireTemp_FR = 0x11, - GRCAN_TireTemp_RL = 0x12, - GRCAN_TireTemp_RR = 0x13, - GRCAN_Suspension_FL = 0x14, - GRCAN_Suspension_FR = 0x15, - GRCAN_Suspension_RL = 0x16, - GRCAN_Suspension_RR = 0x17, - GRCAN_InboardFloor_FL = 0x18, - GRCAN_InboardFloor_FR = 0x19, - GRCAN_InboardFloor_RL = 0x1A, - GRCAN_InboardFloor_RR = 0x1B, - GRCAN_BrakeTemp_FL = 0x1C, - GRCAN_BrakeTemp_FR = 0x1D, - GRCAN_BrakeTemp_RL = 0x1E, - GRCAN_BrakeTemp_RR = 0x1F, - GRCAN_DGPS = 0x20, - GRCAN_LV_DC_DC = 0x29, - GRCAN_HV_DC_DC = 0x2A, + GRCAN_ALL = 0x00, + GRCAN_Charger = 0x00, + GRCAN_DTI_Inv = 0x00, + GRCAN_EM = 0x00, + GRCAN_IMD = 0x00, + GRCAN_Debugger = 0x01, + GRCAN_CCU = 0x02, + GRCAN_ECU = 0x02, + GRCAN_ACU = 0x03, + GRCAN_TCM = 0x04, + GRCAN_Dash_Panel = 0x05, + GRCAN_GR_Inv = 0x08, + GRCAN_Charging_SDC = 0x0C, + GRCAN_Fan_Ctrl_1 = 0x0D, + GRCAN_Fan_Ctrl_2 = 0x0E, + GRCAN_Fan_Ctrl_3 = 0x0F, + GRCAN_TireTemp_FL = 0x10, + GRCAN_TireTemp_FR = 0x11, + GRCAN_TireTemp_RL = 0x12, + GRCAN_TireTemp_RR = 0x13, + GRCAN_Suspension_FL = 0x14, + GRCAN_Suspension_FR = 0x15, + GRCAN_Suspension_RL = 0x16, + GRCAN_Suspension_RR = 0x17, + GRCAN_InboardFloor_FL = 0x18, + GRCAN_InboardFloor_FR = 0x19, + GRCAN_InboardFloor_RL = 0x1A, + GRCAN_InboardFloor_RR = 0x1B, + GRCAN_BrakeTemp_FL = 0x1C, + GRCAN_BrakeTemp_FR = 0x1D, + GRCAN_BrakeTemp_RL = 0x1E, + GRCAN_BrakeTemp_RR = 0x1F, + GRCAN_DGPS = 0x20, + GRCAN_LV_DC_DC = 0x29, + GRCAN_HV_DC_DC = 0x2A, } GRCAN_NODE_ID; #endif // GR_IDS_H diff --git a/Autogen/CAN/Src/MSGparser.pl b/Autogen/CAN/Src/MSGparser.pl index d6d960cbf..6d46d1dc5 100644 --- a/Autogen/CAN/Src/MSGparser.pl +++ b/Autogen/CAN/Src/MSGparser.pl @@ -52,7 +52,7 @@ sub parse_msg_yaml { last; } - if ( $line =~ /^ \s{2} ( \w [\w\s\d.]+ ) : \s* $/smx ) { + if ( $line =~ /^ \s{2} ( .+ ) : \s* $/smx ) { my $name = $1; # Pass by reference so we can skip lines in the array From a7f472e107e65a7295a7baa7fae76e40fa9cfe57 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 21:28:57 +0000 Subject: [PATCH 67/85] Automatic CANfigurator: Updated CAN files automatically --- Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h | 60 +- Autogen/CAN/Inc/GRCAN_MSG_DATA.h | 1882 +++++++++++++++-------------- Autogen/CAN/Inc/GRCAN_MSG_ID.h | 132 +- Autogen/CAN/Inc/GRCAN_NODE_ID.h | 70 +- 4 files changed, 1073 insertions(+), 1071 deletions(-) diff --git a/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h b/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h index 4154c2bb5..5a70891ac 100644 --- a/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h +++ b/Autogen/CAN/Inc/GRCAN_CUSTOM_ID.h @@ -3,36 +3,36 @@ #define CUSTOM_CAN_ID_H typedef enum { - CHARGER_CONTROL_CAN_ID = 0x1806E5F4, - CHARGER_DATA_CAN_ID = 0x18FF50E5, - DTI_CONTROL_1_CAN_ID = 0x116, - DTI_CONTROL_10_CAN_ID = 0xA16, - DTI_CONTROL_11_CAN_ID = 0xB16, - DTI_CONTROL_12_CAN_ID = 0xC16, - DTI_CONTROL_2_CAN_ID = 0x216, - DTI_CONTROL_3_CAN_ID = 0x316, - DTI_CONTROL_4_CAN_ID = 0x416, - DTI_CONTROL_5_CAN_ID = 0x516, - DTI_CONTROL_6_CAN_ID = 0x616, - DTI_CONTROL_7_CAN_ID = 0x716, - DTI_CONTROL_8_CAN_ID = 0x816, - DTI_CONTROL_9_CAN_ID = 0x916, - DTI_DATA_1_CAN_ID = 0x2016, - DTI_DATA_2_CAN_ID = 0x2116, - DTI_DATA_3_CAN_ID = 0x2216, - DTI_DATA_4_CAN_ID = 0x2316, - DTI_DATA_5_CAN_ID = 0x2416, - EM_MEAS_CAN_ID = 0x10D, - EM_STATUS_CAN_ID = 0x40D, - EM_TEAM_DATA_1_CAN_ID = 0x30D, - EM_TEAM_DATA_2_CAN_ID = 0x30E, - EM_TEMP_CAN_ID = 0x60D, - IMD_IT_SYSTEM_CAN_ID = 0x18EFF4FE, - IMD_GENERAL_CAN_ID = 0x18FF01F4, - IMD_ISOLATION_INFO_CAN_ID = 0x18EFF4FE, - IMD_REQUEST_CAN_ID = 0x18EFF4FE, - IMD_RESPONSE_CAN_ID = 0x23, - IMD_VOLTAGE_CAN_ID = 0x18EFF4FE, + CHARGER_CONTROL_CAN_ID = 0x1806E5F4, + CHARGER_DATA_CAN_ID = 0x18FF50E5, + DTI_CONTROL_1_CAN_ID = 0x116, + DTI_CONTROL_10_CAN_ID = 0xA16, + DTI_CONTROL_11_CAN_ID = 0xB16, + DTI_CONTROL_12_CAN_ID = 0xC16, + DTI_CONTROL_2_CAN_ID = 0x216, + DTI_CONTROL_3_CAN_ID = 0x316, + DTI_CONTROL_4_CAN_ID = 0x416, + DTI_CONTROL_5_CAN_ID = 0x516, + DTI_CONTROL_6_CAN_ID = 0x616, + DTI_CONTROL_7_CAN_ID = 0x716, + DTI_CONTROL_8_CAN_ID = 0x816, + DTI_CONTROL_9_CAN_ID = 0x916, + DTI_DATA_1_CAN_ID = 0x2016, + DTI_DATA_2_CAN_ID = 0x2116, + DTI_DATA_3_CAN_ID = 0x2216, + DTI_DATA_4_CAN_ID = 0x2316, + DTI_DATA_5_CAN_ID = 0x2416, + EM_MEAS_CAN_ID = 0x10D, + EM_STATUS_CAN_ID = 0x40D, + EM_TEAM_DATA_1_CAN_ID = 0x30D, + EM_TEAM_DATA_2_CAN_ID = 0x30E, + EM_TEMP_CAN_ID = 0x60D, + IMD_IT_SYSTEM_CAN_ID = 0x18EFF4FE, + IMD_GENERAL_CAN_ID = 0x18FF01F4, + IMD_ISOLATION_INFO_CAN_ID = 0x18EFF4FE, + IMD_REQUEST_CAN_ID = 0x18EFF4FE, + IMD_RESPONSE_CAN_ID = 0x23, + IMD_VOLTAGE_CAN_ID = 0x18EFF4FE, } GRCAN_CUSTOM_ID; #endif // CUSTOM_CAN_ID_H diff --git a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h index 739ba7344..c00113345 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_DATA.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_DATA.h @@ -7,7 +7,7 @@ /** Ping */ typedef struct { /** Time in millis (Byte 0) */ - uint32_t timestamp; + uint32_t timestamp; } GRCAN_PING_MSG; /** ECU Status 1 */ @@ -21,7 +21,7 @@ typedef struct { 5: TS Discharge State 6-7: Reserved See diagram in StateMachine.h (Byte 0) */ - uint8_t ecu_state; + uint8_t ecu_state; /** [Byte 1 / Bits 8-15] ECU ping targets 8: ACU (1: OK, 0: Timeout) 9: GR Inv (1: OK, 0: Timeout) @@ -31,7 +31,7 @@ See diagram in StateMachine.h (Byte 0) */ 13: Dash Panel (1: OK, 0: Timeout) 14: TCM (1: OK, 0: Timeout) 15: DGPS (1: OK, 0: Timeout) (Byte 1) */ - uint8_t ping_group_1; + uint8_t ping_group_1; /** [Byte 2 / Bits 16-23] ECU ping targets 16: Suspension FL (1: OK, 0: Timeout) 17: Suspension FR (1: OK, 0: Timeout) @@ -41,7 +41,7 @@ See diagram in StateMachine.h (Byte 0) */ 21: InboardFloor FR (1: OK, 0: Timeout) 22: InboardFloor RL (1: OK, 0: Timeout) 23: InboardFloor RR (1: OK, 0: Timeout) (Byte 2) */ - uint8_t ping_group_2; + uint8_t ping_group_2; /** [Byte 3 / Bits 24-31] ECU ping targets 24: TireTemp FL (1: OK, 0: Timeout) 25: TireTemp FR (1: OK, 0: Timeout) @@ -51,57 +51,58 @@ See diagram in StateMachine.h (Byte 0) */ 29: BrakeTemp FR (1: OK, 0: Timeout) 30: BrakeTemp RL (1: OK, 0: Timeout) 31: BrakeTemp RR (1: OK, 0: Timeout) (Byte 3) */ - uint8_t ping_group_3; + uint8_t ping_group_3; /** Controls the AC current limits to each of the inverters -Discrete Mapping, actual current values described by the torque map The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 / 100 / 150 / 200 / 250 / 275, 2 and later is tbd (Byte 4) */ - uint8_t power_level_torque_map; +Discrete Mapping, actual current values described by the torque map The torque map selected; torque map is the mapping of the throttle to the torque sent to each motor. 0 is max current amps, 1 is 50 +/ 100 / 150 / 200 / 250 / 275, 2 and later is tbd (Byte 4) */ + uint8_t power_level_torque_map; /** the Temp of the hottest cell of the accumulator (Byte 5) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; /** % charged of the Accumulator (Byte 6) */ - uint8_t accumulator_state_of_chg; + uint8_t accumulator_state_of_chg; /** % charged of the Low Voltage Bat (Byte 7) */ - uint8_t glv_state_of_chg; + uint8_t glv_state_of_chg; } GRCAN_ECU_STATUS_1_MSG; /** ECU Status 2 */ typedef struct { /** Output terminal voltage of accumulator (Byte 0) */ - uint16_t tractive_system_voltage; + uint16_t tractive_system_voltage; /** Absolute value of speed (Byte 2) */ - uint16_t vehicle_speed; + uint16_t vehicle_speed; /** FL Wheel RPM (Byte 4) */ - uint16_t fl_wheel_rpm; + uint16_t fl_wheel_rpm; /** FR Wheel RPM (Byte 6) */ - uint16_t fr_wheel_rpm; + uint16_t fr_wheel_rpm; } GRCAN_ECU_STATUS_2_MSG; /** ECU Status 3 */ typedef struct { /** RL Wheel RPM (Byte 0) */ - uint16_t rl_wheel_rpm; + uint16_t rl_wheel_rpm; /** RR Wheel RPM (Byte 2) */ - uint16_t rr_wheel_rpm; + uint16_t rr_wheel_rpm; /** [Byte 4 / Bits 32-39] 0: BMS OK 1: IMD OK 2: BSPD OK 3: Software OK 4-7: Reserved (Byte 4) */ - uint8_t relay_states; + uint8_t relay_states; } GRCAN_ECU_STATUS_3_MSG; /** ACU Status 1 */ typedef struct { /** All cell voltages added up (Byte 0) */ - uint16_t accumulator_voltage; + uint16_t accumulator_voltage; /** Output terminal voltage of accumulator (Byte 2) */ - uint16_t ts_voltage; + uint16_t ts_voltage; /** Current output of accumulator (Byte 4) */ - uint16_t accumulator_current; + uint16_t accumulator_current; /** Accumulator state of Chg (Based on lowest cell) (Byte 6) */ - uint8_t accumulator_soc; + uint8_t accumulator_soc; /** GLV state of Chg (Byte 7) */ - uint8_t glv_soc; + uint8_t glv_soc; } GRCAN_ACU_STATUS_1_MSG; /** ACU Status 2 */ @@ -112,35 +113,35 @@ units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 0) */ - uint8_t _20v_voltage; + uint8_t _20v_voltage; /** 12v supply voltage data type: u8 units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 1) */ - uint8_t _12v_voltage; + uint8_t _12v_voltage; /** Voltage before ACU Latch data type: u8 units: Volts scaled min: 0 scaled max: 25.5 map equation: "0.1x" (Byte 2) */ - uint8_t sdc_voltage; + uint8_t sdc_voltage; /** Lowest cell voltage in accumulator data type: u8 units: Volts scaled min: 2 scaled max: 4.55 map equation: "0.01x+2" (Byte 3) */ - uint8_t min_cell_voltage; + uint8_t min_cell_voltage; /** Hottest cell in accumulator data type: u8 units: Celsius scaled min: 0 scaled max: 63.75 map equation: "0.25x" (Byte 4) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; /** [Byte 5 / Bits 40-47] 40: Over Temp (>60C) 41: Over Voltage (>4.2V/cell) @@ -150,48 +151,48 @@ map equation: "0.25x" (Byte 4) */ 45: 20V GLV Warning 46: 12V Supply Warning 47: SDC Warning (Byte 5) */ - uint8_t status_flags; + uint8_t status_flags; /** [Byte 6 / Bits 48-55] 55: Precharge Timeout 54: IR- / Precharge State (0:Open, 1:Closed) 53: IR+ State (0:Open, 1:Closed) 52: Software Latch (0:Open, 1:Closed) 48-51: Reserved (Byte 6) */ - uint8_t precharge_latch_flags; + uint8_t precharge_latch_flags; } GRCAN_ACU_STATUS_2_MSG; /** ACU Status 3 */ typedef struct { /** 600v input voltage (Byte 0) */ - uint16_t hv_input_voltage; + uint16_t hv_input_voltage; /** 20v output voltage (Byte 2) */ - uint16_t hv_output_voltage; + uint16_t hv_output_voltage; /** 600v input current (Byte 4) */ - uint16_t hv_input_current; + uint16_t hv_input_current; /** 20v output current (Byte 6) */ - uint16_t hv_output_current; + uint16_t hv_output_current; } GRCAN_ACU_STATUS_3_MSG; /** ACU Precharge */ typedef struct { /** 0: shutdown, 1: go TS Active/Precharge (Byte 0) */ - uint8_t set_ts_active; + uint8_t set_ts_active; } GRCAN_ACU_PRECHARGE_MSG; /** ACU Config Chg Params */ typedef struct { /** Sets the Target Charging voltage (Byte 0) */ - uint16_t chg_voltage; + uint16_t chg_voltage; /** Sets the Target Charging Current (Byte 2) */ - uint16_t chg_current; + uint16_t chg_current; } GRCAN_ACU_CONFIG_CHG_PARAMS_MSG; /** ACU Config Op Params */ typedef struct { /** Sets the threshold for Minimum Cell Voltage before Shutdown (Byte 0) */ - uint8_t minimium_cell_voltage; + uint8_t minimium_cell_voltage; /** Sets the threshold for Max Cell Temp before Shutdown (Byte 1) */ - uint8_t max_cell_temp; + uint8_t max_cell_temp; } GRCAN_ACU_CONFIG_OP_PARAMS_MSG; /** ACU Cell Data 1 */ @@ -237,71 +238,72 @@ typedef struct { /** Inv Status 1 */ typedef struct { /** 0.01 * current, int16_t (Byte 0) */ - uint16_t ac_current; + uint16_t ac_current; /** 0.01 * current, int16_t (Byte 2) */ - uint16_t dc_current; + uint16_t dc_current; /** RPM, int16_t (Byte 4) */ - uint16_t motor_rpm; + uint16_t motor_rpm; } GRCAN_INV_STATUS_1_MSG; /** Inv Status 2 */ typedef struct { /** Celsius + 40, uint8_t (Byte 0) */ - uint16_t u_mosfet_temp; + uint16_t u_mosfet_temp; /** Celsius + 40, uint8_t (Byte 2) */ - uint16_t v_mosfet_temp; + uint16_t v_mosfet_temp; /** Celsius + 40, uint8_t (Byte 4) */ - uint16_t w_mosfet_temp; + uint16_t w_mosfet_temp; } GRCAN_INV_STATUS_2_MSG; /** Inv Status 3 */ typedef struct { /** Celsius + 40, uint8_t (Byte 0) */ - uint8_t motor_temp; - /** TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or timeout (Byte 1) */ - uint8_t fault_bits; + uint8_t motor_temp; + /** TS above set max voltage, TS below set min voltage, Inv over set max temp, Motor over set max temp, Mosfet or mosfet drive error, Encoder communication or calc error, CAN message error or + * timeout (Byte 1) */ + uint8_t fault_bits; } GRCAN_INV_STATUS_3_MSG; /** Inv Config */ typedef struct { /** Max AC Current (Byte 0) */ - uint16_t max_ac_current; + uint16_t max_ac_current; /** Max DC Current (Byte 2) */ - uint16_t max_dc_current; + uint16_t max_dc_current; /** 0: No limit n :limited at n RPM (Byte 4) */ - uint16_t absolute_max_rpm_limit; + uint16_t absolute_max_rpm_limit; /** Write 1 inverts direction (Byte 6) */ - uint8_t motor_direction; + uint8_t motor_direction; } GRCAN_INV_CONFIG_MSG; /** Inv Cmd */ typedef struct { /** Commanded AC Current (Byte 0) */ - uint16_t set_ac_current; + uint16_t set_ac_current; /** Commanded DC Current (Byte 2) */ - uint16_t set_dc_current; + uint16_t set_dc_current; /** 0: No limit n :limited at n RPM (Byte 4) */ - uint16_t rpm_limit; + uint16_t rpm_limit; /** Field weakening strength (Byte 6) */ - uint8_t field_weakening; + uint8_t field_weakening; /** Write this to 1 every 100ms to enable Inv (Byte 7) */ - uint8_t drive_enable; + uint8_t drive_enable; } GRCAN_INV_CMD_MSG; /** Fan Status */ typedef struct { /** Fan RPM (Byte 0) */ - uint16_t fan_speed; + uint16_t fan_speed; /** 0-22 (Byte 2) */ - uint8_t input_voltage; + uint8_t input_voltage; /** 0-10 (Byte 3) */ - uint8_t input_current; + uint8_t input_current; } GRCAN_FAN_STATUS_MSG; /** Fan Cmd */ typedef struct { /** 0-100 Percent (Byte 0) */ - uint8_t fan_cmd; + uint8_t fan_cmd; } GRCAN_FAN_CMD_MSG; /** Dash Status */ @@ -312,12 +314,12 @@ typedef struct { 5: TS Off 6: RTD On 7: TS On (Byte 0) */ - uint8_t button_flags; + uint8_t button_flags; /** [Byte 1 / Bits 8-15] 0-5: Reserved 6: IMD 7: BMS (Byte 1) */ - uint8_t led_flags; + uint8_t led_flags; } GRCAN_DASH_STATUS_MSG; /** Dash Config */ @@ -330,1921 +332,1921 @@ typedef struct { 4: IMD latch 5: BMS latch 6-7: Reserved (Byte 0) */ - uint8_t led_latch_flags; + uint8_t led_latch_flags; } GRCAN_DASH_CONFIG_MSG; /** ECU Analog Data */ typedef struct { /** 4-20 mA signal (Byte 0) */ - uint16_t bspd_signal; + uint16_t bspd_signal; /** 4-20 mA signal (Byte 2) */ - uint16_t bse_signal; + uint16_t bse_signal; /** 4-20 mA signal (Byte 4) */ - uint16_t apps_1_signal; + uint16_t apps_1_signal; /** 4-20 mA signal (Byte 6) */ - uint16_t apps_2_signal; + uint16_t apps_2_signal; /** 4-20 mA signal (Byte 8) */ - uint16_t brakeline_f_signal; + uint16_t brakeline_f_signal; /** 4-20 mA signal (Byte 10) */ - uint16_t brakeline_r_signal; + uint16_t brakeline_r_signal; /** 4-20 mA signal (Byte 12) */ - uint16_t steering_angle_signal; + uint16_t steering_angle_signal; /** 4-20 mA signal (Byte 14) */ - uint16_t aux_signal; + uint16_t aux_signal; /** 0-100% percentage (Byte 16) */ - uint16_t acc_pedal_travel; + uint16_t acc_pedal_travel; /** Pressure (Byte 18) */ - uint16_t brake_pedal_pressure; + uint16_t brake_pedal_pressure; } GRCAN_ECU_ANALOG_DATA_MSG; /** GPS LAT */ typedef struct { /** lattitude (Byte 0) */ - uint8_t lat; + uint8_t lat; } GRCAN_GPS_LAT_MSG; /** GPS LON */ typedef struct { /** longitude (Byte 0) */ - uint8_t lon; + uint8_t lon; } GRCAN_GPS_LON_MSG; /** GPS ALT */ typedef struct { /** altitude (Byte 0) */ - uint8_t alt; + uint8_t alt; } GRCAN_GPS_ALT_MSG; /** GPS PX */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_PX_MSG; /** GPS QY */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_QY_MSG; /** GPS RZ */ typedef struct { /** Byte 0 (Byte 0) */ - uint16_t theta; + uint16_t theta; /** Byte 2 (Byte 2) */ - uint16_t acc; + uint16_t acc; /** Byte 4 (Byte 4) */ - uint32_t status; + uint32_t status; } GRCAN_GPS_RZ_MSG; /** UVW DGPS */ typedef struct { /** U (Byte 0) */ - uint16_t dgps_u; + uint16_t dgps_u; /** V (Byte 2) */ - uint16_t dgps_v; + uint16_t dgps_v; /** W (Byte 4) */ - uint16_t dgps_w; + uint16_t dgps_w; } GRCAN_UVW_DGPS_MSG; /** ECU Pinging RTT */ typedef struct { /** Round trip time (Byte 0) */ - uint8_t acu_rtt; + uint8_t acu_rtt; /** Round trip time (Byte 1) */ - uint8_t gr_inv_rtt; + uint8_t gr_inv_rtt; /** Round trip time (Byte 2) */ - uint8_t fan_ctrl_1_rtt; + uint8_t fan_ctrl_1_rtt; /** Round trip time (Byte 3) */ - uint8_t fan_ctrl_2_rtt; + uint8_t fan_ctrl_2_rtt; /** Round trip time (Byte 4) */ - uint8_t fan_ctrl_3_rtt; + uint8_t fan_ctrl_3_rtt; /** Round trip time (Byte 5) */ - uint8_t dash_panel_rtt; + uint8_t dash_panel_rtt; /** Round trip time (Byte 6) */ - uint8_t tcm_rtt; + uint8_t tcm_rtt; /** Round trip time (Byte 7) */ - uint8_t tire_temp_fl_rtt; + uint8_t tire_temp_fl_rtt; /** Round trip time (Byte 8) */ - uint8_t tire_temp_fr_rtt; + uint8_t tire_temp_fr_rtt; /** Round trip time (Byte 9) */ - uint8_t tire_temp_rl_rtt; + uint8_t tire_temp_rl_rtt; /** Round trip time (Byte 10) */ - uint8_t tire_temp_rr_rtt; + uint8_t tire_temp_rr_rtt; /** Round trip time (Byte 11) */ - uint8_t suspension_node_fl_rtt; + uint8_t suspension_node_fl_rtt; /** Round trip time (Byte 12) */ - uint8_t suspension_node_fr_rtt; + uint8_t suspension_node_fr_rtt; /** Round trip time (Byte 13) */ - uint8_t suspension_node_rl_rtt; + uint8_t suspension_node_rl_rtt; /** Round trip time (Byte 14) */ - uint8_t suspension_node_rr_rtt; + uint8_t suspension_node_rr_rtt; /** Round trip time (Byte 15) */ - uint8_t inboard_floor_fl_rtt; + uint8_t inboard_floor_fl_rtt; /** Round trip time (Byte 16) */ - uint8_t inboard_floor_fr_rtt; + uint8_t inboard_floor_fr_rtt; /** Round trip time (Byte 17) */ - uint8_t inboard_floor_rl_rtt; + uint8_t inboard_floor_rl_rtt; /** Round trip time (Byte 18) */ - uint8_t inboard_floor_rr_rtt; + uint8_t inboard_floor_rr_rtt; /** Round trip time (Byte 19) */ - uint8_t brake_temp_fl_rtt; + uint8_t brake_temp_fl_rtt; /** Round trip time (Byte 20) */ - uint8_t brake_temp_fr_rtt; + uint8_t brake_temp_fr_rtt; /** Round trip time (Byte 21) */ - uint8_t brake_temp_rl_rtt; + uint8_t brake_temp_rl_rtt; /** Round trip time (Byte 22) */ - uint8_t brake_temp_rr_rtt; + uint8_t brake_temp_rr_rtt; /** Round trip time (Byte 23) */ - uint8_t dgps_rtt; + uint8_t dgps_rtt; } GRCAN_ECU_PINGING_RTT_MSG; /** Tire Temp Frame 0 */ typedef struct { /** Tire Temp frame 0 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 0 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 0 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 0 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 0 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 0 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 0 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 0 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 0 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 0 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 0 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 0 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 0 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 0 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 0 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 0 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 0 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 0 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 0 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 0 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 0 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 0 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 0 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 0 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 0 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 0 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 0 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 0 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 0 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 0 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 0 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 0 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_0_MSG; /** Tire Temp Frame 1 */ typedef struct { /** Tire Temp frame 1 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 1 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 1 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 1 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 1 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 1 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 1 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 1 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 1 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 1 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 1 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 1 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 1 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 1 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 1 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 1 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 1 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 1 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 1 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 1 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 1 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 1 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 1 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 1 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 1 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 1 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 1 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 1 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 1 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 1 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 1 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 1 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_1_MSG; /** Tire Temp Frame 2 */ typedef struct { /** Tire Temp frame 2 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 2 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 2 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 2 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 2 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 2 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 2 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 2 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 2 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 2 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 2 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 2 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 2 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 2 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 2 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 2 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 2 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 2 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 2 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 2 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 2 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 2 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 2 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 2 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 2 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 2 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 2 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 2 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 2 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 2 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 2 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 2 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_2_MSG; /** Tire Temp Frame 3 */ typedef struct { /** Tire Temp frame 3 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 3 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 3 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 3 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 3 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 3 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 3 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 3 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 3 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 3 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 3 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 3 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 3 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 3 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 3 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 3 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 3 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 3 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 3 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 3 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 3 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 3 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 3 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 3 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 3 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 3 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 3 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 3 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 3 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 3 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 3 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 3 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_3_MSG; /** Tire Temp Frame 4 */ typedef struct { /** Tire Temp frame 4 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 4 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 4 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 4 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 4 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 4 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 4 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 4 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 4 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 4 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 4 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 4 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 4 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 4 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 4 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 4 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 4 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 4 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 4 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 4 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 4 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 4 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 4 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 4 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 4 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 4 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 4 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 4 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 4 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 4 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 4 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 4 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_4_MSG; /** Tire Temp Frame 5 */ typedef struct { /** Tire Temp frame 5 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 5 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 5 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 5 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 5 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 5 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 5 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 5 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 5 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 5 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 5 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 5 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 5 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 5 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 5 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 5 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 5 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 5 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 5 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 5 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 5 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 5 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 5 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 5 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 5 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 5 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 5 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 5 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 5 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 5 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 5 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 5 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_5_MSG; /** Tire Temp Frame 6 */ typedef struct { /** Tire Temp frame 6 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 6 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 6 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 6 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 6 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 6 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 6 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 6 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 6 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 6 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 6 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 6 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 6 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 6 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 6 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 6 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 6 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 6 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 6 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 6 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 6 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 6 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 6 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 6 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 6 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 6 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 6 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 6 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 6 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 6 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 6 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 6 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_6_MSG; /** Tire Temp Frame 7 */ typedef struct { /** Tire Temp frame 7 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 7 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 7 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 7 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 7 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 7 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 7 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 7 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 7 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 7 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 7 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 7 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 7 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 7 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 7 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 7 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 7 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 7 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 7 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 7 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 7 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 7 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 7 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 7 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 7 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 7 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 7 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 7 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 7 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 7 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 7 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 7 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_7_MSG; /** Tire Temp Frame 8 */ typedef struct { /** Tire Temp frame 8 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 8 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 8 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 8 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 8 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 8 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 8 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 8 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 8 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 8 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 8 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 8 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 8 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 8 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 8 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 8 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 8 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 8 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 8 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 8 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 8 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 8 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 8 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 8 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 8 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 8 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 8 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 8 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 8 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 8 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 8 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 8 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_8_MSG; /** Tire Temp Frame 9 */ typedef struct { /** Tire Temp frame 9 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 9 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 9 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 9 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 9 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 9 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 9 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 9 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 9 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 9 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 9 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 9 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 9 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 9 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 9 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 9 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 9 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 9 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 9 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 9 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 9 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 9 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 9 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 9 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 9 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 9 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 9 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 9 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 9 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 9 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 9 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 9 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_9_MSG; /** Tire Temp Frame 10 */ typedef struct { /** Tire Temp frame 10 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 10 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 10 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 10 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 10 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 10 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 10 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 10 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 10 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 10 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 10 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 10 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 10 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 10 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 10 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 10 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 10 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 10 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 10 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 10 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 10 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 10 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 10 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 10 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 10 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 10 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 10 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 10 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 10 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 10 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 10 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 10 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_10_MSG; /** Tire Temp Frame 11 */ typedef struct { /** Tire Temp frame 11 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 11 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 11 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 11 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 11 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 11 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 11 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 11 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 11 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 11 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 11 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 11 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 11 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 11 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 11 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 11 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 11 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 11 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 11 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 11 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 11 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 11 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 11 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 11 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 11 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 11 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 11 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 11 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 11 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 11 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 11 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 11 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_11_MSG; /** Tire Temp Frame 12 */ typedef struct { /** Tire Temp frame 12 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 12 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 12 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 12 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 12 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 12 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 12 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 12 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 12 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 12 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 12 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 12 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 12 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 12 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 12 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 12 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 12 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 12 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 12 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 12 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 12 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 12 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 12 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 12 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 12 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 12 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 12 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 12 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 12 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 12 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 12 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 12 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_12_MSG; /** Tire Temp Frame 13 */ typedef struct { /** Tire Temp frame 13 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 13 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 13 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 13 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 13 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 13 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 13 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 13 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 13 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 13 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 13 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 13 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 13 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 13 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 13 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 13 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 13 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 13 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 13 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 13 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 13 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 13 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 13 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 13 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 13 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 13 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 13 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 13 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 13 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 13 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 13 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 13 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_13_MSG; /** Tire Temp Frame 14 */ typedef struct { /** Tire Temp frame 14 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 14 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 14 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 14 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 14 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 14 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 14 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 14 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 14 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 14 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 14 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 14 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 14 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 14 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 14 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 14 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 14 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 14 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 14 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 14 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 14 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 14 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 14 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 14 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 14 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 14 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 14 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 14 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 14 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 14 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 14 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 14 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_14_MSG; /** Tire Temp Frame 15 */ typedef struct { /** Tire Temp frame 15 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 15 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 15 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 15 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 15 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 15 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 15 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 15 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 15 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 15 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 15 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 15 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 15 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 15 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 15 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 15 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 15 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 15 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 15 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 15 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 15 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 15 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 15 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 15 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 15 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 15 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 15 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 15 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 15 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 15 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 15 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 15 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_15_MSG; /** Tire Temp Frame 16 */ typedef struct { /** Tire Temp frame 16 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 16 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 16 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 16 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 16 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 16 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 16 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 16 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 16 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 16 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 16 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 16 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 16 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 16 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 16 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 16 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 16 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 16 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 16 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 16 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 16 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 16 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 16 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 16 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 16 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 16 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 16 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 16 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 16 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 16 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 16 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 16 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_16_MSG; /** Tire Temp Frame 17 */ typedef struct { /** Tire Temp frame 17 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 17 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 17 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 17 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 17 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 17 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 17 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 17 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 17 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 17 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 17 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 17 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 17 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 17 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 17 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 17 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 17 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 17 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 17 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 17 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 17 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 17 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 17 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 17 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 17 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 17 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 17 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 17 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 17 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 17 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 17 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 17 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_17_MSG; /** Tire Temp Frame 18 */ typedef struct { /** Tire Temp frame 18 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 18 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 18 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 18 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 18 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 18 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 18 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 18 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 18 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 18 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 18 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 18 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 18 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 18 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 18 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 18 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 18 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 18 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 18 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 18 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 18 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 18 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 18 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 18 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 18 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 18 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 18 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 18 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 18 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 18 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 18 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 18 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_18_MSG; /** Tire Temp Frame 19 */ typedef struct { /** Tire Temp frame 19 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 19 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 19 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 19 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 19 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 19 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 19 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 19 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 19 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 19 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 19 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 19 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 19 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 19 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 19 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 19 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 19 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 19 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 19 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 19 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 19 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 19 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 19 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 19 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 19 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 19 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 19 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 19 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 19 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 19 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 19 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 19 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_19_MSG; /** Tire Temp Frame 20 */ typedef struct { /** Tire Temp frame 20 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 20 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 20 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 20 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 20 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 20 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 20 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 20 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 20 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 20 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 20 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 20 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 20 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 20 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 20 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 20 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 20 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 20 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 20 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 20 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 20 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 20 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 20 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 20 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 20 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 20 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 20 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 20 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 20 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 20 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 20 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 20 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_20_MSG; /** Tire Temp Frame 21 */ typedef struct { /** Tire Temp frame 21 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 21 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 21 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 21 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 21 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 21 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 21 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 21 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 21 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 21 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 21 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 21 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 21 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 21 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 21 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 21 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 21 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 21 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 21 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 21 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 21 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 21 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 21 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 21 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 21 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 21 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 21 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 21 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 21 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 21 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 21 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 21 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_21_MSG; /** Tire Temp Frame 22 */ typedef struct { /** Tire Temp frame 22 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 22 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 22 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 22 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 22 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 22 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 22 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 22 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 22 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 22 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 22 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 22 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 22 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 22 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 22 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 22 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 22 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 22 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 22 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 22 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 22 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 22 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 22 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 22 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 22 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 22 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 22 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 22 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 22 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 22 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 22 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 22 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_22_MSG; /** Tire Temp Frame 23 */ typedef struct { /** Tire Temp frame 23 pixel 0 (Byte 0) */ - uint16_t pixel0; + uint16_t pixel0; /** Tire Temp frame 23 pixel 1 (Byte 2) */ - uint16_t pixel1; + uint16_t pixel1; /** Tire Temp frame 23 pixel 2 (Byte 4) */ - uint16_t pixel2; + uint16_t pixel2; /** Tire Temp frame 23 pixel 3 (Byte 6) */ - uint16_t pixel3; + uint16_t pixel3; /** Tire Temp frame 23 pixel 4 (Byte 8) */ - uint16_t pixel4; + uint16_t pixel4; /** Tire Temp frame 23 pixel 5 (Byte 10) */ - uint16_t pixel5; + uint16_t pixel5; /** Tire Temp frame 23 pixel 6 (Byte 12) */ - uint16_t pixel6; + uint16_t pixel6; /** Tire Temp frame 23 pixel 7 (Byte 14) */ - uint16_t pixel7; + uint16_t pixel7; /** Tire Temp frame 23 pixel 8 (Byte 16) */ - uint16_t pixel8; + uint16_t pixel8; /** Tire Temp frame 23 pixel 9 (Byte 18) */ - uint16_t pixel9; + uint16_t pixel9; /** Tire Temp frame 23 pixel 10 (Byte 20) */ - uint16_t pixel10; + uint16_t pixel10; /** Tire Temp frame 23 pixel 11 (Byte 22) */ - uint16_t pixel11; + uint16_t pixel11; /** Tire Temp frame 23 pixel 12 (Byte 24) */ - uint16_t pixel12; + uint16_t pixel12; /** Tire Temp frame 23 pixel 13 (Byte 26) */ - uint16_t pixel13; + uint16_t pixel13; /** Tire Temp frame 23 pixel 14 (Byte 28) */ - uint16_t pixel14; + uint16_t pixel14; /** Tire Temp frame 23 pixel 15 (Byte 30) */ - uint16_t pixel15; + uint16_t pixel15; /** Tire Temp frame 23 pixel 16 (Byte 32) */ - uint16_t pixel16; + uint16_t pixel16; /** Tire Temp frame 23 pixel 17 (Byte 34) */ - uint16_t pixel17; + uint16_t pixel17; /** Tire Temp frame 23 pixel 18 (Byte 36) */ - uint16_t pixel18; + uint16_t pixel18; /** Tire Temp frame 23 pixel 19 (Byte 38) */ - uint16_t pixel19; + uint16_t pixel19; /** Tire Temp frame 23 pixel 20 (Byte 40) */ - uint16_t pixel20; + uint16_t pixel20; /** Tire Temp frame 23 pixel 21 (Byte 42) */ - uint16_t pixel21; + uint16_t pixel21; /** Tire Temp frame 23 pixel 22 (Byte 44) */ - uint16_t pixel22; + uint16_t pixel22; /** Tire Temp frame 23 pixel 23 (Byte 46) */ - uint16_t pixel23; + uint16_t pixel23; /** Tire Temp frame 23 pixel 24 (Byte 48) */ - uint16_t pixel24; + uint16_t pixel24; /** Tire Temp frame 23 pixel 25 (Byte 50) */ - uint16_t pixel25; + uint16_t pixel25; /** Tire Temp frame 23 pixel 26 (Byte 52) */ - uint16_t pixel26; + uint16_t pixel26; /** Tire Temp frame 23 pixel 27 (Byte 54) */ - uint16_t pixel27; + uint16_t pixel27; /** Tire Temp frame 23 pixel 28 (Byte 56) */ - uint16_t pixel28; + uint16_t pixel28; /** Tire Temp frame 23 pixel 29 (Byte 58) */ - uint16_t pixel29; + uint16_t pixel29; /** Tire Temp frame 23 pixel 30 (Byte 60) */ - uint16_t pixel30; + uint16_t pixel30; /** Tire Temp frame 23 pixel 31 (Byte 62) */ - uint16_t pixel31; + uint16_t pixel31; } GRCAN_TIRE_TEMP_FRAME_23_MSG; /** Brake Temp */ typedef struct { /** Brake rotor Temp (Byte 0) */ - uint16_t temp; + uint16_t temp; } GRCAN_BRAKE_TEMP_MSG; /** Wheel Speed */ typedef struct { /** Wheel speed rpm (Byte 0) */ - uint16_t speed; + uint16_t speed; } GRCAN_WHEEL_SPEED_MSG; /** Suspension IMU Mag Data */ typedef struct { /** BMI323 accelerometer X (Byte 0) */ - uint16_t bmi323_acc_x; + uint16_t bmi323_acc_x; /** BMI323 accelerometer Y (Byte 2) */ - uint16_t bmi323_acc_y; + uint16_t bmi323_acc_y; /** BMI323 accelerometer Z (Byte 4) */ - uint16_t bmi323_acc_z; + uint16_t bmi323_acc_z; /** BMI323 gyroscope X (Byte 6) */ - uint16_t bmi323_gyro_x; + uint16_t bmi323_gyro_x; /** BMI323 gyroscope Y (Byte 8) */ - uint16_t bmi323_gyro_y; + uint16_t bmi323_gyro_y; /** BMI323 gyroscope Z (Byte 10) */ - uint16_t bmi323_gyro_z; + uint16_t bmi323_gyro_z; /** BMI323 temperature (Byte 12) */ - uint16_t bmi323_temp; + uint16_t bmi323_temp; /** BMI323 status (Byte 14) */ - uint16_t bmi323_status; + uint16_t bmi323_status; /** Magnetic encoder temperature (Byte 16) */ - uint16_t mag_temp; + uint16_t mag_temp; /** The lineation of groupings for hysteresis (Byte 18) */ - uint16_t mag_hysteresis; + uint16_t mag_hysteresis; /** Magnetic encoder angle (Byte 20) */ - uint16_t mag_angle; + uint16_t mag_angle; /** Magnetic encoder turns (Byte 22) */ - uint16_t mag_turns; + uint16_t mag_turns; /** Magnetic encoder status (Byte 24) */ - uint8_t mag_status; + uint8_t mag_status; /** Reserved (Byte 25) */ - uint16_t reserved; + uint16_t reserved; } GRCAN_SUSPENSION_IMU_MAG_DATA_MSG; /** InboardFloor IMU ToF Data */ typedef struct { /** BMI323 accelerometer X (Byte 0) */ - uint16_t bmi323_acc_x; + uint16_t bmi323_acc_x; /** BMI323 accelerometer Y (Byte 2) */ - uint16_t bmi323_acc_y; + uint16_t bmi323_acc_y; /** BMI323 accelerometer Z (Byte 4) */ - uint16_t bmi323_acc_z; + uint16_t bmi323_acc_z; /** BMI323 gyroscope X (Byte 6) */ - uint16_t bmi323_gyro_x; + uint16_t bmi323_gyro_x; /** BMI323 gyroscope Y (Byte 8) */ - uint16_t bmi323_gyro_y; + uint16_t bmi323_gyro_y; /** BMI323 gyroscope Z (Byte 10) */ - uint16_t bmi323_gyro_z; + uint16_t bmi323_gyro_z; /** BMI323 temperature (Byte 12) */ - uint16_t bmi323_temp; + uint16_t bmi323_temp; /** BMI323 status (Byte 14) */ - uint16_t bmi323_status; + uint16_t bmi323_status; /** Time-of-flight range status (Byte 16) */ - uint8_t range_status; + uint8_t range_status; /** Time-of-flight distance (Byte 17) */ - uint16_t distance_mm; + uint16_t distance_mm; /** Time-of-flight ambient rate (Byte 19) */ - uint16_t ambient_rate_kcps; + uint16_t ambient_rate_kcps; /** Time-of-flight ambient rate per SPAD (Byte 21) */ - uint16_t ambient_per_spad_kcps; + uint16_t ambient_per_spad_kcps; /** Time-of-flight signal rate (Byte 23) */ - uint16_t signal_rate_kcps; + uint16_t signal_rate_kcps; /** Time-of-flight signal rate per SPAD (Byte 25) */ - uint16_t signal_per_spad_kcps; + uint16_t signal_per_spad_kcps; /** Time-of-flight SPAD count (Byte 27) */ - uint16_t number_of_spad; + uint16_t number_of_spad; /** Time-of-flight sigma (Byte 29) */ - uint16_t sigma_mm; + uint16_t sigma_mm; /** Byte 31 (Byte 31) */ - uint8_t reserved; + uint8_t reserved; } GRCAN_INBOARDFLOOR_IMU_TOF_DATA_MSG; /** ECU Config */ typedef struct { /** Delay for which to consider pings timed out (Byte 0) */ - uint8_t ping_timeout_delay; + uint8_t ping_timeout_delay; /** Minimum brake f psi for which to consider the brakes pressed (Byte 1) */ - uint8_t brake_f_min; + uint8_t brake_f_min; /** Minimum brake r psi for which to consider the brakes pressed (Byte 2) */ - uint8_t brake_r_min; + uint8_t brake_r_min; /** Minimum brake bse psi for which to consider the brakes pressed (Byte 3) */ - uint8_t brake_bse_min; + uint8_t brake_bse_min; /** Minimum value that the APPS 1 sensor is expected to read (Byte 4) */ - uint8_t apps_1_min; + uint8_t apps_1_min; /** Minimum value that the APPS 2 sensor is expected to read (Byte 5) */ - uint8_t apps_2_min; + uint8_t apps_2_min; /** Maximum value that the APPS 1 sensor is expected to read (Byte 6) */ - uint8_t apps_1_max; + uint8_t apps_1_max; /** Maximum value that the APPS 2 sensor is expected to read (Byte 7) */ - uint8_t apps_2_max; + uint8_t apps_2_max; /** Percentage deadzone of the APPS for which to not consider the pedals to have traveled (Byte 8) */ - uint8_t apps_deadzone; + uint8_t apps_deadzone; /** Minimum acceptable BMS sense value such that the BMS is not considered in failure (Byte 9) */ - uint8_t bms_min_threshold; + uint8_t bms_min_threshold; /** Maximum acceptable BMS sense value such that the BMS is not considered in failure (Byte 10) */ - uint8_t bms_max_threshold; + uint8_t bms_max_threshold; /** Minimum acceptable IMD sense value such that the BMS is not considered in failure (Byte 11) */ - uint8_t imd_min_threshold; + uint8_t imd_min_threshold; /** Maximum acceptable IMD sense value such that the BMS is not considered in failure (Byte 12) */ - uint8_t imd_max_threshold; + uint8_t imd_max_threshold; /** Minimum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 13) */ - uint8_t bspd_min_threshold; + uint8_t bspd_min_threshold; /** Maximum acceptable BSPD sense value such that the BMS is not considered in failure (Byte 14) */ - uint8_t bspd_max_threshold; + uint8_t bspd_max_threshold; /** Maximum acceptable time to remain precharging before discharging (Byte 15) */ - uint8_t max_precharge_time; + uint8_t max_precharge_time; /** TBD (Byte 16) */ - uint8_t regen_strength; + uint8_t regen_strength; /** Enable or disable regenerative braking (Byte 17) */ - uint8_t enable_regen; + uint8_t enable_regen; /** Reserved (Byte 18) */ - uint16_t reserved; + uint16_t reserved; } GRCAN_ECU_CONFIG_MSG; /** DC-DC Status */ typedef struct { /** ~20v for LV (LV only. Send 0 for HV) (Byte 0) */ - uint16_t input_voltage; + uint16_t input_voltage; /** ~12v for LV and ~20v for HV (Byte 2) */ - uint16_t output_voltage; + uint16_t output_voltage; /** Input current (LV only. Send 0 for HV) (Byte 4) */ - uint8_t input_current; + uint8_t input_current; /** Output current (Byte 5) */ - uint8_t output_current; + uint8_t output_current; /** Temp of DC-DC converter (Byte 6) */ - uint8_t dc_dc_temp; + uint8_t dc_dc_temp; } GRCAN_DC_DC_STATUS_MSG; /** RTD Light Ctrl */ typedef struct { /** Intensity of the red channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t red; + uint8_t red; /** Intensity of the green channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t green; + uint8_t green; /** Intensity of the blue channel on the RTD button dash light ONLY when in GLV On, ignored otherwise (Byte 0) */ - uint8_t blue; + uint8_t blue; } GRCAN_RTD_LIGHT_CTRL_MSG; #endif diff --git a/Autogen/CAN/Inc/GRCAN_MSG_ID.h b/Autogen/CAN/Inc/GRCAN_MSG_ID.h index 626399008..89f4075f7 100644 --- a/Autogen/CAN/Inc/GRCAN_MSG_ID.h +++ b/Autogen/CAN/Inc/GRCAN_MSG_ID.h @@ -3,72 +3,72 @@ #define CAN_MSG_IDS_H typedef enum { -GRCAN_DEBUG_2_0 = 0x000, -GRCAN_DEBUG_FD = 0x001, -GRCAN_PING = 0x002, -GRCAN_ECU_STATUS_1 = 0x003, -GRCAN_ECU_STATUS_2 = 0x004, -GRCAN_ECU_STATUS_3 = 0x005, -GRCAN_ACU_STATUS_1 = 0x007, -GRCAN_ACU_STATUS_2 = 0x008, -GRCAN_ACU_STATUS_3 = 0x009, -GRCAN_ACU_PRECHARGE = 0x00A, -GRCAN_ACU_CONFIG_CHG_PARAMS = 0x00B, -GRCAN_ACU_CONFIG_OP_PARAMS = 0x00C, -GRCAN_ACU_CELL_DATA_1 = 0x00D, -GRCAN_ACU_CELL_DATA_2 = 0x00E, -GRCAN_ACU_CELL_DATA_3 = 0x00F, -GRCAN_ACU_CELL_DATA_4 = 0x010, -GRCAN_ACU_CELL_DATA_5 = 0x011, -GRCAN_DC_DC_STATUS = 0x012, -GRCAN_INV_STATUS_1 = 0x013, -GRCAN_INV_STATUS_2 = 0x014, -GRCAN_INV_STATUS_3 = 0x015, -GRCAN_INV_CONFIG = 0x016, -GRCAN_INV_CMD = 0x017, -GRCAN_FAN_STATUS = 0x018, -GRCAN_FAN_CMD = 0x019, -GRCAN_DASH_STATUS = 0x01A, -GRCAN_DASH_CONFIG = 0x01B, -GRCAN_ECU_PINGING_RTT = 0x2D, -GRCAN_ECU_ANALOG_DATA = 0x02E, -GRCAN_ECU_CONFIG = 0x02F, -GRCAN_UVW_DGPS = 0x030, -GRCAN_GPS_LAT = 0x031, -GRCAN_GPS_LON = 0x032, -GRCAN_GPS_ALT = 0x033, -GRCAN_GPS_PX = 0x034, -GRCAN_GPS_QY = 0x035, -GRCAN_GPS_RZ = 0x036, -GRCAN_TIRE_TEMP_FRAME_0 = 0x037, -GRCAN_TIRE_TEMP_FRAME_1 = 0x038, -GRCAN_TIRE_TEMP_FRAME_2 = 0x039, -GRCAN_TIRE_TEMP_FRAME_3 = 0x03A, -GRCAN_TIRE_TEMP_FRAME_4 = 0x03B, -GRCAN_TIRE_TEMP_FRAME_5 = 0x03C, -GRCAN_TIRE_TEMP_FRAME_6 = 0x03D, -GRCAN_TIRE_TEMP_FRAME_7 = 0x03E, -GRCAN_TIRE_TEMP_FRAME_8 = 0x03F, -GRCAN_TIRE_TEMP_FRAME_9 = 0x040, -GRCAN_TIRE_TEMP_FRAME_10 = 0x041, -GRCAN_TIRE_TEMP_FRAME_11 = 0x042, -GRCAN_TIRE_TEMP_FRAME_12 = 0x043, -GRCAN_TIRE_TEMP_FRAME_13 = 0x044, -GRCAN_TIRE_TEMP_FRAME_14 = 0x045, -GRCAN_TIRE_TEMP_FRAME_15 = 0x046, -GRCAN_TIRE_TEMP_FRAME_16 = 0x047, -GRCAN_TIRE_TEMP_FRAME_17 = 0x048, -GRCAN_TIRE_TEMP_FRAME_18 = 0x049, -GRCAN_TIRE_TEMP_FRAME_19 = 0x04A, -GRCAN_TIRE_TEMP_FRAME_20 = 0x04B, -GRCAN_TIRE_TEMP_FRAME_21 = 0x04C, -GRCAN_TIRE_TEMP_FRAME_22 = 0x04D, -GRCAN_TIRE_TEMP_FRAME_23 = 0x04E, -GRCAN_BRAKE_TEMP = 0x04F, -GRCAN_WHEEL_SPEED = 0x050, -GRCAN_SUSPENSION_IMU_MAG_DATA = 0x051, -GRCAN_INBOARDFLOOR_IMU_TOF_DATA = 0x052, -GRCAN_RTD_LIGHT_CTRL = 0x53, + GRCAN_DEBUG_2_0 = 0x000, + GRCAN_DEBUG_FD = 0x001, + GRCAN_PING = 0x002, + GRCAN_ECU_STATUS_1 = 0x003, + GRCAN_ECU_STATUS_2 = 0x004, + GRCAN_ECU_STATUS_3 = 0x005, + GRCAN_ACU_STATUS_1 = 0x007, + GRCAN_ACU_STATUS_2 = 0x008, + GRCAN_ACU_STATUS_3 = 0x009, + GRCAN_ACU_PRECHARGE = 0x00A, + GRCAN_ACU_CONFIG_CHG_PARAMS = 0x00B, + GRCAN_ACU_CONFIG_OP_PARAMS = 0x00C, + GRCAN_ACU_CELL_DATA_1 = 0x00D, + GRCAN_ACU_CELL_DATA_2 = 0x00E, + GRCAN_ACU_CELL_DATA_3 = 0x00F, + GRCAN_ACU_CELL_DATA_4 = 0x010, + GRCAN_ACU_CELL_DATA_5 = 0x011, + GRCAN_DC_DC_STATUS = 0x012, + GRCAN_INV_STATUS_1 = 0x013, + GRCAN_INV_STATUS_2 = 0x014, + GRCAN_INV_STATUS_3 = 0x015, + GRCAN_INV_CONFIG = 0x016, + GRCAN_INV_CMD = 0x017, + GRCAN_FAN_STATUS = 0x018, + GRCAN_FAN_CMD = 0x019, + GRCAN_DASH_STATUS = 0x01A, + GRCAN_DASH_CONFIG = 0x01B, + GRCAN_ECU_PINGING_RTT = 0x2D, + GRCAN_ECU_ANALOG_DATA = 0x02E, + GRCAN_ECU_CONFIG = 0x02F, + GRCAN_UVW_DGPS = 0x030, + GRCAN_GPS_LAT = 0x031, + GRCAN_GPS_LON = 0x032, + GRCAN_GPS_ALT = 0x033, + GRCAN_GPS_PX = 0x034, + GRCAN_GPS_QY = 0x035, + GRCAN_GPS_RZ = 0x036, + GRCAN_TIRE_TEMP_FRAME_0 = 0x037, + GRCAN_TIRE_TEMP_FRAME_1 = 0x038, + GRCAN_TIRE_TEMP_FRAME_2 = 0x039, + GRCAN_TIRE_TEMP_FRAME_3 = 0x03A, + GRCAN_TIRE_TEMP_FRAME_4 = 0x03B, + GRCAN_TIRE_TEMP_FRAME_5 = 0x03C, + GRCAN_TIRE_TEMP_FRAME_6 = 0x03D, + GRCAN_TIRE_TEMP_FRAME_7 = 0x03E, + GRCAN_TIRE_TEMP_FRAME_8 = 0x03F, + GRCAN_TIRE_TEMP_FRAME_9 = 0x040, + GRCAN_TIRE_TEMP_FRAME_10 = 0x041, + GRCAN_TIRE_TEMP_FRAME_11 = 0x042, + GRCAN_TIRE_TEMP_FRAME_12 = 0x043, + GRCAN_TIRE_TEMP_FRAME_13 = 0x044, + GRCAN_TIRE_TEMP_FRAME_14 = 0x045, + GRCAN_TIRE_TEMP_FRAME_15 = 0x046, + GRCAN_TIRE_TEMP_FRAME_16 = 0x047, + GRCAN_TIRE_TEMP_FRAME_17 = 0x048, + GRCAN_TIRE_TEMP_FRAME_18 = 0x049, + GRCAN_TIRE_TEMP_FRAME_19 = 0x04A, + GRCAN_TIRE_TEMP_FRAME_20 = 0x04B, + GRCAN_TIRE_TEMP_FRAME_21 = 0x04C, + GRCAN_TIRE_TEMP_FRAME_22 = 0x04D, + GRCAN_TIRE_TEMP_FRAME_23 = 0x04E, + GRCAN_BRAKE_TEMP = 0x04F, + GRCAN_WHEEL_SPEED = 0x050, + GRCAN_SUSPENSION_IMU_MAG_DATA = 0x051, + GRCAN_INBOARDFLOOR_IMU_TOF_DATA = 0x052, + GRCAN_RTD_LIGHT_CTRL = 0x53, } GRCAN_MSG_ID; #endif // CAN_MSG_IDS_H diff --git a/Autogen/CAN/Inc/GRCAN_NODE_ID.h b/Autogen/CAN/Inc/GRCAN_NODE_ID.h index b54f03282..e89745227 100644 --- a/Autogen/CAN/Inc/GRCAN_NODE_ID.h +++ b/Autogen/CAN/Inc/GRCAN_NODE_ID.h @@ -3,41 +3,41 @@ #define GR_IDS_H typedef enum { - GRCAN_ALL = 0x00, - GRCAN_Charger = 0x00, - GRCAN_DTI_Inv = 0x00, - GRCAN_EM = 0x00, - GRCAN_IMD = 0x00, - GRCAN_Debugger = 0x01, - GRCAN_CCU = 0x02, - GRCAN_ECU = 0x02, - GRCAN_ACU = 0x03, - GRCAN_TCM = 0x04, - GRCAN_Dash_Panel = 0x05, - GRCAN_GR_Inv = 0x08, - GRCAN_Charging_SDC = 0x0C, - GRCAN_Fan_Ctrl_1 = 0x0D, - GRCAN_Fan_Ctrl_2 = 0x0E, - GRCAN_Fan_Ctrl_3 = 0x0F, - GRCAN_TireTemp_FL = 0x10, - GRCAN_TireTemp_FR = 0x11, - GRCAN_TireTemp_RL = 0x12, - GRCAN_TireTemp_RR = 0x13, - GRCAN_Suspension_FL = 0x14, - GRCAN_Suspension_FR = 0x15, - GRCAN_Suspension_RL = 0x16, - GRCAN_Suspension_RR = 0x17, - GRCAN_InboardFloor_FL = 0x18, - GRCAN_InboardFloor_FR = 0x19, - GRCAN_InboardFloor_RL = 0x1A, - GRCAN_InboardFloor_RR = 0x1B, - GRCAN_BrakeTemp_FL = 0x1C, - GRCAN_BrakeTemp_FR = 0x1D, - GRCAN_BrakeTemp_RL = 0x1E, - GRCAN_BrakeTemp_RR = 0x1F, - GRCAN_DGPS = 0x20, - GRCAN_LV_DC_DC = 0x29, - GRCAN_HV_DC_DC = 0x2A, + GRCAN_ALL = 0x00, + GRCAN_Charger = 0x00, + GRCAN_DTI_Inv = 0x00, + GRCAN_EM = 0x00, + GRCAN_IMD = 0x00, + GRCAN_Debugger = 0x01, + GRCAN_CCU = 0x02, + GRCAN_ECU = 0x02, + GRCAN_ACU = 0x03, + GRCAN_TCM = 0x04, + GRCAN_Dash_Panel = 0x05, + GRCAN_GR_Inv = 0x08, + GRCAN_Charging_SDC = 0x0C, + GRCAN_Fan_Ctrl_1 = 0x0D, + GRCAN_Fan_Ctrl_2 = 0x0E, + GRCAN_Fan_Ctrl_3 = 0x0F, + GRCAN_TireTemp_FL = 0x10, + GRCAN_TireTemp_FR = 0x11, + GRCAN_TireTemp_RL = 0x12, + GRCAN_TireTemp_RR = 0x13, + GRCAN_Suspension_FL = 0x14, + GRCAN_Suspension_FR = 0x15, + GRCAN_Suspension_RL = 0x16, + GRCAN_Suspension_RR = 0x17, + GRCAN_InboardFloor_FL = 0x18, + GRCAN_InboardFloor_FR = 0x19, + GRCAN_InboardFloor_RL = 0x1A, + GRCAN_InboardFloor_RR = 0x1B, + GRCAN_BrakeTemp_FL = 0x1C, + GRCAN_BrakeTemp_FR = 0x1D, + GRCAN_BrakeTemp_RL = 0x1E, + GRCAN_BrakeTemp_RR = 0x1F, + GRCAN_DGPS = 0x20, + GRCAN_LV_DC_DC = 0x29, + GRCAN_HV_DC_DC = 0x2A, } GRCAN_NODE_ID; #endif // GR_IDS_H From 1d9fd80e5eec0a3dcce4eb92e92bf61109243cc5 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 14:31:01 -0700 Subject: [PATCH 68/85] Try to implement RTD button light control Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 95 ++++++++++++++++++++++++++++-------- 1 file changed, 76 insertions(+), 19 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 21e9e9a4a..fff17fb68 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -8,6 +8,8 @@ #include "can.h" #include "main.h" #include "stm32g4xx_ll_gpio.h" +#include "StateMachine.h" +#include "Logomatic.h" void BrakeLightControl(ECU_StateData *stateLump) { @@ -35,15 +37,6 @@ void TSSILightControl(ECU_StateData *stateLump) } } -void RTDButtonLightControl(ECU_StateData *stateLump) -{ - if (stateLump->ecu_state == GR_DRIVE_ACTIVE) { - LL_GPIO_SetOutputPin(RTD_BTN_LED_CONTROL_GPIO_Port, RTD_BTN_LED_CONTROL_Pin); - } else { - LL_GPIO_ResetOutputPin(RTD_BTN_LED_CONTROL_GPIO_Port, RTD_BTN_LED_CONTROL_Pin); - } -} - void TSActiveButtonLightControl(ECU_StateData *stateLump) { if (stateLump->ecu_state == GR_GLV_ON || stateLump->ecu_state == GR_GLV_OFF) { @@ -53,23 +46,87 @@ void TSActiveButtonLightControl(ECU_StateData *stateLump) } } -void dashLights(ECU_StateData *stateLump) +void RTD_ButtonLightControl(ECU_StateData *stateLump) { - uint8_t timeState = (MillisecondsSinceBoot() >> 8) % 16; // counter from 0 to 15 that increments every 256 ms: - bool powerLevelLight = (stateLump->ecu_state == GR_GLV_ON) && (timeState < (stateLump->powerlevel + 1) * 2) && ((timeState % 2) == 0); + // Ignored anyway if not in GLV On + if (stateLump->ecu_state != GR_GLV_ON) { + return; + } + + // Send every 10 ms + static uint32_t last_rtd_light_update_millis; + if (MillisecondsSinceBoot() - last_rtd_light_update_millis < 10) { + return; + } + last_rtd_light_update_millis = MillisecondsSinceBoot(); - // // light control for if signal goog - // GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bspdFailure(stateLump) || powerLevelLight) << 2 | stateLump->imd_light << 1 | stateLump->bms_light}; + GRCAN_RTD_LIGHT_CTRL_MSG light_control = {0}; - // // this is needed for the latch open control - // message.led_latch_flags |= ((uint8_t)!(bspdFailure(stateLump) || powerLevelLight) << 5) | ((uint8_t)!stateLump->imd_light << 4) | ((uint8_t)!stateLump->bms_light << 3); + if (stateLump->torquemap == 0) + { + light_control.red = 0; + light_control.green = 0; + light_control.blue = 0; + ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); + } else if (stateLump->torquemap == 1) { + switch (stateLump->powerlevel) { + case 0: + light_control.red = 255; + light_control.green = 0; + light_control.blue = 0; + break; + case 1: + light_control.red = 255; + light_control.green = 127; + light_control.blue = 0; + break; + case 2: + light_control.red = 255; + light_control.green = 255; + light_control.blue = 0; + break; + case 3: + light_control.red = 127; + light_control.green = 255; + light_control.blue = 0; + break; + case 4: + light_control.red = 0; + light_control.green = 255; + light_control.blue = 0; + break; + case 5: + light_control.red = 0; + light_control.green = 255; + light_control.blue = 127; + break; + default: + light_control.red = 255; + light_control.green = 0; + light_control.blue = 0; + LOGOMATIC("Invalid power level: %d. Defaulting to red.\n", stateLump->powerlevel); + break; + } + + ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); + } else { + LOGOMATIC("Invalid torquemap: %d. Defaulting to off.\n", stateLump->torquemap); + light_control.red = 0; + light_control.green = 0; + light_control.blue = 0; + ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); + } +} + +void dashLights(ECU_StateData *stateLump) +{ bool bms_nonlatch = stateLump->bms_light; bool imd_nonlatch = stateLump->imd_light; - bool bspd_nonlatch = bspdFailure(stateLump) || powerLevelLight; + bool bspd_nonlatch = bspdFailure(stateLump); bool bms_latch = !stateLump->bms_light; bool imd_latch = !stateLump->imd_light; - bool bspd_latch = !(bspdFailure(stateLump) || powerLevelLight); + bool bspd_latch = !(bspdFailure(stateLump)); GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 0) | (imd_nonlatch << 1) | (bspd_nonlatch << 2) | (bms_latch << 3) | (imd_latch << 4) | (bspd_latch << 5)}; @@ -80,6 +137,6 @@ void lightControl(ECU_StateData *stateData) { BrakeLightControl(stateData); TSSILightControl(stateData); - RTDButtonLightControl(stateData); + RTD_ButtonLightControl(stateData); dashLights(stateData); } From ccc2f82bcfb676e632897616231f69ac77456791 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 14:53:19 -0700 Subject: [PATCH 69/85] Make lights orange Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index fff17fb68..164e71cf0 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -70,45 +70,35 @@ void RTD_ButtonLightControl(ECU_StateData *stateLump) ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); } else if (stateLump->torquemap == 1) { + float multiplier = 1.0f; switch (stateLump->powerlevel) { case 0: - light_control.red = 255; - light_control.green = 0; - light_control.blue = 0; + multiplier = 0.125f; break; case 1: - light_control.red = 255; - light_control.green = 127; - light_control.blue = 0; + multiplier = 0.25f; break; case 2: - light_control.red = 255; - light_control.green = 255; - light_control.blue = 0; + multiplier = 0.5f; break; case 3: - light_control.red = 127; - light_control.green = 255; - light_control.blue = 0; + multiplier = 0.75f; break; case 4: - light_control.red = 0; - light_control.green = 255; - light_control.blue = 0; + multiplier = 0.85f; break; case 5: - light_control.red = 0; - light_control.green = 255; - light_control.blue = 127; + multiplier = 1.0f; break; default: - light_control.red = 255; - light_control.green = 0; - light_control.blue = 0; - LOGOMATIC("Invalid power level: %d. Defaulting to red.\n", stateLump->powerlevel); - break; + LOGOMATIC("Invalid powerlevel: %d. Defaulting to 0.\n", stateLump->powerlevel); + multiplier = 0.0f; } + light_control.red = (uint8_t)(255 * multiplier); + light_control.green = (uint8_t)(165 * multiplier); + light_control.blue = (uint8_t)(0 * multiplier); + ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); } else { LOGOMATIC("Invalid torquemap: %d. Defaulting to off.\n", stateLump->torquemap); From d0f9811e0e7846f7f7174f01343ece1ea81afe9b Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 15:02:25 -0700 Subject: [PATCH 70/85] Change light multiplier cause light is bad Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 164e71cf0..dbc05de4a 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -73,19 +73,19 @@ void RTD_ButtonLightControl(ECU_StateData *stateLump) float multiplier = 1.0f; switch (stateLump->powerlevel) { case 0: - multiplier = 0.125f; + multiplier = 0.05f; break; case 1: - multiplier = 0.25f; + multiplier = 0.1f; break; case 2: - multiplier = 0.5f; + multiplier = 0.2f; break; case 3: - multiplier = 0.75f; + multiplier = 0.4f; break; case 4: - multiplier = 0.85f; + multiplier = 0.7f; break; case 5: multiplier = 1.0f; @@ -96,7 +96,7 @@ void RTD_ButtonLightControl(ECU_StateData *stateLump) } light_control.red = (uint8_t)(255 * multiplier); - light_control.green = (uint8_t)(165 * multiplier); + light_control.green = (uint8_t)(63 * multiplier); light_control.blue = (uint8_t)(0 * multiplier); ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_RTD_LIGHT_CTRL, &light_control, sizeof(light_control)); From de78348af73fea4184b46fb08aa118c622bb53db Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 15:16:59 -0700 Subject: [PATCH 71/85] remove duplicate fn --- ECU/Application/Src/StateUtils.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index a7fa0cd9d..88f222bf2 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -209,10 +209,3 @@ void Send_VCP_APPS(const ECU_StateData *stateData, uint16_t apps1_raw, uint16_t snprintf(buf, SIZE, "%" PRIu32 " A1 %d A2 %d A1R %d A2R %d\n", MillisecondsSinceBoot(), stateData->APPS1_Signal, stateData->APPS2_Signal, apps1_raw, apps2_raw); VCP_Send(buf, strlen(buf)); } - -void disable_inverter(void) -{ - GRCAN_INVERTER_COMMAND_MSG inverter_msg = {.drive_enable = 0, .field_weakening = 0, .rpm_limit = 0, .set_ac_current = 0, .set_dc_current = 0}; - ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_GR_Inverter, GRCAN_INVERTER_COMMAND, &inverter_msg, sizeof(inverter_msg)); - ECU_CAN_Send_DTI(DTI_CONTROL_12_CAN_ID, &inverter_msg.drive_enable, 1); -} From fe7af8c83106de5ccbf57fd2e9815dd18a94678a Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 15:20:28 -0700 Subject: [PATCH 72/85] Trivial commit Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index dbc05de4a..03474c88b 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -116,7 +116,7 @@ void dashLights(ECU_StateData *stateLump) bool bspd_nonlatch = bspdFailure(stateLump); bool bms_latch = !stateLump->bms_light; bool imd_latch = !stateLump->imd_light; - bool bspd_latch = !(bspdFailure(stateLump)); + bool bspd_latch = !bspdFailure(stateLump); GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 0) | (imd_nonlatch << 1) | (bspd_nonlatch << 2) | (bms_latch << 3) | (imd_latch << 4) | (bspd_latch << 5)}; From 2266eb8997de1331e0e9e826a8e923edb746e95d Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 15:30:12 -0700 Subject: [PATCH 73/85] change SDC levels --- ECU/Application/Src/StateUtils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 88f222bf2..4b10688a2 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -60,7 +60,7 @@ bool CriticalError(volatile const ECU_StateData *stateData) SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { // TODO: DYNAMIC LOGIC HERE - if (stateData->ams_sense < 0.5f) { + if (stateData->ams_sense < 0.2f) { return SDC_ONGOING_FAILURE; } else if (stateData->ams_sense > 1.6f) { return SDC_LATCHED_FAILURE; @@ -71,7 +71,7 @@ SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { SDC_Level imdLevel(volatile const ECU_StateData *stateData) { // TODO: DYNAMIC LOGIC HERE - if (stateData->imd_sense < 0.5f) { + if (stateData->imd_sense < 0.2f) { return SDC_ONGOING_FAILURE; } else if (stateData->imd_sense > 1.6f) { return SDC_LATCHED_FAILURE; From d9517affea7c2390031ce40685c93fc8d3122cf0 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 15:30:54 -0700 Subject: [PATCH 74/85] Fix message ordering Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 03474c88b..dd517e10f 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -118,7 +118,7 @@ void dashLights(ECU_StateData *stateLump) bool imd_latch = !stateLump->imd_light; bool bspd_latch = !bspdFailure(stateLump); - GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 0) | (imd_nonlatch << 1) | (bspd_nonlatch << 2) | (bms_latch << 3) | (imd_latch << 4) | (bspd_latch << 5)}; + GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 5) | (imd_nonlatch << 4) | (bspd_nonlatch << 3) | (bms_latch << 2) | (imd_latch << 1) | (bspd_latch << 0)}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } From e6a85b39842f182759a4afc7959f8419022aad04 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 15:57:54 -0700 Subject: [PATCH 75/85] Add condition for SDC startup instead of weird latch thing --- ECU/Application/Src/Lights.c | 23 ++++++++++++++++++++++- ECU/Application/Src/StateTicks.c | 24 ------------------------ ECU/Application/Src/StateUtils.c | 1 + 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 12817b010..6dd185116 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -18,11 +18,32 @@ void BrakeLightControl(ECU_StateData *stateLump) } } +static bool SDCStartupCondition = true; // prevent false positive TSSI on startup void TSSILightControl(ECU_StateData *stateLump) { // EV.5.11.5: Flash, 2 Hz to 5 Hz, 50% duty cycle // Here we chose a period of 286ms - if (stateLump->tssi_fault) { + + bool redCar; + + if (SDCStartupCondition) { + redCar = false; + + SDC_Level bms = bmsLevel(stateLump); + SDC_Level imd = imdLevel(stateLump); + + if (bms == SDC_OK && imd == SDC_OK) { + SDCStartupCondition = false; + } else if (bms == SDC_ONGOING_FAILURE || imd == SDC_ONGOING_FAILURE) { + SDCStartupCondition = false; + redCar = true; + } + } else { + redCar = bmsFailure(stateLump) || imdFailure(stateLump); + } + + + if (redCar) { LL_GPIO_ResetOutputPin(TSSI_G_CONTROL_GPIO_Port, TSSI_G_CONTROL_Pin); if (MillisecondsSinceBoot() % 286 < 143) { LL_GPIO_SetOutputPin(TSSI_R_CONTROL_GPIO_Port, TSSI_R_CONTROL_Pin); diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index bc989b7ee..e3efbf94b 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -39,30 +39,6 @@ void ECU_State_Tick(void) last_ECU_status_msg_millis = millis_since_boot; } - // light control - // false or imd_sense > 0.5 -> false -> no light - // false or imd_sense < 0.5 -> true -> light - // true or imd_sense > 0.5 -> true -> light stays on - // stateLump.bms_light |= !(stateLump.ams_sense > 0.5f); - // stateLump.imd_light |= !(stateLump.imd_sense > 0.5f); - // lgoht control reset - - // true and no failiure -> flase - // true and failiure -> true - // false and failure -> false - // flase and no failure -> false - // stateLump.bms_light &= (bmsFailure(&stateLump)); - // stateLump.imd_light &= (imdFailure(&stateLump)); - - SDC_Level bms_level = bmsLevel(&stateLump); - SDC_Level imd_level = imdLevel(&stateLump); - - stateLump.bms_light = (bms_level == SDC_ONGOING_FAILURE) || (stateLump.bms_light && bmsFailure(&stateLump)); - stateLump.imd_light = (imd_level == SDC_ONGOING_FAILURE) || (stateLump.imd_light && imdFailure(&stateLump)); - - stateLump.tssi_fault = stateLump.bms_light || stateLump.imd_light; - - // bmsFailure(&stateLump) || imdFailure(&stateLump); if (stateLump.ts_active_button_press_interrupt) { stateLump.ts_active_button_press_interrupt = false; diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 4b10688a2..cda1aec55 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -90,6 +90,7 @@ SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { return SDC_OK; } + bool bmsFailure(volatile const ECU_StateData *stateData) { SDC_Level level = bmsLevel(stateData); From 27aafa8e55e6aae662d7cfa16869a6b4914a8a54 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 16:00:26 -0700 Subject: [PATCH 76/85] comments --- ECU/Application/Src/Lights.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 6dd185116..f12effd15 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -19,6 +19,7 @@ void BrakeLightControl(ECU_StateData *stateLump) } static bool SDCStartupCondition = true; // prevent false positive TSSI on startup +// PRECONDITION: IMD assumed to give valid readings before this is run void TSSILightControl(ECU_StateData *stateLump) { // EV.5.11.5: Flash, 2 Hz to 5 Hz, 50% duty cycle @@ -26,6 +27,7 @@ void TSSILightControl(ECU_StateData *stateLump) bool redCar; + // if we are before SDC is reset, don't red car unless there is an active failure if (SDCStartupCondition) { redCar = false; @@ -43,6 +45,7 @@ void TSSILightControl(ECU_StateData *stateLump) } + // if red car blink tssi if (redCar) { LL_GPIO_ResetOutputPin(TSSI_G_CONTROL_GPIO_Port, TSSI_G_CONTROL_Pin); if (MillisecondsSinceBoot() % 286 < 143) { From 7efeafbc3f9720ca704287835940de40df955de6 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 16:05:35 -0700 Subject: [PATCH 77/85] bms not ams --- ECU/Application/Inc/StateData.h | 2 +- ECU/Application/Src/StateUtils.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ECU/Application/Inc/StateData.h b/ECU/Application/Inc/StateData.h index 088d9f283..ece6e9844 100644 --- a/ECU/Application/Inc/StateData.h +++ b/ECU/Application/Inc/StateData.h @@ -64,7 +64,7 @@ typedef volatile struct ECU_StateData { float rl_wheel_rpm; /** RL wheel, RPM */ - float ams_sense; + float bms_sense; float imd_sense; float bspd_sense; diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index cda1aec55..260a52309 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -60,9 +60,9 @@ bool CriticalError(volatile const ECU_StateData *stateData) SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { // TODO: DYNAMIC LOGIC HERE - if (stateData->ams_sense < 0.2f) { + if (stateData->bms_sense < 0.2f) { return SDC_ONGOING_FAILURE; - } else if (stateData->ams_sense > 1.6f) { + } else if (stateData->bms_sense > 1.6f) { return SDC_LATCHED_FAILURE; } From f47a4aff991691e69a654333c9550786e4f48f5f Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 16:06:20 -0700 Subject: [PATCH 78/85] also bms here --- ECU/Core/Src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index 3d18f1129..422752064 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -209,7 +209,7 @@ void write_adc_values_to_state_data(void) // TODO: determine conversion factors for all of these (uint to float) stateLump.bspd_sense = ADC_outputs[ADC_BUFFER_SENSE_BSPD] / 4095.0 * 3.3; stateLump.imd_sense = ADC_outputs[ADC_BUFFER_SENSE_IMD] / 4095.0 * 3.3; - stateLump.ams_sense = ADC_outputs[ADC_BUFFER_SENSE_AMS] / 4095.0 * 3.3; + stateLump.bms_sense = ADC_outputs[ADC_BUFFER_SENSE_AMS] / 4095.0 * 3.3; } void ADC_Configure(void) From 5d92d2a281d10bd0d33595e6451ea0b32e844111 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 16:13:04 -0700 Subject: [PATCH 79/85] Use these newfangled statedata values --- ECU/Application/Src/StateUtils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 9a90aa502..31a430655 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -61,9 +61,9 @@ bool CriticalError(volatile const ECU_StateData *stateData) SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { // TODO: DYNAMIC LOGIC HERE - if (stateData->bms_sense < 0.2f) { + if (stateData->bms_sense < stateData->bms_min_thresh) { return SDC_ONGOING_FAILURE; - } else if (stateData->bms_sense > 1.6f) { + } else if (stateData->bms_sense > stateData->bms_max_thresh) { return SDC_LATCHED_FAILURE; } @@ -72,9 +72,9 @@ SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { SDC_Level imdLevel(volatile const ECU_StateData *stateData) { // TODO: DYNAMIC LOGIC HERE - if (stateData->imd_sense < 0.2f) { + if (stateData->imd_sense < stateData->imd_min_thresh) { return SDC_ONGOING_FAILURE; - } else if (stateData->imd_sense > 1.6f) { + } else if (stateData->imd_sense > stateData->imd_max_thresh) { return SDC_LATCHED_FAILURE; } From d8a9caa63a09de2afa8dd8d088b6674ddf8986f2 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Sat, 30 May 2026 16:34:55 -0700 Subject: [PATCH 80/85] Mid progress to get the lights working Signed-off-by: Daniel Hansen --- ECU/Application/Src/Lights.c | 12 +++++++----- ECU/Application/Src/StateTicks.c | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index 111f673af..ff77e7212 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -1,15 +1,15 @@ #include "Lights.h" #include "CANutils.h" +#include "Logomatic.h" #include "StateData.h" +#include "StateMachine.h" #include "StateUtils.h" #include "adc.h" #include "bitManipulations.h" #include "can.h" #include "main.h" #include "stm32g4xx_ll_gpio.h" -#include "StateMachine.h" -#include "Logomatic.h" void BrakeLightControl(ECU_StateData *stateLump) { @@ -46,7 +46,6 @@ void TSSILightControl(ECU_StateData *stateLump) redCar = bmsFailure(stateLump) || imdFailure(stateLump); } - // if red car blink tssi if (redCar) { LL_GPIO_ResetOutputPin(TSSI_G_CONTROL_GPIO_Port, TSSI_G_CONTROL_Pin); @@ -86,8 +85,7 @@ void RTD_ButtonLightControl(ECU_StateData *stateLump) GRCAN_RTD_LIGHT_CTRL_MSG light_control = {0}; - if (stateLump->torquemap == 0) - { + if (stateLump->torquemap == 0) { light_control.red = 0; light_control.green = 0; light_control.blue = 0; @@ -135,6 +133,7 @@ void RTD_ButtonLightControl(ECU_StateData *stateLump) void dashLights(ECU_StateData *stateLump) { + /* bool bms_nonlatch = stateLump->bms_light; bool imd_nonlatch = stateLump->imd_light; bool bspd_nonlatch = bspdFailure(stateLump); @@ -143,6 +142,9 @@ void dashLights(ECU_StateData *stateLump) bool bspd_latch = !bspdFailure(stateLump); GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (bms_nonlatch << 5) | (imd_nonlatch << 4) | (bspd_nonlatch << 3) | (bms_latch << 2) | (imd_latch << 1) | (bspd_latch << 0)}; + */ + GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (!bspdFailure(stateLump) << 5) | (!imdFailure(stateLump) << 4) | (!bmsFailure(stateLump) << 3) | (bspdFailure(stateLump) << 2) | + (imdFailure(stateLump) << 1) | (bmsFailure(stateLump) << 0)}; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index e1b2e2dc3..48ac32350 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -38,10 +38,10 @@ ECU_StateData stateLump = { // APPS Deadzone .apps_deadzone = 0.08f, // BMS thresholds - .bms_min_thresh = 0.2f, + .bms_min_thresh = 0.3f, .bms_max_thresh = 1.6f, // IMD thresholds - .imd_min_thresh = 0.2f, + .imd_min_thresh = 0.3f, .imd_max_thresh = 1.6f, // BSPD thresholds .bspd_min_thresh = 0.6f, From 716952fe88f8111efd849752eccbe8be47e8f8e4 Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 17:20:27 -0700 Subject: [PATCH 81/85] It really shouldn't be this way but it is right now --- ECU/Application/Src/Lights.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index ff77e7212..f34400505 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -146,6 +146,7 @@ void dashLights(ECU_StateData *stateLump) GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (!bspdFailure(stateLump) << 5) | (!imdFailure(stateLump) << 4) | (!bmsFailure(stateLump) << 3) | (bspdFailure(stateLump) << 2) | (imdFailure(stateLump) << 1) | (bmsFailure(stateLump) << 0)}; + message.led_latch_flags = ~message.led_latch_flags; ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } From fb7b7be078da48fe59956e056b5cd35c5d94f86c Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sat, 30 May 2026 17:21:41 -0700 Subject: [PATCH 82/85] make bspd use these newfangled statedata values too --- ECU/Application/Src/StateUtils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 31a430655..304273c94 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -82,9 +82,9 @@ SDC_Level imdLevel(volatile const ECU_StateData *stateData) { } SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { - if (stateData->bspd_sense < 0.6f) { + if (stateData->bspd_sense < stateData->bspd_min_thresh) { return SDC_ONGOING_FAILURE; - } else if (stateData->bspd_sense > 1.35f) { + } else if (stateData->bspd_sense > stateData->bspd_max_thresh) { return SDC_LATCHED_FAILURE; } From be0cd3530c90fd708b24a4c60f6f41564f1b62f3 Mon Sep 17 00:00:00 2001 From: kzwicker Date: Sun, 31 May 2026 01:09:35 -0700 Subject: [PATCH 83/85] comment dash light strangeness --- ECU/Application/Src/Lights.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ECU/Application/Src/Lights.c b/ECU/Application/Src/Lights.c index f34400505..3e0e7c31d 100644 --- a/ECU/Application/Src/Lights.c +++ b/ECU/Application/Src/Lights.c @@ -146,7 +146,7 @@ void dashLights(ECU_StateData *stateLump) GRCAN_DASH_CONFIG_MSG message = {.led_latch_flags = (!bspdFailure(stateLump) << 5) | (!imdFailure(stateLump) << 4) | (!bmsFailure(stateLump) << 3) | (bspdFailure(stateLump) << 2) | (imdFailure(stateLump) << 1) | (bmsFailure(stateLump) << 0)}; - message.led_latch_flags = ~message.led_latch_flags; + message.led_latch_flags = ~message.led_latch_flags; // not to spec, needed as of the current iteration of the dash panel code ECU_CAN_Send(GRCAN_BUS_PRIMARY, GRCAN_Dash_Panel, GRCAN_DASH_CONFIG, &message, sizeof(message)); } From dd7847263f0e7ab7b8bead09b2af648453e8b5fd Mon Sep 17 00:00:00 2001 From: Casey Zwicker Date: Sun, 31 May 2026 12:08:00 -0700 Subject: [PATCH 84/85] change HOOTLtest to match progress --- ECU/Test/Src/StateTicksTest.c | 93 +++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index 2fb1b9132..67a852156 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -79,12 +79,53 @@ static void ECU_Pseudo_State_Tick(ECU_StateData *stateLumpTest) int main(void) { + ECU_StateData defaultState = { + // Start on GLV On + .ecu_state = GR_GLV_ON, + // Assume ACU good at boot + .acu_software_latch = 1, + // Startup at minimum power + .powerlevel = 0, + // See CANdo specification + .torquemap = 1, + // APPS Deadzone + .apps_deadzone = 0.08f, + // BMS thresholds + .bms_min_thresh = 0.3f, + .bms_max_thresh = 1.6f, + // IMD thresholds + .imd_min_thresh = 0.3f, + .imd_max_thresh = 1.6f, + // BSPD thresholds + .bspd_min_thresh = 0.6f, + .bspd_max_thresh = 1.35f, + // Timings + .ping_timeout_delay_ms = 250, + .max_precharge_time_ms = 8000, + // Pedals + .brake_f_min = 700, + .brake_r_min = 0, + .brake_bse_min = 720, + .apps_1_min = 2375, + .apps_2_min = 2430, + .apps_1_max = 1897, + .apps_2_max = 1926, + // Regen + .regen_strength = 2, + .enable_regen = false + }; + + defaultState.bms_sense = 1.5; + defaultState.imd_sense = 1.5; + defaultState.bspd_sense = 1.2; + { // ########################### // ## Step 0.0 ## // ########################### LOGOMATIC("State Ticks test started\n"); - ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .bms_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.2}; + ECU_StateData stateLumpTest = defaultState; + LOGOMATIC("Check GLV ON at boot\n"); stateLumpTest.ecu_state = GR_GLV_ON; stateLumpTest.acu_software_latch = 1; @@ -109,8 +150,8 @@ int main(void) // ## Step 0.2 ## // ########################## LOGOMATIC("Press throttle (1 and 2): STAY IN GLV ON\n"); - stateLumpTest.APPS1_Signal = THROTTLE_MAX_1; - stateLumpTest.APPS2_Signal = THROTTLE_MAX_2; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_max; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_max; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { LOGOMATIC("0.2 Failure: ecu state not in GLV ON\n"); @@ -120,11 +161,11 @@ int main(void) LOGOMATIC("0.2 Failure: TSSI reports faulty\n"); return 1; } - stateLumpTest.APPS1_Signal = THROTTLE_MIN_1; - stateLumpTest.APPS2_Signal = THROTTLE_MIN_2; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_min; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_min; LOGOMATIC("Press brake: STAY IN GLV ON\n"); - stateLumpTest.bse_signal = BSE_MAX; + stateLumpTest.bse_signal = stateLumpTest.brake_bse_min + 69; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { LOGOMATIC("0.2 Failure: ecu state not in GLV ON\n"); @@ -136,7 +177,7 @@ int main(void) } LOGOMATIC("Release brake: STAY IN GLV ON\n"); - stateLumpTest.bse_signal = 0.0f; + stateLumpTest.bse_signal = 0; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { LOGOMATIC("0.2 Failure: ecu state not in GLV ON\n"); @@ -217,7 +258,7 @@ int main(void) // ## Step 0.7 ## // ########################## LOGOMATIC("Press and release the RTD button WHILE pressing the brake\n"); - stateLumpTest.bse_signal = BSE_MAX; + stateLumpTest.bse_signal = stateLumpTest.brake_bse_min + 69; LOGOMATIC("Press RTD\n"); stateLumpTest.rtd_button_press_interrupt = true; ECU_Pseudo_State_Tick(&stateLumpTest); @@ -236,7 +277,7 @@ int main(void) // ## Step 0.8 ## // ########################## LOGOMATIC("Release Brakes -> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.bse_signal = 0.0f; + stateLumpTest.bse_signal = 0; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.8 Failure: ecu state not in drive active\n"); @@ -251,8 +292,8 @@ int main(void) // ## Step 0.9 ## // ########################## LOGOMATIC("Press Throttle -> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.APPS1_Signal = THROTTLE_MAX_1; - stateLumpTest.APPS2_Signal = THROTTLE_MAX_2; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_max; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_max; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.9 Failure: ecu state not in drive active\n"); @@ -283,9 +324,9 @@ int main(void) // ## Step 0.11 ## // ########################## LOGOMATIC("Press Throttle and Brake -> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.APPS1_Signal = THROTTLE_MAX_1; - stateLumpTest.APPS2_Signal = THROTTLE_MAX_2; - stateLumpTest.bse_signal = BSE_MAX; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_max; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_max; + stateLumpTest.bse_signal = stateLumpTest.brake_bse_min + 69; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.11 Failure: ecu state not in drive active\n"); @@ -300,9 +341,9 @@ int main(void) // ## Step 0.12 ## // ########################## LOGOMATIC("Release Throttle and Brake-> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.APPS1_Signal = 0; - stateLumpTest.APPS2_Signal = 0; - stateLumpTest.bse_signal = 0.0f; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_min; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_min; + stateLumpTest.bse_signal = 0; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.12 Failure: ecu state not in drive active\n"); @@ -317,8 +358,8 @@ int main(void) // ## Step 0.13 ## // ########################## LOGOMATIC("Press Throttle -> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.APPS1_Signal = THROTTLE_MAX_1; - stateLumpTest.APPS2_Signal = THROTTLE_MAX_2; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_max; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_max; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.13 Failure: ecu state not in drive active\n"); @@ -333,8 +374,8 @@ int main(void) // ## Step 0.14 ## // ########################## LOGOMATIC("Release Throttle -> STAY IN DRIVE ACTIVE\n"); - stateLumpTest.APPS1_Signal = 0; - stateLumpTest.APPS2_Signal = 0; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_min; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_min; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_DRIVE_ACTIVE) { LOGOMATIC("0.14 Failure: ecu state not in drive active\n"); @@ -374,8 +415,8 @@ int main(void) // ## Step 0.16 ## // ########################## LOGOMATIC("Press Throttle -> STAY IN Precharge Complete\n"); - stateLumpTest.APPS1_Signal = THROTTLE_MAX_1; - stateLumpTest.APPS2_Signal = THROTTLE_MAX_2; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_max; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_max; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_COMPLETE) { LOGOMATIC("0.16 Failure: ecu state not in precharge complete\n"); @@ -390,8 +431,8 @@ int main(void) // ## Step 0.17 ## // ########################## LOGOMATIC("Release Throttle -> STAY IN Precharge Complete\n"); - stateLumpTest.APPS1_Signal = 0; - stateLumpTest.APPS2_Signal = 0; + stateLumpTest.APPS1_Signal = stateLumpTest.apps_1_min; + stateLumpTest.APPS2_Signal = stateLumpTest.apps_2_min; ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_PRECHARGE_COMPLETE) { LOGOMATIC("0.17 Failure: ecu state not in precharge complete\n"); @@ -451,7 +492,7 @@ int main(void) // ## Step 1.0 ## // ########################## LOGOMATIC("Reset system\n"); - ECU_StateData stateLumpTest = {.ecu_state = GR_GLV_ON, .bms_sense = 1.5, .imd_sense = 1.5, .bspd_sense = 1.5}; + ECU_StateData stateLumpTest = defaultState; LOGOMATIC("State Tick Test 1 started\n"); ECU_Pseudo_State_Tick(&stateLumpTest); if (stateLumpTest.ecu_state != GR_GLV_ON) { From abb0f9ad793edc084906a3f63ed22bfad9711426 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 31 May 2026 19:13:13 +0000 Subject: [PATCH 85/85] Automatic Clang-Format: Standardized formatting automatically --- ECU/Application/Inc/StateUtils.h | 6 +-- ECU/Application/Src/CANutils.c | 37 +++++++++-------- ECU/Application/Src/StateTicks.c | 5 +-- ECU/Application/Src/StateUtils.c | 12 +++--- ECU/Core/Inc/main.h | 2 +- ECU/Core/Src/main.c | 4 +- ECU/Test/Src/StateTicksTest.c | 68 ++++++++++++++++---------------- 7 files changed, 65 insertions(+), 69 deletions(-) diff --git a/ECU/Application/Inc/StateUtils.h b/ECU/Application/Inc/StateUtils.h index 856cdd300..c258b6676 100644 --- a/ECU/Application/Inc/StateUtils.h +++ b/ECU/Application/Inc/StateUtils.h @@ -56,9 +56,9 @@ uint32_t MillisecondsSinceBoot(void); #define RATE_LIMIT_10_HZ(x, y) ((x) - (y) > 100) typedef enum { - SDC_OK, - SDC_ONGOING_FAILURE, - SDC_LATCHED_FAILURE + SDC_OK, + SDC_ONGOING_FAILURE, + SDC_LATCHED_FAILURE } SDC_Level; // Checks stateData for critical errors diff --git a/ECU/Application/Src/CANutils.c b/ECU/Application/Src/CANutils.c index cd167b5cb..5b1765cc9 100644 --- a/ECU/Application/Src/CANutils.c +++ b/ECU/Application/Src/CANutils.c @@ -148,27 +148,26 @@ void SendECUAnalogDataOverCAN(const ECU_StateData *stateData) } } -void SendECUConfigOverCAN(const ECU_StateData * stateData) +void SendECUConfigOverCAN(const ECU_StateData *stateData) { GRCAN_ECU_CONFIG_MSG message = {.ping_timeout_delay = (uint8_t)(stateData->ping_timeout_delay_ms / 10.0f), - .brake_f_min = (uint8_t)(stateData->brake_f_min / 25.0f), - .brake_r_min = (uint8_t)(stateData->brake_r_min / 25.0f), - .brake_bse_min = (uint8_t)(stateData->brake_bse_min / 25.0f), - .apps_1_min = (uint8_t)(stateData->apps_1_min / 10.0f), - .apps_2_min = (uint8_t)(stateData->apps_2_min / 10.0f), - .apps_1_max = (uint8_t)(stateData->apps_1_max / 10.0f), - .apps_2_max = (uint8_t)(stateData->apps_2_max / 10), - .apps_deadzone = (uint8_t)(stateData->apps_deadzone * 25.5f), - .bms_min_threshold = (uint8_t)(stateData->bms_min_thresh * 20.0f), - .bms_max_threshold = (uint8_t)(stateData->bms_max_thresh * 20.0f), - .imd_min_threshold = (uint8_t)(stateData->imd_min_thresh * 20.0f), - .imd_max_threshold = (uint8_t)(stateData->imd_max_thresh * 20.0f), - .bspd_min_threshold = (uint8_t)(stateData->bspd_min_thresh * 20.0f), - .bspd_max_threshold = (uint8_t)(stateData->bspd_max_thresh * 20.0f), - .max_precharge_time = (uint8_t)(stateData->max_precharge_time_ms / 10), - .regen_strength = (uint8_t)(stateData->regen_strength * 10), - .enable_regen = stateData->enable_regen - }; + .brake_f_min = (uint8_t)(stateData->brake_f_min / 25.0f), + .brake_r_min = (uint8_t)(stateData->brake_r_min / 25.0f), + .brake_bse_min = (uint8_t)(stateData->brake_bse_min / 25.0f), + .apps_1_min = (uint8_t)(stateData->apps_1_min / 10.0f), + .apps_2_min = (uint8_t)(stateData->apps_2_min / 10.0f), + .apps_1_max = (uint8_t)(stateData->apps_1_max / 10.0f), + .apps_2_max = (uint8_t)(stateData->apps_2_max / 10), + .apps_deadzone = (uint8_t)(stateData->apps_deadzone * 25.5f), + .bms_min_threshold = (uint8_t)(stateData->bms_min_thresh * 20.0f), + .bms_max_threshold = (uint8_t)(stateData->bms_max_thresh * 20.0f), + .imd_min_threshold = (uint8_t)(stateData->imd_min_thresh * 20.0f), + .imd_max_threshold = (uint8_t)(stateData->imd_max_thresh * 20.0f), + .bspd_min_threshold = (uint8_t)(stateData->bspd_min_thresh * 20.0f), + .bspd_max_threshold = (uint8_t)(stateData->bspd_max_thresh * 20.0f), + .max_precharge_time = (uint8_t)(stateData->max_precharge_time_ms / 10), + .regen_strength = (uint8_t)(stateData->regen_strength * 10), + .enable_regen = stateData->enable_regen}; ECU_CAN_Send(GRCAN_BUS_DATA, GRCAN_TCM, GRCAN_ECU_CONFIG, &message, sizeof(message)); } diff --git a/ECU/Application/Src/StateTicks.c b/ECU/Application/Src/StateTicks.c index 48ac32350..499168219 100644 --- a/ECU/Application/Src/StateTicks.c +++ b/ECU/Application/Src/StateTicks.c @@ -59,9 +59,7 @@ ECU_StateData stateLump = { .apps_2_max = 1926, // Regen .regen_strength = 2, - .enable_regen = false -} -; + .enable_regen = false}; static uint32_t millis_since_boot; void ECU_State_Tick(void) @@ -74,7 +72,6 @@ void ECU_State_Tick(void) last_ECU_status_msg_millis = millis_since_boot; } - if (stateLump.ts_active_button_press_interrupt) { stateLump.ts_active_button_press_interrupt = false; stateLump.ts_active_button_pressed = true; diff --git a/ECU/Application/Src/StateUtils.c b/ECU/Application/Src/StateUtils.c index 304273c94..c0e0dca94 100644 --- a/ECU/Application/Src/StateUtils.c +++ b/ECU/Application/Src/StateUtils.c @@ -11,13 +11,13 @@ #include "GRCAN_MSG_ID.h" #include "GRCAN_NODE_ID.h" #include "Logomatic.h" +#include "Plan_C.h" #include "StateData.h" #include "Unused.h" #include "main.h" #include "stm32g4xx_hal.h" #include "stm32g4xx_ll_gpio.h" #include "vcp.h" -#include "Plan_C.h" /** * @brief Delay after startup to allow IMD sense to stabilize before considering IMD sense failures valid @@ -59,7 +59,8 @@ bool CriticalError(volatile const ECU_StateData *stateData) return problem; } -SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { +SDC_Level bmsLevel(volatile const ECU_StateData *stateData) +{ // TODO: DYNAMIC LOGIC HERE if (stateData->bms_sense < stateData->bms_min_thresh) { return SDC_ONGOING_FAILURE; @@ -70,7 +71,8 @@ SDC_Level bmsLevel(volatile const ECU_StateData *stateData) { return SDC_OK; } -SDC_Level imdLevel(volatile const ECU_StateData *stateData) { +SDC_Level imdLevel(volatile const ECU_StateData *stateData) +{ // TODO: DYNAMIC LOGIC HERE if (stateData->imd_sense < stateData->imd_min_thresh) { return SDC_ONGOING_FAILURE; @@ -81,7 +83,8 @@ SDC_Level imdLevel(volatile const ECU_StateData *stateData) { return SDC_OK; } -SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { +SDC_Level bspdLevel(volatile const ECU_StateData *stateData) +{ if (stateData->bspd_sense < stateData->bspd_min_thresh) { return SDC_ONGOING_FAILURE; } else if (stateData->bspd_sense > stateData->bspd_max_thresh) { @@ -91,7 +94,6 @@ SDC_Level bspdLevel(volatile const ECU_StateData *stateData) { return SDC_OK; } - bool bmsFailure(volatile const ECU_StateData *stateData) { SDC_Level level = bmsLevel(stateData); diff --git a/ECU/Core/Inc/main.h b/ECU/Core/Inc/main.h index cac9c58e6..57c09c1de 100644 --- a/ECU/Core/Inc/main.h +++ b/ECU/Core/Inc/main.h @@ -44,8 +44,8 @@ extern "C" { /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ -#include "Plan_C.h" #include "GRCAN_NODE_ID.h" +#include "Plan_C.h" /* USER CODE END Includes */ /* Exported types ------------------------------------------------------------*/ diff --git a/ECU/Core/Src/main.c b/ECU/Core/Src/main.c index e5120e45b..5d7e457f6 100644 --- a/ECU/Core/Src/main.c +++ b/ECU/Core/Src/main.c @@ -39,13 +39,13 @@ #include "Lights.h" #include "Logomatic.h" #include "Pinging.h" +#include "Plan_C.h" #include "StateTicks.h" #include "StateUtils.h" #include "adc.h" #include "can.h" #include "stm32g4xx_hal.h" #include "vcp.h" -#include "Plan_C.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -540,7 +540,7 @@ int main(void) // ADC_Logomatic(); } } -/* USER CODE END 3 */ + /* USER CODE END 3 */ } /** diff --git a/ECU/Test/Src/StateTicksTest.c b/ECU/Test/Src/StateTicksTest.c index 67a852156..8f6883419 100644 --- a/ECU/Test/Src/StateTicksTest.c +++ b/ECU/Test/Src/StateTicksTest.c @@ -79,41 +79,39 @@ static void ECU_Pseudo_State_Tick(ECU_StateData *stateLumpTest) int main(void) { - ECU_StateData defaultState = { - // Start on GLV On - .ecu_state = GR_GLV_ON, - // Assume ACU good at boot - .acu_software_latch = 1, - // Startup at minimum power - .powerlevel = 0, - // See CANdo specification - .torquemap = 1, - // APPS Deadzone - .apps_deadzone = 0.08f, - // BMS thresholds - .bms_min_thresh = 0.3f, - .bms_max_thresh = 1.6f, - // IMD thresholds - .imd_min_thresh = 0.3f, - .imd_max_thresh = 1.6f, - // BSPD thresholds - .bspd_min_thresh = 0.6f, - .bspd_max_thresh = 1.35f, - // Timings - .ping_timeout_delay_ms = 250, - .max_precharge_time_ms = 8000, - // Pedals - .brake_f_min = 700, - .brake_r_min = 0, - .brake_bse_min = 720, - .apps_1_min = 2375, - .apps_2_min = 2430, - .apps_1_max = 1897, - .apps_2_max = 1926, - // Regen - .regen_strength = 2, - .enable_regen = false - }; + ECU_StateData defaultState = {// Start on GLV On + .ecu_state = GR_GLV_ON, + // Assume ACU good at boot + .acu_software_latch = 1, + // Startup at minimum power + .powerlevel = 0, + // See CANdo specification + .torquemap = 1, + // APPS Deadzone + .apps_deadzone = 0.08f, + // BMS thresholds + .bms_min_thresh = 0.3f, + .bms_max_thresh = 1.6f, + // IMD thresholds + .imd_min_thresh = 0.3f, + .imd_max_thresh = 1.6f, + // BSPD thresholds + .bspd_min_thresh = 0.6f, + .bspd_max_thresh = 1.35f, + // Timings + .ping_timeout_delay_ms = 250, + .max_precharge_time_ms = 8000, + // Pedals + .brake_f_min = 700, + .brake_r_min = 0, + .brake_bse_min = 720, + .apps_1_min = 2375, + .apps_2_min = 2430, + .apps_1_max = 1897, + .apps_2_max = 1926, + // Regen + .regen_strength = 2, + .enable_regen = false}; defaultState.bms_sense = 1.5; defaultState.imd_sense = 1.5;