12 #include <hal/Types.h>
14 #include "frc/ErrorBase.h"
15 #include "frc/smartdashboard/Sendable.h"
16 #include "frc/smartdashboard/SendableHelper.h"
66 explicit DutyCycle(std::shared_ptr<DigitalSource> source);
131 void InitDutyCycle();
132 std::shared_ptr<DigitalSource> m_source;
133 hal::Handle<HAL_DutyCycleHandle> m_handle;
unsigned int GetOutputRaw() const
Get the raw output ratio of the duty cycle signal.
unsigned int GetOutputScaleFactor() const
Get the scale factor of the output.
Definition: DMASample.h:23
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
int GetFPGAIndex() const
Get the FPGA index for the DutyCycle.
~DutyCycle() override
Close the DutyCycle and free all resources.
Definition: AnalogTrigger.h:25
DutyCycle(DigitalSource &source)
Constructs a DutyCycle input from a DigitalSource input.
Class to read a duty cycle PWM input.
Definition: DutyCycle.h:35
Base class for most objects.
Definition: ErrorBase.h:104
int GetFrequency() const
Get the frequency of the duty cycle signal.
int GetSourceChannel() const
Get the channel of the source.
Interface for Sendable objects.
Definition: Sendable.h:17
double GetOutput() const
Get the output ratio of the duty cycle signal.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
DigitalSource Interface.
Definition: DigitalSource.h:25
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
Definition: SendableBuilder.h:23