mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 20:03:34 +08:00
EKF: Fix posix build error
Memset cannot be used on a class like this. Setting the time elements to zero achieves the desired result.
This commit is contained in:
+4
-1
@@ -71,7 +71,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
_size = size;
|
_size = size;
|
||||||
memset(_buffer,0,sizeof(data_type)*_size);
|
// set the time elements to zero so that bad data is not retrieved from the buffers
|
||||||
|
for (unsigned index=0; index < _size; index++) {
|
||||||
|
_buffer[index].time_us = 0;
|
||||||
|
}
|
||||||
_first_write = true;
|
_first_write = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user