mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 17:53:34 +08:00
RPi: just use RPI instead of RPI2.
The reason for this change is that RPi2 and RPi3 are compatible, and hopefully all differences coming up can be resolved without ifdefs but at runtime.
This commit is contained in:
@@ -1017,7 +1017,7 @@ Sensors::parameters_update()
|
||||
DevHandle h_baro;
|
||||
DevMgr::getHandle(BARO0_DEVICE_PATH, h_baro);
|
||||
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI2)
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI)
|
||||
|
||||
// TODO: this needs fixing for QURT and Raspberry Pi
|
||||
if (!h_baro.isValid()) {
|
||||
@@ -1671,7 +1671,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(__PX4_POSIX_RPI2)
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI)
|
||||
|
||||
/* On most systems, we can just use the IOCTL call to set the calibration params. */
|
||||
return !h.ioctl(GYROIOCSSCALE, (long unsigned int)gcal);
|
||||
@@ -1685,7 +1685,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(__PX4_POSIX_RPI2)
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI)
|
||||
|
||||
/* On most systems, we can just use the IOCTL call to set the calibration params. */
|
||||
return !h.ioctl(ACCELIOCSSCALE, (long unsigned int)acal);
|
||||
@@ -1699,7 +1699,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(__PX4_POSIX_RPI2)
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI)
|
||||
|
||||
/* On most systems, we can just use the IOCTL call to set the calibration params. */
|
||||
return !h.ioctl(MAGIOCSSCALE, (long unsigned int)mcal);
|
||||
@@ -2253,7 +2253,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(__PX4_POSIX_RPI2)
|
||||
#if !defined(__PX4_QURT) && !defined(__PX4_POSIX_RPI)
|
||||
// TODO: move adc_init into the sensors_init call.
|
||||
ret = ret || adc_init();
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
using namespace DriverFramework;
|
||||
|
||||
#if defined(__PX4_QURT) || defined(__PX4_POSIX_RPI2)
|
||||
#if defined(__PX4_QURT) || defined(__PX4_POSIX_RPI)
|
||||
|
||||
// Sensor initialization is performed automatically when the QuRT sensor drivers
|
||||
// are loaded.
|
||||
|
||||
Reference in New Issue
Block a user