AP_Compass: fixed showing of is_external for 2nd compass

This commit is contained in:
Andrew Tridgell 2014-03-13 16:26:43 +11:00
parent d595f36ca5
commit db48ed9218

View File

@ -64,7 +64,7 @@ bool AP_Compass_PX4::init(void)
// remember if the compass is external // remember if the compass is external
_is_external[i] = (ioctl(_mag_fd[i], MAGIOCGEXTERNAL, 0) > 0); _is_external[i] = (ioctl(_mag_fd[i], MAGIOCGEXTERNAL, 0) > 0);
if (_is_external[0]) { if (_is_external[i]) {
hal.console->printf("Using external compass[%u]\n", (unsigned)i); hal.console->printf("Using external compass[%u]\n", (unsigned)i);
} }
_count[0] = 0; _count[0] = 0;