mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-25 01:03:59 -04:00
AP_Compass: fix compilation issue with declaring var after goto
This commit is contained in:
parent
2205b95c99
commit
957da68da5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user