Browse Source

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.
sbg
Julian Oes 9 years ago committed by Lorenz Meier
parent
commit
45bb1786b6
  1. 2
      src/lib/DriverFramework
  2. 16
      src/platforms/posix/drivers/accelsim/accelsim.cpp

2
src/lib/DriverFramework

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit 46e6573cd7eb455881e06a4bf38752156c247475
Subproject commit 5e055c7d11ec828f59716478c3c5d32c8c1809f0

16
src/platforms/posix/drivers/accelsim/accelsim.cpp

@ -802,9 +802,21 @@ ACCELSIM::stop() @@ -802,9 +802,21 @@ ACCELSIM::stop()
void
ACCELSIM::_measure()
{
//PX4_INFO("ACCELSIM::_measure");
/* status register and data as read back from the device */
#if 0
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)
struct {
uint8_t cmd;

Loading…
Cancel
Save