kauailabs / navxmxp

Robotics Navigation Sensors. NavX-MXP designed for the National Instruments RoboRIO & FIRST FRC Robotics. Navx-MIcro designed for Android-based FIRST FTC Robots
MIT License
105 stars 89 forks source link

Please remove `using namespace frc` in AHRS.h #89

Closed Lytigas closed 4 years ago

Lytigas commented 4 years ago

This pollutes the global namespace of any source that includes the header, and could trick unwitting programmers into not writing frc:: only to be dumbfounded once removing #include "AHRS.h" breaks all their symbols. Not having using declarations in headers is a well-documented best practice: https://stackoverflow.com/a/5849668

kauailabs commented 4 years ago

Thanks for catching this, it's now fixed. You can acquire it by updating to the latest online vendor deps URL (https://www.kauailabs.com/dist/frc/2020/navx_frc.json). The latest version of the libraries with this change is 3.1.403.