Fix C++ floating point literal formatting (#2114)

Found formatting errors with this regex
"([^a-z0-9\.]\.[0-9]|[^a-z0-9\.][0-9]\.[^a-z0-9\.])" and ignored false
positives.

Fixes #2112.
This commit is contained in:
Tyler Veness
2019-11-20 21:48:16 -08:00
committed by Peter Johnson
parent 3d1ca856b2
commit ffa4b907c0
40 changed files with 82 additions and 82 deletions

View File

@@ -34,7 +34,7 @@ class SendableBuilder;
* - 1999 to 1001 = linear scaling from "full forward" to "center"
* - 1000 = center value
* - 999 to 2 = linear scaling from "center" to "full reverse"
* - 1 = minimum pulse width (currently .5ms)
* - 1 = minimum pulse width (currently 0.5ms)
* - 0 = disabled (i.e. PWM output is held low)
*/
class PWM : public MotorSafety, public Sendable, public SendableHelper<PWM> {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -105,7 +105,7 @@ class Servo : public PWM {
static constexpr double kMinServoAngle = 0.0;
static constexpr double kDefaultMaxServoPWM = 2.4;
static constexpr double kDefaultMinServoPWM = .6;
static constexpr double kDefaultMinServoPWM = 0.6;
};
} // namespace frc

View File

@@ -150,8 +150,8 @@ class Pose2d {
*
* @param twist The change in pose in the robot's coordinate frame since the
* previous pose update. For example, if a non-holonomic robot moves forward
* 0.01 meters and changes angle by .5 degrees since the previous pose update,
* the twist would be Twist2d{0.01, 0.0, toRadians(0.5)}
* 0.01 meters and changes angle by 0.5 degrees since the previous pose
* update, the twist would be Twist2d{0.01, 0.0, toRadians(0.5)}
*
* @return The new pose of the robot.
*/