Add dummy SoC, replace ID

This commit is contained in:
Dmitriy Semenov
2023-04-06 21:23:19 +03:00
parent 9c2667bbe5
commit 8ea5166aa1
6 changed files with 37 additions and 10 deletions

View File

@@ -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");