Default to requiring frc namespace for wpilibc. (#972)

Instead of defining NAMESPACED_WPILIB to remove the "using namespace frc"
shim in Base.h, instead require NO_NAMESPACED_WPILIB be defined to add it.

Fix up various examples to use correct namespacing.
This commit is contained in:
Peter Johnson
2018-05-22 23:33:50 -07:00
committed by GitHub
parent cbaff52850
commit dcc2764844
10 changed files with 25 additions and 24 deletions

View File

@@ -48,13 +48,13 @@ class DriveTrain : public frc::Subsystem {
* @return The encoder getting the distance and speed of left side of
* the drivetrain.
*/
Encoder& GetLeftEncoder();
frc::Encoder& GetLeftEncoder();
/**
* @return The encoder getting the distance and speed of right side of
* the drivetrain.
*/
Encoder& GetRightEncoder();
frc::Encoder& GetRightEncoder();
/**
* @return The current angle of the drivetrain.
@@ -73,7 +73,7 @@ class DriveTrain : public frc::Subsystem {
frc::DifferentialDrive m_robotDrive{m_leftCIMs, m_rightCIMs};
frc::Encoder m_rightEncoder{1, 2, true, Encoder::k4X};
frc::Encoder m_leftEncoder{3, 4, false, Encoder::k4X};
frc::Encoder m_rightEncoder{1, 2, true, frc::Encoder::k4X};
frc::Encoder m_leftEncoder{3, 4, false, frc::Encoder::k4X};
frc::AnalogGyro m_gyro{0};
};