|
@@ -20,7 +20,6 @@ static void ControlTask(void *arg)
|
|
UINT32 param;
|
|
UINT32 param;
|
|
PROC_CONTROL_STATE_SWITCH(PROCESS_CONTROL_STATE_IDLE);
|
|
PROC_CONTROL_STATE_SWITCH(PROCESS_CONTROL_STATE_IDLE);
|
|
UINT32 CurrentTime = 0;
|
|
UINT32 CurrentTime = 0;
|
|
- UINT8 AdcOrder = 1;
|
|
|
|
UINT16 RingTimes = 0;
|
|
UINT16 RingTimes = 0;
|
|
while (true)
|
|
while (true)
|
|
{
|
|
{
|
|
@@ -78,12 +77,7 @@ static void ControlTask(void *arg)
|
|
}
|
|
}
|
|
if (TimeCounter % 10 == 0)
|
|
if (TimeCounter % 10 == 0)
|
|
{
|
|
{
|
|
- GetAdcValue(AdcOrder);
|
|
|
|
- AdcOrder++;
|
|
|
|
- if (AdcOrder > 5)
|
|
|
|
- {
|
|
|
|
- AdcOrder = 1;
|
|
|
|
- }
|
|
|
|
|
|
+ GetAdcValue(1);
|
|
}
|
|
}
|
|
if (gProcess_app != WORK)
|
|
if (gProcess_app != WORK)
|
|
{
|
|
{
|
|
@@ -104,12 +98,7 @@ static void ControlTask(void *arg)
|
|
osDelay(100);
|
|
osDelay(100);
|
|
if (TimeCounter % (10 * 600) == 0)
|
|
if (TimeCounter % (10 * 600) == 0)
|
|
{
|
|
{
|
|
- GetAdcValue(AdcOrder);
|
|
|
|
- AdcOrder++;
|
|
|
|
- if (AdcOrder > 5)
|
|
|
|
- {
|
|
|
|
- AdcOrder = 1;
|
|
|
|
- }
|
|
|
|
|
|
+ GetAdcValue(1);
|
|
}
|
|
}
|
|
if (gProcess_app == WORK)
|
|
if (gProcess_app == WORK)
|
|
{
|
|
{
|
|
@@ -146,23 +135,22 @@ void GetAdcValue(UINT8 num)
|
|
case FAST_CHARGE_TEMP:
|
|
case FAST_CHARGE_TEMP:
|
|
NB_ADC_Get(&adcValue, FAST_CHARGE_TEMP);
|
|
NB_ADC_Get(&adcValue, FAST_CHARGE_TEMP);
|
|
fastChargeTemp = LookUpRTtable(adcValue);
|
|
fastChargeTemp = LookUpRTtable(adcValue);
|
|
- break;
|
|
|
|
|
|
+ osDelay(200);
|
|
case NORMAL_CHARGE_TEMP:
|
|
case NORMAL_CHARGE_TEMP:
|
|
NB_ADC_Get(&adcValue, NORMAL_CHARGE_TEMP);
|
|
NB_ADC_Get(&adcValue, NORMAL_CHARGE_TEMP);
|
|
normalChargeTemp = LookUpRTtable(adcValue);
|
|
normalChargeTemp = LookUpRTtable(adcValue);
|
|
- break;
|
|
|
|
|
|
+ osDelay(200);
|
|
case OTHER_TEMP_1:
|
|
case OTHER_TEMP_1:
|
|
NB_ADC_Get(&adcValue, OTHER_TEMP_1);
|
|
NB_ADC_Get(&adcValue, OTHER_TEMP_1);
|
|
heatTemp1 = LookUpRTtable(adcValue);
|
|
heatTemp1 = LookUpRTtable(adcValue);
|
|
- break;
|
|
|
|
|
|
+ osDelay(200);
|
|
case OTHER_TEMP_2:
|
|
case OTHER_TEMP_2:
|
|
NB_ADC_Get(&adcValue, OTHER_TEMP_2);
|
|
NB_ADC_Get(&adcValue, OTHER_TEMP_2);
|
|
heatTemp2 = LookUpRTtable(adcValue);
|
|
heatTemp2 = LookUpRTtable(adcValue);
|
|
- break;
|
|
|
|
|
|
+ osDelay(200);
|
|
case VBAT:
|
|
case VBAT:
|
|
NB_ADC_Get(&adcValue, VBAT);
|
|
NB_ADC_Get(&adcValue, VBAT);
|
|
PowerVoltage = adcValue;
|
|
PowerVoltage = adcValue;
|
|
- break;
|
|
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|