Add dummy SoC, replace ID
This commit is contained in:
@@ -268,7 +268,7 @@ void modConfigLoadDefaultConfig(modConfigGeneralConfigStructTypedef *configLocat
|
||||
configLocation->externalChargeUnitTable[i][j] = unitTable[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
__NOP();
|
||||
#elif ENNOID_HV
|
||||
configLocation->noOfCellsSeries = 8; // Total number of cells in series in the battery pack
|
||||
configLocation->noOfCellsParallel = 10; // Number of cells in parallel
|
||||
|
||||
@@ -120,7 +120,8 @@ void modStateOfChargeProcess(void){
|
||||
|
||||
// Calculate state of charge
|
||||
// calc percent of we put/take to battery capacity
|
||||
modStateOfChargeGeneralStateOfCharge.generalStateOfCharge = modStateOfChargeGeneralStateOfCharge.remainingCapacityAh / modStateOfChargeGeneralConfigHandle->batteryCapacity * 100.0f;
|
||||
modStateOfChargeGeneralStateOfCharge.generalStateOfCharge =
|
||||
modStateOfChargeGeneralStateOfCharge.remainingCapacityAh / modStateOfChargeGeneralConfigHandle->batteryCapacity * 100.0f;
|
||||
|
||||
if(SoC_Save_Flag == 0) {
|
||||
previous_SoC = modStateOfChargeGeneralStateOfCharge.generalStateOfCharge;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "modStateOfCharge.h"
|
||||
|
||||
|
||||
#include "can_messenger.h"
|
||||
|
||||
|
||||
// Private types
|
||||
@@ -134,6 +134,10 @@ static uint8_t SoC_Save_Flag = 0;
|
||||
modCommandsPrintf(" ");
|
||||
modCommandsPrintf("Charge Switch State: %s",charge_switch_state ? "ON" : "OFF");
|
||||
modCommandsPrintf("Load Switch State: %s",load_switch_state ? "ON" : "OFF");
|
||||
modCommandsPrintf("Charge Permission: %s",packState.chargeAllowed ? "YES" : "NO");
|
||||
|
||||
// modCommandsPrintf("dummy: %s",get_dummy_soc() ? "YES" : "NO");
|
||||
|
||||
//generalConfig->shuntLCFactor
|
||||
//export_adc_average_res
|
||||
|
||||
@@ -192,7 +196,11 @@ uint8_t maxChargeCurrent = 0;
|
||||
uint8_t maxLoadCurrent = 0;
|
||||
|
||||
*/
|
||||
} else if (strcmp(argv[0], "setZeroCurrent") == 0) {
|
||||
} else if (strcmp(argv[0], "socJOPA") == 0) { // Dummy SoC = 100%
|
||||
|
||||
can_set_dummy_soc();
|
||||
// modCommandsPrintf("durak");
|
||||
} else if (strcmp(argv[0], "setZeroCurrent") == 0) {
|
||||
modCommandsPrintf(" ");
|
||||
modCommandsPrintf("----- setZeroCurrent -----");
|
||||
|
||||
@@ -365,7 +373,7 @@ uint8_t maxLoadCurrent = 0;
|
||||
|
||||
} else if (strcmp(argv[0], "help") == 0) {
|
||||
modCommandsPrintf("------- Start of help -------");
|
||||
modCommandsPrintf("Valid commands for ENNOID-BMS are:");
|
||||
modCommandsPrintf("Valid commands for CUBO-BMS are:");
|
||||
modCommandsPrintf("help");
|
||||
modCommandsPrintf(" Show this help.");
|
||||
modCommandsPrintf("setZeroCurrent");
|
||||
|
||||
Reference in New Issue
Block a user