mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Update TESLA-BATTERY.h
added inline const char* to TESLA-BATTERY.h and include in advanced battery to utilize inline const char*
This commit is contained in:
parent
08181cc37d
commit
14f944f723
3 changed files with 19 additions and 0 deletions
|
@ -805,6 +805,7 @@ static bool battery2_BMS_a180_SW_ECU_reset_blocked = false;
|
||||||
|
|
||||||
#endif //DOUBLE_BATTERY
|
#endif //DOUBLE_BATTERY
|
||||||
|
|
||||||
|
// Function definitions
|
||||||
inline const char* getContactorText(int index) {
|
inline const char* getContactorText(int index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -36,6 +36,23 @@ void print_int_with_units(char* header, int value, char* units);
|
||||||
void print_SOC(char* header, int SOC);
|
void print_SOC(char* header, int SOC);
|
||||||
void setup_battery(void);
|
void setup_battery(void);
|
||||||
void transmit_can_frame(CAN_frame* tx_frame, int interface);
|
void transmit_can_frame(CAN_frame* tx_frame, int interface);
|
||||||
|
|
||||||
|
// Function declarations
|
||||||
|
inline const char* getContactorText(int index);
|
||||||
|
inline const char* getHvilStatusState(int index);
|
||||||
|
inline const char* getContactorState(int index);
|
||||||
|
inline const char* getNoYes(bool value);
|
||||||
|
inline const char* getHVP_contactor(int index);
|
||||||
|
inline const char* getBMSPowerLimitState(int index);
|
||||||
|
inline const char* getBMSContactorState(int index);
|
||||||
|
inline const char* getBMSState(int index);
|
||||||
|
inline const char* getBMSHvState(int index);
|
||||||
|
inline const char* getBMSUiChargeStatus(int index);
|
||||||
|
inline const char* getPCS_DcdcStatus(int index);
|
||||||
|
inline const char* getPCS_dcdcMainState(int index);
|
||||||
|
inline const char* getPCS_dcdcSubState(int index);
|
||||||
|
inline const char* getFault(bool value);
|
||||||
|
|
||||||
#ifdef DOUBLE_BATTERY
|
#ifdef DOUBLE_BATTERY
|
||||||
void printFaultCodesIfActive_battery2();
|
void printFaultCodesIfActive_battery2();
|
||||||
#endif //DOUBLE_BATTERY
|
#endif //DOUBLE_BATTERY
|
||||||
|
|
|
@ -456,6 +456,7 @@ String advanced_battery_processor(const String& var) {
|
||||||
#endif //BYD_ATTO_3_BATTERY
|
#endif //BYD_ATTO_3_BATTERY
|
||||||
|
|
||||||
#ifdef TESLA_BATTERY
|
#ifdef TESLA_BATTERY
|
||||||
|
#include "TESLA-BATTERY.h"
|
||||||
float beginning_of_life = static_cast<float>(datalayer_extended.tesla.battery_beginning_of_life);
|
float beginning_of_life = static_cast<float>(datalayer_extended.tesla.battery_beginning_of_life);
|
||||||
float battTempPct = static_cast<float>(datalayer_extended.tesla.battery_battTempPct) * 0.4;
|
float battTempPct = static_cast<float>(datalayer_extended.tesla.battery_battTempPct) * 0.4;
|
||||||
float dcdcLvBusVolt = static_cast<float>(datalayer_extended.tesla.battery_dcdcLvBusVolt) * 0.0390625;
|
float dcdcLvBusVolt = static_cast<float>(datalayer_extended.tesla.battery_dcdcLvBusVolt) * 0.0390625;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue