mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Update TESLA-BATTERY.cpp
This commit is contained in:
parent
f7033b59d0
commit
ec1d0cf990
1 changed files with 2 additions and 2 deletions
|
@ -27,6 +27,7 @@ static uint16_t sendContactorClosingMessagesStill = 300;
|
||||||
static uint16_t battery_cell_max_v = 3300;
|
static uint16_t battery_cell_max_v = 3300;
|
||||||
static uint16_t battery_cell_min_v = 3300;
|
static uint16_t battery_cell_min_v = 3300;
|
||||||
static uint16_t battery_cell_deviation_mV = 0; //contains the deviation between highest and lowest cell in mV
|
static uint16_t battery_cell_deviation_mV = 0; //contains the deviation between highest and lowest cell in mV
|
||||||
|
static bool cellvoltagesRead = false;
|
||||||
//0x3d2: 978 BMS_kwhCounter
|
//0x3d2: 978 BMS_kwhCounter
|
||||||
static uint32_t battery_total_discharge = 0;
|
static uint32_t battery_total_discharge = 0;
|
||||||
static uint32_t battery_total_charge = 0;
|
static uint32_t battery_total_charge = 0;
|
||||||
|
@ -411,6 +412,7 @@ static bool battery_BMS_a180_SW_ECU_reset_blocked = false;
|
||||||
static uint16_t battery2_cell_max_v = 3300;
|
static uint16_t battery2_cell_max_v = 3300;
|
||||||
static uint16_t battery2_cell_min_v = 3300;
|
static uint16_t battery2_cell_min_v = 3300;
|
||||||
static uint16_t battery2_cell_deviation_mV = 0; //contains the deviation between highest and lowest cell in mV
|
static uint16_t battery2_cell_deviation_mV = 0; //contains the deviation between highest and lowest cell in mV
|
||||||
|
static bool battery2_cellvoltagesRead = false;
|
||||||
//0x3d2: 978 BMS_kwhCounter
|
//0x3d2: 978 BMS_kwhCounter
|
||||||
static uint32_t battery2_total_discharge = 0;
|
static uint32_t battery2_total_discharge = 0;
|
||||||
static uint32_t battery2_total_charge = 0;
|
static uint32_t battery2_total_charge = 0;
|
||||||
|
@ -1152,7 +1154,6 @@ void update_values_battery() { //This function maps all the values fetched via
|
||||||
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
|
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
|
||||||
static uint8_t mux = 0;
|
static uint8_t mux = 0;
|
||||||
static uint16_t temp = 0;
|
static uint16_t temp = 0;
|
||||||
static bool cellvoltagesRead = false;
|
|
||||||
|
|
||||||
switch (rx_frame.ID) {
|
switch (rx_frame.ID) {
|
||||||
case 0x352: // 850 BMS_energyStatus newer BMS
|
case 0x352: // 850 BMS_energyStatus newer BMS
|
||||||
|
@ -1813,7 +1814,6 @@ void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
|
||||||
void map_can_frame_to_variable_battery2(CAN_frame rx_frame) {
|
void map_can_frame_to_variable_battery2(CAN_frame rx_frame) {
|
||||||
static uint8_t mux = 0;
|
static uint8_t mux = 0;
|
||||||
static uint16_t temp = 0;
|
static uint16_t temp = 0;
|
||||||
static bool battery2_cellvoltagesRead = false;
|
|
||||||
|
|
||||||
switch (rx_frame.ID) {
|
switch (rx_frame.ID) {
|
||||||
case 0x352: // BMS_energyStatus // newer BMS >2021
|
case 0x352: // BMS_energyStatus // newer BMS >2021
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue