Rover: Update compass to the new interface
This commit is contained in:
parent
79e152cd93
commit
0795783d37
@ -204,19 +204,7 @@ static AP_Int8 *modes = &g.mode1;
|
||||
|
||||
static AP_Baro barometer;
|
||||
|
||||
#if CONFIG_COMPASS == HAL_COMPASS_PX4
|
||||
static AP_Compass_PX4 compass;
|
||||
#elif CONFIG_COMPASS == HAL_COMPASS_VRBRAIN
|
||||
static AP_Compass_VRBRAIN compass;
|
||||
#elif CONFIG_COMPASS == HAL_COMPASS_HMC5843
|
||||
static AP_Compass_HMC5843 compass;
|
||||
#elif CONFIG_COMPASS == HAL_COMPASS_HIL
|
||||
static AP_Compass_HIL compass;
|
||||
#elif CONFIG_COMPASS == HAL_COMPASS_AK8963
|
||||
static AP_Compass_AK8963_MPU9250 compass;
|
||||
#else
|
||||
#error Unrecognized CONFIG_COMPASS setting
|
||||
#endif
|
||||
Compass compass;
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
AP_ADC_ADS7844 apm1_adc;
|
||||
|
@ -51,9 +51,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// sensor types
|
||||
|
||||
#define CONFIG_BARO HAL_BARO_DEFAULT
|
||||
#define CONFIG_COMPASS HAL_COMPASS_DEFAULT
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// HIL_MODE OPTIONAL
|
||||
|
||||
@ -61,13 +58,6 @@
|
||||
#define HIL_MODE HIL_MODE_DISABLED
|
||||
#endif
|
||||
|
||||
#if HIL_MODE != HIL_MODE_DISABLED // we are in HIL mode
|
||||
#undef CONFIG_BARO
|
||||
#define CONFIG_BARO HAL_BARO_HIL
|
||||
#undef CONFIG_COMPASS
|
||||
#define CONFIG_COMPASS HAL_COMPASS_HIL
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
# define BATTERY_PIN_1 0
|
||||
# define CURRENT_PIN_1 1
|
||||
|
@ -506,23 +506,6 @@ static void report_compass()
|
||||
//print_blanks(2);
|
||||
cliSerial->printf_P(PSTR("Compass: "));
|
||||
|
||||
switch (compass.product_id) {
|
||||
case AP_COMPASS_TYPE_HMC5883L:
|
||||
cliSerial->println_P(PSTR("HMC5883L"));
|
||||
break;
|
||||
case AP_COMPASS_TYPE_HMC5843:
|
||||
cliSerial->println_P(PSTR("HMC5843"));
|
||||
break;
|
||||
case AP_COMPASS_TYPE_HIL:
|
||||
cliSerial->println_P(PSTR("HIL"));
|
||||
break;
|
||||
default:
|
||||
cliSerial->println_P(PSTR("??"));
|
||||
break;
|
||||
}
|
||||
|
||||
print_divider();
|
||||
|
||||
print_enabled(g.compass_enabled);
|
||||
|
||||
// mag declination
|
||||
|
Loading…
Reference in New Issue
Block a user