11#include "wpi/units/time.hpp"
58 explicit PWM(
int channel,
bool registerSendable =
true);
A class for driving addressable LEDs, such as WS2812B, WS2815, and NeoPixels.
Definition AddressableLED.hpp:31
void InitSendable(wpi::util::SendableBuilder &builder) override
Initializes this Sendable object.
OutputPeriod
Represents the output period in microseconds.
Definition PWM.hpp:32
@ kOutputPeriod_10Ms
PWM pulses occur every 10 ms.
Definition PWM.hpp:40
@ kOutputPeriod_5Ms
PWM pulses occur every 5 ms.
Definition PWM.hpp:36
@ kOutputPeriod_20Ms
PWM pulses occur every 20 ms.
Definition PWM.hpp:44
~PWM() override
Free the PWM channel.
void SetPulseTime(wpi::units::microsecond_t time)
Set the PWM pulse time directly to the hardware.
void SetDisabled()
Temporarily disables the PWM output.
void SetOutputPeriod(OutputPeriod mult)
Sets the PWM output period.
PWM & operator=(PWM &&)=default
PWM(int channel, bool registerSendable=true)
Allocate a PWM given a channel number.
friend class AddressableLED
Definition PWM.hpp:28
wpi::units::microsecond_t GetPulseTime() const
Get the PWM pulse time directly from the hardware.
void SetSimDevice(HAL_SimDeviceHandle device)
Indicates this input is used by a simulated device.
A move-only C++ wrapper around a HAL handle.
Definition Types.hpp:16
Helper class for building Sendable dashboard representations.
Definition SendableBuilder.hpp:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.hpp:21
Interface for Sendable objects.
Definition Sendable.hpp:16
HAL_Handle HAL_SimDeviceHandle
Definition Types.h:53
Definition CvSource.hpp:15