From 64fcaf011f7918b77682df08329b01cdaa95e77f Mon Sep 17 00:00:00 2001 From: "David J. Fiddes" Date: Fri, 27 Sep 2024 17:55:07 +0100 Subject: [PATCH] Tidy the interface and headers in DaisychainBMS Fix the daisychainbms.h headers to match what is required to define the class. Remove the catch all stm32_vcu.h from daisychainbms.cpp. Update the interface of DaisychainBMS to explicitly override parent methods. --- include/daisychainbms.h | 11 +++++++---- src/daisychainbms.cpp | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/daisychainbms.h b/include/daisychainbms.h index d4d48dee..3ba1e837 100644 --- a/include/daisychainbms.h +++ b/include/daisychainbms.h @@ -19,15 +19,18 @@ #ifndef DAISYCHAINBMS_H #define DAISYCHAINBMS_H + +#include "bms.h" +#include "canhardware.h" #include class DaisychainBMS: public BMS { public: - virtual void SetCanInterface(CanHardware* c); - void DecodeCAN(int id, uint8_t * data); - float MaxChargeCurrent(); - void Task100Ms(); + void SetCanInterface(CanHardware* c) override; + void DecodeCAN(int id, uint8_t * data) override; + float MaxChargeCurrent() override; + void Task100Ms() override; private: bool BMSDataValid(); bool ChargeAllowed(); diff --git a/src/daisychainbms.cpp b/src/daisychainbms.cpp index 5f9fecfb..eb6c66ce 100644 --- a/src/daisychainbms.cpp +++ b/src/daisychainbms.cpp @@ -17,8 +17,8 @@ * along with this program. If not, see . */ +#include "daisychainbms.h" #include -#include "stm32_vcu.h" /* * This module receives messages from catphish's DaisychainBMS and updates