Skip to content

Commit

Permalink
move CollectionStream to CUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon-Knight committed Dec 31, 2024
1 parent 66aaa88 commit 55b020c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 64 deletions.
10 changes: 5 additions & 5 deletions include/BMSLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <BMSManager.h>
#include <drivers/BMSAnt.h>
#include <drivers/BMSOther.h>
#include <CollectionStream.h>
#include <CUtils.h>

extern UART_HandleTypeDef hBms1Uart;
extern UART_HandleTypeDef hBms2Uart;
Expand All @@ -18,8 +18,8 @@ namespace BMSLogic
BMSManager Bms(BMS_UART_TX, BMS_ERROR);


void OnLowVoltageBatt1Steam(uint16_t coll_el, uint8_t idx);
void OnLowVoltageBatt2Steam(uint16_t coll_el, uint8_t idx);
void OnLowVoltageBatt1Steam(auto coll_el, uint8_t idx);
void OnLowVoltageBatt2Steam(auto coll_el, uint8_t idx);

CollectionStream<uint16_t> LowVoltageBatt1Stream(Ant1.data->cell_voltage, BMSANT::CellsNumber, OnLowVoltageBatt1Steam);
CollectionStream<uint16_t> LowVoltageBatt2Stream(Ant2.data->cell_voltage, BMSANT::CellsNumber, OnLowVoltageBatt2Steam);
Expand Down Expand Up @@ -121,15 +121,15 @@ namespace BMSLogic
//UpdateMaxTemperature();
}

void OnLowVoltageBatt1Steam(uint16_t coll_el, uint8_t idx)
void OnLowVoltageBatt1Steam(auto coll_el, uint8_t idx)
{
CANLib::obj_low_voltage_batt_1.SetValue(0, (idx + 1), CAN_TIMER_TYPE_NONE, CAN_EVENT_TYPE_NORMAL);
CANLib::obj_low_voltage_batt_1.SetValue(1, coll_el, CAN_TIMER_TYPE_NONE, CAN_EVENT_TYPE_NORMAL);

return;
}

void OnLowVoltageBatt2Steam(uint16_t coll_el, uint8_t idx)
void OnLowVoltageBatt2Steam(auto coll_el, uint8_t idx)
{
CANLib::obj_low_voltage_batt_2.SetValue(0, (idx + 1), CAN_TIMER_TYPE_NONE, CAN_EVENT_TYPE_NORMAL);
CANLib::obj_low_voltage_batt_2.SetValue(1, coll_el, CAN_TIMER_TYPE_NONE, CAN_EVENT_TYPE_NORMAL);
Expand Down
59 changes: 0 additions & 59 deletions lib/CANLibEx/CollectionStream.h

This file was deleted.

0 comments on commit 55b020c

Please sign in to comment.