From c2c5807ec7255926f8dfca0bd7a81d7142b8bc95 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 23 Sep 2014 20:35:18 +0900 Subject: [PATCH] Compass: always default devid to zero --- libraries/AP_Compass/Compass.cpp | 6 +++--- libraries/AP_Compass/Compass.h | 19 ------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/libraries/AP_Compass/Compass.cpp b/libraries/AP_Compass/Compass.cpp index 02920acc1a..0df6cc0f3c 100644 --- a/libraries/AP_Compass/Compass.cpp +++ b/libraries/AP_Compass/Compass.cpp @@ -120,13 +120,13 @@ const AP_Param::GroupInfo Compass::var_info[] PROGMEM = { // @DisplayName: Compass device id // @Description: Compass device id. Automatically detected, do not set manually // @User: Advanced - AP_GROUPINFO("DEV_ID", 15, Compass, _dev_id[0], COMPASS_EXPECTED_DEV_ID), + AP_GROUPINFO("DEV_ID", 15, Compass, _dev_id[0], 0), // @Param: DEV_ID2 // @DisplayName: Compass2 device id // @Description: Second compass's device id. Automatically detected, do not set manually // @User: Advanced - AP_GROUPINFO("DEV_ID2", 16, Compass, _dev_id[1], COMPASS_EXPECTED_DEV_ID2), + AP_GROUPINFO("DEV_ID2", 16, Compass, _dev_id[1], 0), #endif #if COMPASS_MAX_INSTANCES > 2 @@ -134,7 +134,7 @@ const AP_Param::GroupInfo Compass::var_info[] PROGMEM = { // @DisplayName: Compass3 device id // @Description: Third compass's device id. Automatically detected, do not set manually // @User: Advanced - AP_GROUPINFO("DEV_ID3", 17, Compass, _dev_id[2], COMPASS_EXPECTED_DEV_ID3), + AP_GROUPINFO("DEV_ID3", 17, Compass, _dev_id[2], 0), #endif AP_GROUPEND diff --git a/libraries/AP_Compass/Compass.h b/libraries/AP_Compass/Compass.h index 586bb8b9dd..f05dfffce9 100644 --- a/libraries/AP_Compass/Compass.h +++ b/libraries/AP_Compass/Compass.h @@ -52,25 +52,6 @@ #define COMPASS_MAX_INSTANCES 1 #endif -// default compass device ids for each board type to most common set-up to reduce eeprom usage -#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 -# define COMPASS_EXPECTED_DEV_ID 73225 // external hmc5883 -# define COMPASS_EXPECTED_DEV_ID2 -1 // internal ldm303d -# define COMPASS_EXPECTED_DEV_ID3 0 -#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX -# define COMPASS_EXPECTED_DEV_ID 0 -# define COMPASS_EXPECTED_DEV_ID2 0 -# define COMPASS_EXPECTED_DEV_ID3 0 -#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN -# define COMPASS_EXPECTED_DEV_ID 0 -# define COMPASS_EXPECTED_DEV_ID2 0 -# define COMPASS_EXPECTED_DEV_ID3 0 -#else -# define COMPASS_EXPECTED_DEV_ID 0 -# define COMPASS_EXPECTED_DEV_ID2 0 -# define COMPASS_EXPECTED_DEV_ID3 0 -#endif - class Compass { public: