|
|
@ -1281,6 +1281,8 @@ void GM_StartSerialComm()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SER_STARTSAMPLE;
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SER_STARTSAMPLE;
|
|
|
|
weatherpntmsg[j].AiState = SER_STARTSAMPLE;
|
|
|
|
weatherpntmsg[j].AiState = SER_STARTSAMPLE;
|
|
|
|
|
|
|
|
sprintf(szbuf, "init weather_state%d=%d", j, weatherpntmsg[j].AiState);
|
|
|
|
|
|
|
|
DebugLog(8, szbuf, 'I');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case RALLY_PROTOCOL: /* 拉力*/
|
|
|
|
case RALLY_PROTOCOL: /* 拉力*/
|
|
|
@ -1299,6 +1301,8 @@ void GM_StartSerialComm()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SER_STARTSAMPLE;
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SER_STARTSAMPLE;
|
|
|
|
weatherpntmsg[j].AiState = SER_STARTSAMPLE;
|
|
|
|
weatherpntmsg[j].AiState = SER_STARTSAMPLE;
|
|
|
|
|
|
|
|
sprintf(szbuf, "init weather_state%d=%d", j, weatherpntmsg[j].AiState);
|
|
|
|
|
|
|
|
DebugLog(8, szbuf, 'I');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case SLANT_PROTOCOL: /* 倾角*/
|
|
|
|
case SLANT_PROTOCOL: /* 倾角*/
|
|
|
@ -1492,12 +1496,17 @@ void GM_IsCloseSensors()
|
|
|
|
else if (SER_SAMPLE == srdt.ms_dev[i].aiValue[j].AiState)
|
|
|
|
else if (SER_SAMPLE == srdt.ms_dev[i].aiValue[j].AiState)
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SAMPLINGSUCCESS;
|
|
|
|
srdt.ms_dev[i].aiValue[j].AiState = SAMPLINGSUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (j = 0; j < WEATHER_DATA_NUM; j++)
|
|
|
|
if((devparam[i].ProtocolIdx == WIND_PROTOCOL) || (WEATHER_PROTOCOL == devparam[i].ProtocolIdx))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (SER_STARTSAMPLE == weatherpntmsg[j].AiState)
|
|
|
|
for (j = 0; j < WEATHER_DATA_NUM; j++)
|
|
|
|
weatherpntmsg[j].AiState = SER_SAMPLEFAIL;
|
|
|
|
{
|
|
|
|
else if (SER_SAMPLE == weatherpntmsg[j].AiState)
|
|
|
|
if (SER_STARTSAMPLE == weatherpntmsg[j].AiState)
|
|
|
|
weatherpntmsg[j].AiState = SAMPLINGSUCCESS;
|
|
|
|
weatherpntmsg[j].AiState = SER_SAMPLEFAIL;
|
|
|
|
|
|
|
|
else if (SER_SAMPLE == weatherpntmsg[j].AiState)
|
|
|
|
|
|
|
|
weatherpntmsg[j].AiState = SAMPLINGSUCCESS;
|
|
|
|
|
|
|
|
sprintf(buf, "over weather_state%d=%d", j, weatherpntmsg[j].AiState);
|
|
|
|
|
|
|
|
DebugLog(8, buf, 'I');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -3774,7 +3783,7 @@ int GetWeatherData(Data_DEF *data, int datano)
|
|
|
|
sprintf(szbuf, "大气压");
|
|
|
|
sprintf(szbuf, "大气压");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case OpticalRadiationNo:
|
|
|
|
case OpticalRadiationNo:
|
|
|
|
sprintf(szbuf, "大气压");
|
|
|
|
sprintf(szbuf, "日照");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
sprintf(szbuf, "未知");
|
|
|
|
sprintf(szbuf, "未知");
|
|
|
|