mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Directly construct PWM port from HAL, avoid wpilib PWM object (#2106)
This commit is contained in:
committed by
Peter Johnson
parent
c0e36df9d8
commit
5443fdabc1
@@ -17,7 +17,6 @@
|
||||
#include "frc/ErrorBase.h"
|
||||
|
||||
namespace frc {
|
||||
class PWM;
|
||||
|
||||
/**
|
||||
* A class for driving addressable LEDs, such as WS2812s and NeoPixels.
|
||||
@@ -44,27 +43,6 @@ class AddressableLED : public ErrorBase {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a new driver from a PWM output.
|
||||
*
|
||||
* @param output the pwm output to use
|
||||
*/
|
||||
explicit AddressableLED(PWM& output);
|
||||
|
||||
/**
|
||||
* Constructs a new driver from a PWM output.
|
||||
*
|
||||
* @param output the pwm output to use
|
||||
*/
|
||||
explicit AddressableLED(PWM* output);
|
||||
|
||||
/**
|
||||
* Constructs a new driver from a PWM output.
|
||||
*
|
||||
* @param output the pwm output to use
|
||||
*/
|
||||
explicit AddressableLED(std::shared_ptr<PWM> output);
|
||||
|
||||
/**
|
||||
* Constructs a new driver for a specific port.
|
||||
*
|
||||
@@ -142,9 +120,7 @@ class AddressableLED : public ErrorBase {
|
||||
void Stop();
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
std::shared_ptr<PWM> m_pwmOutput;
|
||||
hal::Handle<HAL_DigitalHandle> m_pwmHandle;
|
||||
hal::Handle<HAL_AddressableLEDHandle> m_handle;
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user