From 8cf15685b8eae67728de75c79ed01b51c3856ece Mon Sep 17 00:00:00 2001 From: jazzpi Date: Wed, 20 Jul 2022 12:43:32 +0200 Subject: [PATCH] 7 slaves --- Core/Inc/Slave_Monitoring.h | 2 +- Core/Src/CAN_Communication.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/Inc/Slave_Monitoring.h b/Core/Inc/Slave_Monitoring.h index 204f563..e2899a4 100644 --- a/Core/Inc/Slave_Monitoring.h +++ b/Core/Inc/Slave_Monitoring.h @@ -14,7 +14,7 @@ #include "stm32g441xx.h" -#define NUMBEROFSLAVES 6 +#define NUMBEROFSLAVES 7 #define NUMBEROFCELLS 10 #define NUMBEROFTEMPS 32 diff --git a/Core/Src/CAN_Communication.c b/Core/Src/CAN_Communication.c index a37a2c4..25ae679 100644 --- a/Core/Src/CAN_Communication.c +++ b/Core/Src/CAN_Communication.c @@ -12,8 +12,10 @@ #include "stm32g4xx_hal_fdcan.h" // 3 should be programmed with CAN id 2 +// const uint16_t slave_CAN_id_to_slave_index[7] = { +// 255, 255, 0, 255, 255, 255, 1}; // TODO: Make this pretty pls const uint16_t slave_CAN_id_to_slave_index[7] = { - 0, 1, 2, 3, 4, 5, 255}; // TODO: Make this pretty pls + 0, 1, 2, 3, 4, 5, 6}; // TODO: Make this pretty pls canFrame framebuffer[CANFRAMEBUFFERSIZE] = {0}; uint32_t framebufferwritepointer; uint32_t framebufferreadpointer;