mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Replaced floats with doubles (#355)
This makes our APIs more consistent. With optimizations enabled, doubles are just as efficient as floats on ARMv7, so we should take advantage of the extra precision.
This commit is contained in:
committed by
Peter Johnson
parent
7bcd243ec3
commit
69422dc063
@@ -74,21 +74,21 @@ class PWM : public SensorBase,
|
||||
* scaling is implemented as an output squelch to get longer periods for old
|
||||
* devices.
|
||||
*/
|
||||
static const float kDefaultPwmPeriod;
|
||||
static const double kDefaultPwmPeriod;
|
||||
/**
|
||||
* kDefaultPwmCenter is the PWM range center in ms
|
||||
*/
|
||||
static const float kDefaultPwmCenter;
|
||||
static const double kDefaultPwmCenter;
|
||||
/**
|
||||
* kDefaultPWMStepsDown is the number of PWM steps below the centerpoint
|
||||
*/
|
||||
static const int kDefaultPwmStepsDown;
|
||||
static const int kPwmDisabled;
|
||||
|
||||
virtual void SetPosition(float pos);
|
||||
virtual float GetPosition() const;
|
||||
virtual void SetSpeed(float speed);
|
||||
virtual float GetSpeed() const;
|
||||
virtual void SetPosition(double pos);
|
||||
virtual double GetPosition() const;
|
||||
virtual void SetSpeed(double speed);
|
||||
virtual double GetSpeed() const;
|
||||
|
||||
bool m_eliminateDeadband;
|
||||
int m_centerPwm;
|
||||
|
||||
Reference in New Issue
Block a user