mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 02:50:34 +08:00
Fix SITL CPU (#4657)
* accelsim: add debug output like in gyrosim * DriverFramework: update submodule This brings lower CPU usage because of scheduling in us instead of ms.
This commit is contained in:
+1
-1
Submodule src/lib/DriverFramework updated: 46e6573cd7...5e055c7d11
@@ -802,9 +802,21 @@ ACCELSIM::stop()
|
|||||||
void
|
void
|
||||||
ACCELSIM::_measure()
|
ACCELSIM::_measure()
|
||||||
{
|
{
|
||||||
//PX4_INFO("ACCELSIM::_measure");
|
#if 0
|
||||||
/* status register and data as read back from the device */
|
static int x = 0;
|
||||||
|
|
||||||
|
// Verify the samples are being taken at the expected rate
|
||||||
|
if (x == 99) {
|
||||||
|
x = 0;
|
||||||
|
PX4_INFO("ACCELSIM::measure %" PRIu64, hrt_absolute_time());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* status register and data as read back from the device */
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct {
|
struct {
|
||||||
uint8_t cmd;
|
uint8_t cmd;
|
||||||
|
|||||||
Reference in New Issue
Block a user