增加HP203B转换到获取的间隔时间,避免有时获取到错误的数值但实际上传感器没有错误
This commit is contained in:
parent
17f8b720c5
commit
8dd40691af
|
@ -103,6 +103,7 @@ BOOL get_HP203_data(float* tempdata, float* press)
|
|||
|
||||
for(int i=0; i<COLLECT_HB203_DATA_NUM; i++){
|
||||
hp203_set_mode();
|
||||
osDelay(5);
|
||||
ret = Hp203bReadPressure(&collect_pressure[i].fValue);
|
||||
if(ret == FALSE)
|
||||
{
|
||||
|
@ -110,7 +111,7 @@ BOOL get_HP203_data(float* tempdata, float* press)
|
|||
continue;
|
||||
//goto error_return;
|
||||
}
|
||||
osDelay(1);
|
||||
osDelay(5);
|
||||
}
|
||||
if(press_falt >= COLLECT_HB203_DATA_NUM)
|
||||
{
|
||||
|
@ -133,6 +134,7 @@ BOOL get_HP203_data(float* tempdata, float* press)
|
|||
|
||||
for(int i=0; i<COLLECT_HB203_DATA_NUM; i++){
|
||||
hp203_set_mode();
|
||||
osDelay(5);
|
||||
ret = Hp203bReadTempture(&collect_tempture[i].fValue);
|
||||
if(ret == FALSE)
|
||||
{
|
||||
|
@ -140,7 +142,7 @@ BOOL get_HP203_data(float* tempdata, float* press)
|
|||
continue;
|
||||
//goto error_return;
|
||||
}
|
||||
osDelay(1);
|
||||
osDelay(5);
|
||||
}
|
||||
if(temp_falt >= COLLECT_HB203_DATA_NUM)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue