Skip to content

Commit

Permalink
RDS02UF: Prevent problems with gcc10 [-Werror=undef]
Browse files Browse the repository at this point in the history
  • Loading branch information
zebulon-86 committed May 8, 2023
1 parent e719548 commit b18d741
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Tools/scripts/build_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def __init__(self,
Feature('Rangefinder', 'RANGEFINDER_VL53L0X', 'AP_RANGEFINDER_VL53L0X_ENABLED', "Enable Rangefinder - VL53L0X", 0, "RANGEFINDER"), # NOQA: E501
Feature('Rangefinder', 'RANGEFINDER_VL53L1X', 'AP_RANGEFINDER_VL53L1X_ENABLED', "Enable Rangefinder - VL53L1X", 0, "RANGEFINDER"), # NOQA: E501
Feature('Rangefinder', 'RANGEFINDER_WASP', 'AP_RANGEFINDER_WASP_ENABLED', "Enable Rangefinder - Wasp", 0, "RANGEFINDER"), # NOQA: E501
Feature('Rangefinder', 'RANGEFINDER_RDS02UF', 'AP_RANGEFINDER_RDS02UF_ENABLED', "Enable Rangefinder - RDS02UF", 0, "RANGEFINDER"), # NOQA: E501

Feature('Sensors', 'OPTICALFLOW', 'AP_OPTICALFLOW_ENABLED', 'Enable Optical Flow', 0, None),
Feature('Sensors', 'OPTICALFLOW_CXOF', 'AP_OPTICALFLOW_CXOF_ENABLED', 'Enable Optical flow CXOF Sensor', 0, "OPTICALFLOW"),
Expand Down
6 changes: 5 additions & 1 deletion libraries/AP_RangeFinder/AP_RangeFinder_RDS02UF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
#include "AP_RangeFinder_RDS02UF.h"

#if AP_RANGEFINDER_RDS02UF_ENABLED

#include <AP_HAL/AP_HAL.h>
#include <ctype.h>

Expand Down Expand Up @@ -220,4 +222,6 @@ uint8_t AP_RangeFinder_RDS02UF::crc8(uint8_t* pbuf, int32_t len)
return 0;
#endif

}
}

#endif // AP_RANGEFINDER_RDS02UF_ENABLED

0 comments on commit b18d741

Please sign in to comment.