|
|
|
@ -212,14 +212,13 @@ void AP_Compass_RM3100::timer()
@@ -212,14 +212,13 @@ void AP_Compass_RM3100::timer()
|
|
|
|
|
// some RM3100 builds get the polarity wrong on one or more of the
|
|
|
|
|
// elements. By setting AP_RM3100_REVERSAL_MASK in hwdef.dat you
|
|
|
|
|
// can fix it without modifying the hardware
|
|
|
|
|
const uint8_t mask = AP_RM3100_REVERSAL_MASK; |
|
|
|
|
if (mask & 1U) { |
|
|
|
|
if (AP_RM3100_REVERSAL_MASK & 1U) { |
|
|
|
|
magx = -magx; |
|
|
|
|
} |
|
|
|
|
if (mask & 2U) { |
|
|
|
|
if (AP_RM3100_REVERSAL_MASK & 2U) { |
|
|
|
|
magy = -magy; |
|
|
|
|
} |
|
|
|
|
if (mask & 4U) { |
|
|
|
|
if (AP_RM3100_REVERSAL_MASK & 4U) { |
|
|
|
|
magz = -magz; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|