From 1bd4dca266ec1ecb10f59dd5a6784d32c036defa Mon Sep 17 00:00:00 2001 From: Kabir Mohammed Date: Fri, 29 Apr 2016 14:32:38 +0530 Subject: [PATCH] Fix RPI2 defines --- src/modules/sensors/sensors.cpp | 10 +++++----- src/modules/sensors/sensors_init.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index a555884db9..35db3614af 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -953,7 +953,7 @@ Sensors::parameters_update() DevHandle h_baro; DevMgr::getHandle(BARO0_DEVICE_PATH, h_baro); -#if !defined(__PX4_QURT) && !defined(__RPI2) +#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2) // TODO: this needs fixing for QURT and Raspberry Pi if (!h_baro.isValid()) { @@ -1521,7 +1521,7 @@ Sensors::parameter_update_poll(bool forced) bool Sensors::apply_gyro_calibration(DevHandle &h, const struct gyro_calibration_s *gcal, const int device_id) { -#if !defined(__PX4_QURT) && !defined(__RPI2) +#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2) /* On most systems, we can just use the IOCTL call to set the calibration params. */ const int res = h.ioctl(GYROIOCSSCALE, (long unsigned int)gcal); @@ -1542,7 +1542,7 @@ Sensors::apply_gyro_calibration(DevHandle &h, const struct gyro_calibration_s *g bool Sensors::apply_accel_calibration(DevHandle &h, const struct accel_calibration_s *acal, const int device_id) { -#if !defined(__PX4_QURT) && !defined(__RPI2) +#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2) /* On most systems, we can just use the IOCTL call to set the calibration params. */ const int res = h.ioctl(ACCELIOCSSCALE, (long unsigned int)acal); @@ -1563,7 +1563,7 @@ Sensors::apply_accel_calibration(DevHandle &h, const struct accel_calibration_s bool Sensors::apply_mag_calibration(DevHandle &h, const struct mag_calibration_s *mcal, const int device_id) { -#if !defined(__PX4_QURT) && !defined(__RPI2) +#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2) /* On most systems, we can just use the IOCTL call to set the calibration params. */ const int res = h.ioctl(MAGIOCSSCALE, (long unsigned int)mcal); @@ -2065,7 +2065,7 @@ Sensors::task_main() /* This calls a sensors_init which can have different implementations on NuttX, POSIX, QURT. */ ret = sensors_init(); -#if !defined(__PX4_QURT) && !defined(__RPI2) +#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2) // TODO: move adc_init into the sensors_init call. ret = ret || adc_init(); #endif diff --git a/src/modules/sensors/sensors_init.cpp b/src/modules/sensors/sensors_init.cpp index e13142c754..447d569d50 100644 --- a/src/modules/sensors/sensors_init.cpp +++ b/src/modules/sensors/sensors_init.cpp @@ -52,7 +52,7 @@ using namespace DriverFramework; -#if defined(__PX4_QURT) || defined(__RPI2) +#if defined(__PX4_QURT) || defined(__PX4_POSIX_RPI2) // Sensor initialization is performed automatically when the QuRT sensor drivers // are loaded.