Sensors: Perform init on best effort basis

This commit is contained in:
Lorenz Meier 2016-08-11 12:41:16 +02:00 committed by Lorenz Meier
parent c3022bf713
commit 63275ef92f
1 changed files with 6 additions and 5 deletions

View File

@ -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;
}