diff --git a/flight/Modules/Sensors/sensors.c b/flight/Modules/Sensors/sensors.c index 929cab662..2e097d0c6 100644 --- a/flight/Modules/Sensors/sensors.c +++ b/flight/Modules/Sensors/sensors.c @@ -317,6 +317,12 @@ static void SensorsTask(void *parameters) gyro_samples ++; accel_samples ++; } + + if (gyro_samples == 0) { + PIOS_MPU6000_ReadGyros(&mpu6000_data); + error = true; + continue; + } gyro_scaling = PIOS_MPU6000_GetScale(); accel_scaling = PIOS_MPU6000_GetAccelScale();