mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Removed sync group from SpeedController interface (#51)
CANJaguar is the only motor controller using sync groups, so that feature doesn't belong in an interface used by all motor controllers. If teams want to use sync groups, they should cast to the appropriate motor controller type themselves.
This commit is contained in:
committed by
Peter Johnson
parent
e842ff7ad5
commit
9e99df1cf7
@@ -18,7 +18,7 @@ class Jaguar : public SafePWM, public SpeedController {
|
||||
public:
|
||||
explicit Jaguar(uint32_t channel);
|
||||
virtual ~Jaguar() = default;
|
||||
virtual void Set(float value, uint8_t syncGroup = 0);
|
||||
virtual void Set(float value);
|
||||
virtual float Get() const;
|
||||
virtual void Disable();
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@ class SpeedController : public PIDOutput {
|
||||
/**
|
||||
* Common interface for setting the speed of a speed controller.
|
||||
*
|
||||
* @param speed The speed to set. Value should be between -1.0 and 1.0.
|
||||
* @param syncGroup The update group to add this Set() to, pending
|
||||
* UpdateSyncGroup(). If 0, update immediately.
|
||||
* @param speed The speed to set. Value should be between -1.0 and 1.0.
|
||||
*/
|
||||
virtual void Set(float speed, uint8_t syncGroup = 0) = 0;
|
||||
virtual void Set(float speed) = 0;
|
||||
/**
|
||||
* Common interface for getting the current set speed of a speed controller.
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ class Talon : public SafePWM, public SpeedController {
|
||||
public:
|
||||
explicit Talon(uint32_t channel);
|
||||
virtual ~Talon() = default;
|
||||
virtual void Set(float value, uint8_t syncGroup = 0);
|
||||
virtual void Set(float value);
|
||||
virtual float Get() const;
|
||||
virtual void Disable();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class Victor : public SafePWM, public SpeedController {
|
||||
public:
|
||||
explicit Victor(uint32_t channel);
|
||||
virtual ~Victor() = default;
|
||||
virtual void Set(float value, uint8_t syncGroup = 0);
|
||||
virtual void Set(float value);
|
||||
virtual float Get() const;
|
||||
virtual void Disable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user