|
|
@ -3482,17 +3482,17 @@ void CPhoneDevice::SetStaticIp(const std::string& iface, const std::string& ip,
|
|
|
|
|
|
|
|
|
|
|
|
int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceTail, SENSOR_PARAM *sensorParam)
|
|
|
|
int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceTail, SENSOR_PARAM *sensorParam)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_tempData.instantaneous_windspeed = 0;
|
|
|
|
m_tempData.instantaneous_windspeed = 0xff;
|
|
|
|
m_tempData.air_temperature = 0;
|
|
|
|
m_tempData.air_temperature = 0xff;
|
|
|
|
m_tempData.instantaneous_winddirection = 0;
|
|
|
|
m_tempData.instantaneous_winddirection = 0xff;
|
|
|
|
m_tempData.humidity = 0;
|
|
|
|
m_tempData.humidity = 0xff;
|
|
|
|
|
|
|
|
|
|
|
|
Collect_sensor_data(); //15s
|
|
|
|
Collect_sensor_data(); //15s
|
|
|
|
Data_DEF airt;
|
|
|
|
Data_DEF airt;
|
|
|
|
//++等值覆冰厚度, 综合悬挂载荷, 不均衡张力差 置0
|
|
|
|
//++等值覆冰厚度, 综合悬挂载荷, 不均衡张力差 置0
|
|
|
|
iceInfo->equal_icethickness = 0;
|
|
|
|
iceInfo->equal_icethickness = 0xff;
|
|
|
|
iceInfo->tension = 0;
|
|
|
|
iceInfo->tension = 0xff;
|
|
|
|
iceInfo->tension_difference = 0;
|
|
|
|
iceInfo->tension_difference = 0xff;
|
|
|
|
|
|
|
|
|
|
|
|
int pullno = 0;
|
|
|
|
int pullno = 0;
|
|
|
|
int angleno = 0;
|
|
|
|
int angleno = 0;
|
|
|
@ -3503,15 +3503,21 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
GetPullValue(num, &airt);
|
|
|
|
GetPullValue(num, &airt);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
iceInfo->t_sensor_data[pullno].original_tension = airt.EuValue;
|
|
|
|
iceInfo->t_sensor_data[pullno].original_tension = airt.EuValue;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
iceInfo->t_sensor_data[pullno].original_tension = 0xff;
|
|
|
|
pullno++;
|
|
|
|
pullno++;
|
|
|
|
} else if(sensorParam[num].SensorsType == SLANT_PROTOCOL)
|
|
|
|
} else if(sensorParam[num].SensorsType == SLANT_PROTOCOL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GetAngleValue(num, &airt, 0);
|
|
|
|
GetAngleValue(num, &airt, 0);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = airt.EuValue;
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = airt.EuValue;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = 0xff;
|
|
|
|
GetAngleValue(num, &airt, 1);
|
|
|
|
GetAngleValue(num, &airt, 1);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle = airt.EuValue;
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle = airt.EuValue;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle =0xff;
|
|
|
|
angleno++;
|
|
|
|
angleno++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3526,7 +3532,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iceTail->instantaneous_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
iceTail->instantaneous_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
m_tempData.instantaneous_windspeed = 0;
|
|
|
|
m_tempData.instantaneous_windspeed = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetWindDirectionData(&airt);
|
|
|
|
GetWindDirectionData(&airt);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
@ -3536,7 +3542,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iceTail->instantaneous_winddirection = m_tempData.instantaneous_winddirection;
|
|
|
|
iceTail->instantaneous_winddirection = m_tempData.instantaneous_winddirection;
|
|
|
|
m_tempData.instantaneous_winddirection = 0;
|
|
|
|
m_tempData.instantaneous_winddirection = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetAirTempData(&airt);
|
|
|
|
GetAirTempData(&airt);
|
|
|
|
if(airt.AiState == 2) {
|
|
|
|
if(airt.AiState == 2) {
|
|
|
@ -3545,7 +3551,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iceTail->air_temperature = m_tempData.air_temperature;
|
|
|
|
iceTail->air_temperature = m_tempData.air_temperature;
|
|
|
|
m_tempData.air_temperature = 0;
|
|
|
|
m_tempData.air_temperature = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetHumidityData(&airt);
|
|
|
|
GetHumidityData(&airt);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
@ -3555,7 +3561,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iceTail->humidity = m_tempData.humidity;
|
|
|
|
iceTail->humidity = m_tempData.humidity;
|
|
|
|
m_tempData.humidity = 0;
|
|
|
|
m_tempData.humidity = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3565,10 +3571,10 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
|
|
|
|
|
|
|
int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_tempData.instantaneous_windspeed = 0;
|
|
|
|
m_tempData.instantaneous_windspeed = 0xff;
|
|
|
|
m_tempData.air_temperature = 0;
|
|
|
|
m_tempData.air_temperature = 0xff;
|
|
|
|
m_tempData.instantaneous_winddirection = 0;
|
|
|
|
m_tempData.instantaneous_winddirection = 0xff;
|
|
|
|
m_tempData.humidity = 0;
|
|
|
|
m_tempData.humidity = 0xff;
|
|
|
|
|
|
|
|
|
|
|
|
Collect_sensor_data(); //15s
|
|
|
|
Collect_sensor_data(); //15s
|
|
|
|
|
|
|
|
|
|
|
@ -3587,7 +3593,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
weatherInfo->avg_windspeed_10min = m_tempData.instantaneous_windspeed;
|
|
|
|
weatherInfo->avg_windspeed_10min = m_tempData.instantaneous_windspeed;
|
|
|
|
weatherInfo->extreme_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
weatherInfo->extreme_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
weatherInfo->standard_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
weatherInfo->standard_windspeed = m_tempData.instantaneous_windspeed;
|
|
|
|
m_tempData.instantaneous_windspeed = 0;
|
|
|
|
m_tempData.instantaneous_windspeed = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetWeatherData(&airt, 3);
|
|
|
|
GetWeatherData(&airt, 3);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
@ -3597,7 +3603,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
weatherInfo->avg_winddirection_10min = m_tempData.instantaneous_winddirection;
|
|
|
|
weatherInfo->avg_winddirection_10min = m_tempData.instantaneous_winddirection;
|
|
|
|
m_tempData.instantaneous_winddirection = 0;
|
|
|
|
m_tempData.instantaneous_winddirection = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetWeatherData(&airt, 0);
|
|
|
|
GetWeatherData(&airt, 0);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
@ -3607,7 +3613,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
weatherInfo->air_temperature = m_tempData.air_temperature;
|
|
|
|
weatherInfo->air_temperature = m_tempData.air_temperature;
|
|
|
|
m_tempData.air_temperature = 0;
|
|
|
|
m_tempData.air_temperature = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetWeatherData(&airt, 1);
|
|
|
|
GetWeatherData(&airt, 1);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
@ -3617,7 +3623,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo)
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
weatherInfo->humidity = m_tempData.humidity;
|
|
|
|
weatherInfo->humidity = m_tempData.humidity;
|
|
|
|
m_tempData.humidity = 0;
|
|
|
|
m_tempData.humidity = 0xff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
GetWeatherData(&airt, 4);
|
|
|
|
GetWeatherData(&airt, 4);
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
if(airt.AiState == 2)
|
|
|
|