Fix rangefinder.c compiler warning

This commit is contained in:
Steve Evans 2022-01-09 00:10:29 +00:00
parent b8c58abf0e
commit 97c5999c7e
1 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,10 @@ static bool rangefinderDetect(rangefinderDev_t * dev, uint8_t rangefinderHardwar
rangefinderType_e rangefinderHardware = RANGEFINDER_NONE;
requestedSensors[SENSOR_INDEX_RANGEFINDER] = rangefinderHardwareToUse;
#if !defined(USE_RANGEFINDER_HCSR04) && !defined(USE_RANGEFINDER_TF)
UNUSED(dev);
#endif
switch (rangefinderHardwareToUse) {
case RANGEFINDER_HCSR04:
#ifdef USE_RANGEFINDER_HCSR04