From 6dab1a5eb74355a7c502b4bb7abfb4dec42a5fed Mon Sep 17 00:00:00 2001 From: jazzpi Date: Mon, 8 Aug 2022 01:21:22 +0200 Subject: [PATCH] 9 slaves --- Core/Inc/Slave_Monitoring.h | 2 +- Core/Src/CAN_Communication.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Core/Inc/Slave_Monitoring.h b/Core/Inc/Slave_Monitoring.h index 1305f21..0593cda 100644 --- a/Core/Inc/Slave_Monitoring.h +++ b/Core/Inc/Slave_Monitoring.h @@ -14,7 +14,7 @@ #include "stm32g441xx.h" -#define NUMBEROFSLAVES 7 +#define NUMBEROFSLAVES 9 #define NUMBEROFCELLS 10 #define NUMBEROFTEMPS 32 diff --git a/Core/Src/CAN_Communication.c b/Core/Src/CAN_Communication.c index baf1b23..6223891 100644 --- a/Core/Src/CAN_Communication.c +++ b/Core/Src/CAN_Communication.c @@ -14,11 +14,8 @@ #include #include -// 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, 6}; // TODO: Make this pretty pls +const uint16_t slave_CAN_id_to_slave_index[10] = { + 0, 1, 2, 3, 4, 5, 6, 7, 255, 8}; // TODO: Make this pretty pls canFrame framebuffer[CANFRAMEBUFFERSIZE] = {0}; uint32_t framebufferwritepointer = 0; uint32_t framebufferreadpointer = 0;