|
@@ -450,7 +450,7 @@ static BOOL uartBattInfoDecode(UINT8* dataPtr)
|
|
//SOC问题紧急修复
|
|
//SOC问题紧急修复
|
|
UINT8 SOC1 = 0;
|
|
UINT8 SOC1 = 0;
|
|
static UINT8 SOC_counter=0;
|
|
static UINT8 SOC_counter=0;
|
|
- SOC1 = battPackVol*0.45-270;
|
|
|
|
|
|
+ SOC1 = (battPackVol*45-27000)/100;
|
|
if((battSOC - SOC1>10)&&(battPackVol>500)&&(battPackVol<900))
|
|
if((battSOC - SOC1>10)&&(battPackVol>500)&&(battPackVol<900))
|
|
{
|
|
{
|
|
SOC_counter++;
|
|
SOC_counter++;
|
|
@@ -461,6 +461,10 @@ static BOOL uartBattInfoDecode(UINT8* dataPtr)
|
|
}
|
|
}
|
|
if(SOC_counter>=10)
|
|
if(SOC_counter>=10)
|
|
{
|
|
{
|
|
|
|
+ if(SOC_counter>=200)
|
|
|
|
+ {
|
|
|
|
+ SOC_counter==10;
|
|
|
|
+ }
|
|
battSOC = SOC1;
|
|
battSOC = SOC1;
|
|
if(osOK==osMutexAcquire(Error_Mutex, 100))
|
|
if(osOK==osMutexAcquire(Error_Mutex, 100))
|
|
{
|
|
{
|