mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 13:58:53 +08:00
Sensors: Perform init on best effort basis
This commit is contained in:
committed by
Lorenz Meier
parent
c3022bf713
commit
63275ef92f
@@ -91,24 +91,25 @@ int
|
||||
sensors_init(void)
|
||||
{
|
||||
int ret;
|
||||
int ret_combined = 0;
|
||||
|
||||
ret = accel_init();
|
||||
|
||||
if (ret) { return ret; }
|
||||
if (ret) { ret_combined = ret; }
|
||||
|
||||
ret = gyro_init();
|
||||
|
||||
if (ret) { return ret; }
|
||||
if (ret) { ret_combined = ret; }
|
||||
|
||||
ret = mag_init();
|
||||
|
||||
if (ret) { return ret; }
|
||||
if (ret) { ret_combined = ret; }
|
||||
|
||||
ret = baro_init();
|
||||
|
||||
if (ret) { return ret; }
|
||||
if (ret) { ret_combined = ret; }
|
||||
|
||||
return 0;
|
||||
return ret_combined;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user