气象采集函数修改

rtmpsuck
XI.CHEN 6 months ago
parent a6134b860d
commit e07de45f59

@ -4076,7 +4076,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
break;
} else if (sensorParam[num].SensorsType == WIND_PROTOCOL && sensorParam[num].IsNoInsta == 1)
{
GetWeatherData(&airt, 2);
GetWindSpeedData(&airt);
if (airt.AiState == 255 || airt.AiState == -1)
{
weatherInfo->avg_windspeed_10min = 0xff;
@ -4119,7 +4119,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
}
}
GetWeatherData(&airt, 3);
GetWindDirectionData(&airt);
if (airt.AiState == 255 || airt.AiState == -1)
{
weatherInfo->avg_winddirection_10min = 0xff;
@ -4144,7 +4144,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
}
}
GetWeatherData(&airt, 4);
GetRainfallData(&airt);
weatherInfo->precipitation = airt.EuValue;
if(airt.AiState == 255 || airt.AiState == -1)
{
@ -4163,7 +4163,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
weatherInfo->precipitation = weatherInfo->precipitation + sensorParam[num].offset;
}
GetWeatherData(&airt, 5);
GetAtmosData(&airt);
weatherInfo->air_pressure = airt.EuValue;
if(airt.AiState == 255 || airt.AiState == -1)
{
@ -4181,7 +4181,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
weatherInfo->air_pressure = weatherInfo->air_pressure + sensorParam[num].offset;
}
GetWeatherData(&airt, 6);
GetOpticalRadiationData(&airt);
weatherInfo->radiation_intensity = airt.EuValue;
if(airt.AiState == 255 || airt.AiState == -1)
{
@ -4202,6 +4202,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
}
}
for (int num = 0; num < MAX_SERIAL_DEV_NUM; num++) {
if (sensorParam[num].SensorsType == WEATHER_PROTOCOL && sensorParam[num].IsNoInsta == 0)
{
@ -4213,7 +4214,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
} else if (sensorParam[num].SensorsType == WEATHER_PROTOCOL &&
sensorParam[num].IsNoInsta == 1)
{
GetWeatherData(&airt, 0);
GetAirTempData(&airt);
if (airt.AiState == 255 || airt.AiState == -1)
{
weatherInfo->air_temperature = 0xff;
@ -4243,7 +4244,7 @@ int CPhoneDevice::GetWData(IDevice::WEATHER_INFO *weatherInfo, D_SENSOR_PARAM *s
}
}
GetWeatherData(&airt, 1);
GetHumidityData(&airt);
if (airt.AiState == 255 || airt.AiState == -1)
{
weatherInfo->humidity = 0xff;

Loading…
Cancel
Save