mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
SONAR: Don't enable SENSOR_SONAR if no sonar is detected (#303)
This commit is contained in:
parent
23b08bd6c5
commit
1cafd0d9e7
1 changed files with 5 additions and 1 deletions
|
@ -752,7 +752,11 @@ static rangefinderType_e detectRangefinder(void)
|
|||
}
|
||||
#endif
|
||||
detectedSensors[SENSOR_INDEX_RANGEFINDER] = rangefinderType;
|
||||
sensorsSet(SENSOR_SONAR);
|
||||
|
||||
if (rangefinderType != RANGEFINDER_NONE) {
|
||||
sensorsSet(SENSOR_SONAR);
|
||||
}
|
||||
|
||||
return rangefinderType;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue