REVrobotics / 2m-Distance-Sensor

Port of ST vl53l0x driver for roboRIO to operate the REV Robotics 2m Distance Sensor.
http://www.revrobotics.com/rev-31-1505/
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

ST source needs abs() modification to compile for x86 #1

Open ryanj1234 opened 5 years ago

ryanj1234 commented 5 years ago

When compiling for x86, compiler errors out since call to function abs() is ambiguous. Current workaround is to cast args in abs() as double for the x86 build. The compiler for the x86 build uses include -DWINDOWS which is used with #ifdef to create a separate call to abs() for x86 only. For native roboRIO builds abs() is left untouched.

https://github.com/REVrobotics/2m-Distance-Sensor/blob/8fa66c30369ccdbc9248534a32b1970a51ab8716/src/main/native/cpp/core/src/vl53l0x_api_core.c#L1835