From b2a8dd18c00a6a66e7804673a556ff504119fccc Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 20 Sep 2015 16:43:44 +0200 Subject: [PATCH] Gyrosim: More verbose output --- src/platforms/posix/drivers/gyrosim/gyrosim.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp index 50cc5091d8..cbe1dbef41 100644 --- a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp +++ b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include @@ -513,6 +512,7 @@ GYROSIM::transfer(uint8_t *send, uint8_t *recv, unsigned len) // Get data from the simulator Simulator *sim = Simulator::getInstance(); if (sim == NULL) { + PX4_WARN("failed accessing simulator"); return ENODEV; } @@ -531,6 +531,7 @@ GYROSIM::transfer(uint8_t *send, uint8_t *recv, unsigned len) if (recv) memcpy(&recv[1], &_regdata[reg-MPUREG_PRODUCT_ID], len-1); } + return PX4_OK; } @@ -767,8 +768,9 @@ GYROSIM::ioctl(device::file_t *filp, int cmd, unsigned long arg) bool want_start = (_call_interval == 0); /* if we need to start the poll state machine, do it */ - if (want_start) + if (want_start) { start(); + } return OK; }