mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 12:38:33 -04:00
Sub: compass init never fails
This commit is contained in:
parent
b933f050b8
commit
069a2d0e35
@ -83,7 +83,8 @@ void Sub::rpm_update(void)
|
|||||||
// initialise compass
|
// initialise compass
|
||||||
void Sub::init_compass()
|
void Sub::init_compass()
|
||||||
{
|
{
|
||||||
if (!compass.init() || !compass.read()) {
|
compass.init();
|
||||||
|
if (!compass.read()) {
|
||||||
// make sure we don't pass a broken compass to DCM
|
// make sure we don't pass a broken compass to DCM
|
||||||
hal.console->println("COMPASS INIT ERROR");
|
hal.console->println("COMPASS INIT ERROR");
|
||||||
Log_Write_Error(ERROR_SUBSYSTEM_COMPASS,ERROR_CODE_FAILED_TO_INITIALISE);
|
Log_Write_Error(ERROR_SUBSYSTEM_COMPASS,ERROR_CODE_FAILED_TO_INITIALISE);
|
||||||
|
Loading…
Reference in New Issue
Block a user