diff options
Diffstat (limited to 'apps/drivers')
-rw-r--r-- | apps/drivers/hmc5883/hmc5883.cpp | 3 | ||||
-rw-r--r-- | apps/drivers/mpu6000/mpu6000.cpp | 10 | ||||
-rw-r--r-- | apps/drivers/ms5611/ms5611.cpp | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/apps/drivers/hmc5883/hmc5883.cpp b/apps/drivers/hmc5883/hmc5883.cpp index 99deb5da8..1f05a3343 100644 --- a/apps/drivers/hmc5883/hmc5883.cpp +++ b/apps/drivers/hmc5883/hmc5883.cpp @@ -522,9 +522,6 @@ HMC5883::ioctl(struct file *filp, int cmd, unsigned long arg) void HMC5883::start() { - /* make sure we are stopped first */ - stop(); - /* reset the report ring and state machine */ _collect_phase = false; _oldest_report = _next_report = 0; diff --git a/apps/drivers/mpu6000/mpu6000.cpp b/apps/drivers/mpu6000/mpu6000.cpp index cb526d52a..3987e13cc 100644 --- a/apps/drivers/mpu6000/mpu6000.cpp +++ b/apps/drivers/mpu6000/mpu6000.cpp @@ -831,7 +831,7 @@ MPU6000::measure() report.temp = (((int16_t)mpu_report.temp[0]) << 8) | mpu_report.temp[1]; - report.gyro_x = ((int16_t)(mpu_report.gyro_x[0]) << 8) | mpu_report.gyro_x[1]; + report.gyro_x = int16_t_from_bytes(mpu_report.gyro_x); report.gyro_y = ((int16_t)(mpu_report.gyro_y[0]) << 8) | mpu_report.gyro_y[1]; report.gyro_z = ((int16_t)(mpu_report.gyro_z[0]) << 8) | mpu_report.gyro_z[1]; @@ -839,7 +839,7 @@ MPU6000::measure() * Swap axes and negate y */ int16_t accel_xt = report.accel_y; - int16_t accel_yt = ((report.accel_x == -32768) ? 32767 : -report.accel_x); + int16_t accel_yt = report.accel_x;//((report.accel_x == -32768) ? 32767 : -report.accel_x); int16_t gyro_xt = report.gyro_y; int16_t gyro_yt = ((report.gyro_x == -32768) ? 32767 : -report.gyro_x); @@ -1030,9 +1030,9 @@ test() warnx("acc x: \t%8.4f\tm/s^2", (double)a_report.x); warnx("acc y: \t%8.4f\tm/s^2", (double)a_report.y); warnx("acc z: \t%8.4f\tm/s^2", (double)a_report.z); - warnx("acc x: \t%d\traw", (int)a_report.x_raw); - warnx("acc y: \t%d\traw", (int)a_report.y_raw); - warnx("acc z: \t%d\traw", (int)a_report.z_raw); + warnx("acc x: \t%d\traw 0x%0x", (short)a_report.x_raw, (unsigned short)a_report.x_raw); + warnx("acc y: \t%d\traw 0x%0x", (short)a_report.y_raw, (unsigned short)a_report.y_raw); + warnx("acc z: \t%d\traw 0x%0x", (short)a_report.z_raw, (unsigned short)a_report.z_raw); warnx("acc range: %8.4f m/s^2 (%8.4f g)", (double)a_report.range_m_s2, (double)(a_report.range_m_s2 / 9.81f)); diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp index 1341fc3c8..39ace2806 100644 --- a/apps/drivers/ms5611/ms5611.cpp +++ b/apps/drivers/ms5611/ms5611.cpp @@ -510,8 +510,6 @@ MS5611::ioctl(struct file *filp, int cmd, unsigned long arg) void MS5611::start() { - /* make sure we are stopped first */ - stop(); /* reset the report ring and state machine */ _collect_phase = false; |