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