|
|
|
@ -3563,9 +3563,12 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"采样状态 = %d,覆冰风速未采集到数据,重新采样",airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
}else
|
|
|
|
|
}else if(airt.AiState == 2 && m_tempData.instantaneous_windspeed == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.instantaneous_windspeed = iceTail->instantaneous_windspeed;
|
|
|
|
|
}else if(iceTail->instantaneous_windspeed == 0 && m_tempData.instantaneous_windspeed != 0xff)
|
|
|
|
|
{
|
|
|
|
|
iceTail->instantaneous_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetWindDirectionData(&airt);
|
|
|
|
@ -3574,9 +3577,12 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"采样状态 = %d,覆冰风向未采集到数据,重新采样",airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
}else
|
|
|
|
|
}else if(airt.AiState == 2 && m_tempData.instantaneous_winddirection == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.instantaneous_winddirection = iceTail->instantaneous_winddirection;
|
|
|
|
|
} else if(iceTail->instantaneous_winddirection == 0 && m_tempData.instantaneous_winddirection != 0xff)
|
|
|
|
|
{
|
|
|
|
|
iceTail->instantaneous_winddirection = m_tempData.instantaneous_winddirection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetAirTempData(&airt);
|
|
|
|
@ -3585,9 +3591,12 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"采样状态 = %d,覆冰温度未采集到数据,重新采样",airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
}else
|
|
|
|
|
}else if(airt.AiState == 2 && m_tempData.air_temperature == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.air_temperature = iceTail->air_temperature;
|
|
|
|
|
}else if(iceTail->air_temperature == 0 && m_tempData.air_temperature != 0xff)
|
|
|
|
|
{
|
|
|
|
|
iceTail->air_temperature = m_tempData.air_temperature;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetHumidityData(&airt);
|
|
|
|
@ -3596,9 +3605,12 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"采样状态 = %d,覆冰湿度未采集到数据,重新采样",airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
}else
|
|
|
|
|
}else if(airt.AiState == 2 && m_tempData.humidity == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.humidity = iceTail->humidity;
|
|
|
|
|
}else if(iceTail->humidity == 0 && m_tempData.humidity != 0xff)
|
|
|
|
|
{
|
|
|
|
|
iceTail->humidity = m_tempData.humidity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -3627,40 +3639,62 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
|
weatherInfo->extreme_windspeed = airt.EuValue;
|
|
|
|
|
weatherInfo->standard_windspeed = airt.EuValue;
|
|
|
|
|
if (airt.AiState != 2 && weatherInfo->avg_windspeed_10min == 0 &&
|
|
|
|
|
m_tempData.instantaneous_windspeed == 0xff) {
|
|
|
|
|
m_tempData.instantaneous_windspeed == 0xff)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "采样状态 = %d,气象风速未采集到数据,重新采样", airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
} else {
|
|
|
|
|
} else if(airt.AiState == 2 && m_tempData.instantaneous_windspeed == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.instantaneous_windspeed = weatherInfo->avg_windspeed_10min;
|
|
|
|
|
}else if(weatherInfo->avg_windspeed_10min == 0 && m_tempData.instantaneous_windspeed != 0xff)
|
|
|
|
|
{
|
|
|
|
|
weatherInfo->avg_windspeed_10min = m_tempData.instantaneous_windspeed;
|
|
|
|
|
weatherInfo->extreme_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
|
weatherInfo->standard_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetWeatherData(&airt, 3);
|
|
|
|
|
weatherInfo->avg_winddirection_10min = airt.EuValue;
|
|
|
|
|
if (airt.AiState != 2 && weatherInfo->avg_winddirection_10min == 0 &&
|
|
|
|
|
m_tempData.instantaneous_winddirection == 0xff) {
|
|
|
|
|
m_tempData.instantaneous_winddirection == 0xff)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "采样状态 = %d,气象风向未采集到数据,重新采样", airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
} else {
|
|
|
|
|
} else if(airt.AiState == 2 && m_tempData.instantaneous_winddirection == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.instantaneous_winddirection = weatherInfo->avg_winddirection_10min;
|
|
|
|
|
}else if(weatherInfo->winddirection == 0 && m_tempData.instantaneous_winddirection != 0xff)
|
|
|
|
|
{
|
|
|
|
|
weatherInfo->winddirection = m_tempData.instantaneous_winddirection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetWeatherData(&airt, 0);
|
|
|
|
|
weatherInfo->air_temperature = airt.EuValue;
|
|
|
|
|
if (airt.AiState != 2 && weatherInfo->air_temperature == 0 &&
|
|
|
|
|
m_tempData.air_temperature == 0xff) {
|
|
|
|
|
m_tempData.air_temperature == 0xff)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "采样状态 = %d,气象温度未采集到数据,重新采样", airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
} else {
|
|
|
|
|
} else if(airt.AiState == 2 && m_tempData.air_temperature == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.air_temperature = weatherInfo->air_temperature;
|
|
|
|
|
}else if(weatherInfo->air_temperature == 0 && m_tempData.air_temperature != 0xff)
|
|
|
|
|
{
|
|
|
|
|
weatherInfo->air_temperature = m_tempData.air_temperature;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetWeatherData(&airt, 1);
|
|
|
|
|
weatherInfo->humidity = airt.EuValue;
|
|
|
|
|
if (airt.AiState != 2 && weatherInfo->humidity == 0 && m_tempData.humidity == 0xff) {
|
|
|
|
|
if (airt.AiState != 2 && weatherInfo->humidity == 0 && m_tempData.humidity == 0xff)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "采样状态 = %d,气象湿度未采集到数据,重新采样", airt.AiState);
|
|
|
|
|
status = 0;
|
|
|
|
|
} else {
|
|
|
|
|
} else if(airt.AiState == 2 && m_tempData.humidity == 0xff)
|
|
|
|
|
{
|
|
|
|
|
m_tempData.humidity = weatherInfo->humidity;
|
|
|
|
|
}else if(weatherInfo->humidity == 0 && m_tempData.humidity != 0xff)
|
|
|
|
|
{
|
|
|
|
|
weatherInfo->humidity = m_tempData.humidity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetWeatherData(&airt, 4);
|
|
|
|
|