Skip to content

Commit

Permalink
Tidy the interface and headers in DaisychainBMS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davefiddes committed Sep 27, 2024
1 parent a1779c2 commit 64fcaf0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions include/daisychainbms.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@

#ifndef DAISYCHAINBMS_H
#define DAISYCHAINBMS_H

#include "bms.h"
#include "canhardware.h"
#include <stdint.h>

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();
Expand Down
2 changes: 1 addition & 1 deletion src/daisychainbms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "daisychainbms.h"
#include <math.h>
#include "stm32_vcu.h"

/*
* This module receives messages from catphish's DaisychainBMS and updates
Expand Down

0 comments on commit 64fcaf0

Please sign in to comment.