|
@@ -245,20 +245,40 @@ void appRun(void){
|
|
#endif
|
|
#endif
|
|
splVolumeSet(newPara.spkVol*10);
|
|
splVolumeSet(newPara.spkVol*10);
|
|
backLightReset();
|
|
backLightReset();
|
|
- if(newPara.ttsMessage[0]!=0){
|
|
|
|
- if(newPara.ttsCodeType==0) ttsPlay(ENCODE_USER_UNICODE_BE, newPara.ttsMessage);
|
|
|
|
- else if(newPara.ttsCodeType==1) ttsPlay(ENCODE_USER_GBK, newPara.ttsMessage);
|
|
|
|
- else MSG_INFO(1, "ttsCodeType:%d not support", newPara.ttsCodeType);
|
|
|
|
- }else MSG_INFO(1, "tts null");
|
|
|
|
|
|
+ msgAtSend("AT+RSIM\r\n");
|
|
//检测卡是否存在
|
|
//检测卡是否存在
|
|
while(sutApp.cardStatus==0){
|
|
while(sutApp.cardStatus==0){
|
|
msgAtSend("AT+CPIN?\r\n");
|
|
msgAtSend("AT+CPIN?\r\n");
|
|
nwy_sleep(1000);
|
|
nwy_sleep(1000);
|
|
if(++cnt>=5){
|
|
if(++cnt>=5){
|
|
MSG_INFO(1, "Check card timeout");
|
|
MSG_INFO(1, "Check card timeout");
|
|
|
|
+ if(newPara.autoSetCard==0){
|
|
|
|
+ newPara.autoSetCard=1;
|
|
|
|
+ sysIniSave();
|
|
|
|
+ guiShowMessageBox("正在切卡");
|
|
|
|
+ if(sutApp.simSel==0) sutApp.simSel=1;
|
|
|
|
+ else sutApp.simSel=0;
|
|
|
|
+ {
|
|
|
|
+ char buf[30];
|
|
|
|
+ snprintf(buf, sizeof(buf),"AT+SSIM=%d\r\n", sutApp.simSel+1);
|
|
|
|
+ msgAtSend(buf);
|
|
|
|
+ }
|
|
|
|
+ nwy_sleep(2000);
|
|
|
|
+ msgAtSend("AT+TRB=2\r\n");
|
|
|
|
+ nwy_sleep(1000);
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(newPara.autoSetCard!=0){
|
|
|
|
+ newPara.autoSetCard=0;
|
|
|
|
+ sysIniSave();
|
|
|
|
+ }
|
|
|
|
+ if(newPara.ttsMessage[0]!=0){
|
|
|
|
+ if(newPara.ttsCodeType==0) ttsPlay(ENCODE_USER_UNICODE_BE, newPara.ttsMessage);
|
|
|
|
+ else if(newPara.ttsCodeType==1) ttsPlay(ENCODE_USER_GBK, newPara.ttsMessage);
|
|
|
|
+ else MSG_INFO(1, "ttsCodeType:%d not support", newPara.ttsCodeType);
|
|
|
|
+ }else MSG_INFO(1, "tts null");
|
|
for(;;){
|
|
for(;;){
|
|
if(sutApp.antMode){
|
|
if(sutApp.antMode){
|
|
msgAtSend("AT+POC=050000\r\n");
|
|
msgAtSend("AT+POC=050000\r\n");
|
|
@@ -863,7 +883,7 @@ static void adcRead(void){
|
|
#endif
|
|
#endif
|
|
//检测电池电压
|
|
//检测电池电压
|
|
//adcValueTmp=nwy_adc_get(NWY_ADC_CHANNEL4, NWY_ADC_SCALE_5V000);
|
|
//adcValueTmp=nwy_adc_get(NWY_ADC_CHANNEL4, NWY_ADC_SCALE_5V000);
|
|
- adcValueTmp=nwy_adc_get(NWY_ADC_CHANNEL3, NWY_ADC_SCALE_1V250);
|
|
|
|
|
|
+ adcValueTmp=nwy_adc_get(NWY_ADC_CHANNEL3, NWY_ADC_SCALE_2V444);
|
|
siVbat += adcValueTmp;
|
|
siVbat += adcValueTmp;
|
|
if(++index>=VBAT_READ_TIME){
|
|
if(++index>=VBAT_READ_TIME){
|
|
siVbat=siVbat / VBAT_READ_TIME / 10;
|
|
siVbat=siVbat / VBAT_READ_TIME / 10;
|