Merge pull request #5 from KiteAnton/gyro_status_fix

Fix gyro reported as disabled when ACC is disabled
10.3.x-maintenance
Albert Kravcov 2016-06-13 23:02:32 +02:00 committed by GitHub
commit 64d0091471
1 changed files with 2 additions and 1 deletions

View File

@ -370,7 +370,6 @@ function sensor_status(sensors_detected) {
function have_sensor(sensors_detected, sensor_code) {
switch(sensor_code) {
case 'acc':
case 'gyro':
return bit_check(sensors_detected, 0);
case 'baro':
return bit_check(sensors_detected, 1);
@ -380,6 +379,8 @@ function have_sensor(sensors_detected, sensor_code) {
return bit_check(sensors_detected, 3);
case 'sonar':
return bit_check(sensors_detected, 4);
case 'gyro':
return true; // Gyro status is never reported by FC
}
return false;
}