AP_Compass: AP_Compass_VRBRAIN.cpp added _is_external overwrite to deal with external compass attached to internal I2C BUS

This commit is contained in:
Emile Castelnuovo 2015-01-02 12:23:39 +01:00 committed by Andrew Tridgell
parent 61f4239e47
commit 5e8c1b61b5

View File

@ -68,7 +68,7 @@ bool AP_Compass_VRBRAIN::init(void)
// remember if the compass is external
_external[i] = (ioctl(_mag_fd[i], MAGIOCGEXTERNAL, 0) > 0);
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
//deal with situations where user has cut internal mag on VRBRAIN 4.5
//and uses only one external mag attached to the internal I2C bus
bool external_tmp = _external[i];