44 std::shared_ptr<DigitalSource> directionSource);
79 std::shared_ptr<DigitalSource> m_countSource;
80 std::shared_ptr<DigitalSource> m_directionSource;
81 hal::Handle<HAL_CounterHandle> m_handle;
DigitalSource Interface.
Definition: DigitalSource.h:22
Counter using external direction.
Definition: ExternalDirectionCounter.h:26
int GetCount() const
Gets the current count.
void SetEdgeConfiguration(EdgeConfiguration configuration)
Sets the edge configuration for counting.
void SetReverseDirection(bool reverseDirection)
Sets to reverse the counter direction.
ExternalDirectionCounter & operator=(ExternalDirectionCounter &&)=default
ExternalDirectionCounter(ExternalDirectionCounter &&)=default
ExternalDirectionCounter(std::shared_ptr< DigitalSource > countSource, std::shared_ptr< DigitalSource > directionSource)
Constructs a new ExternalDirectionCounter.
ExternalDirectionCounter(DigitalSource &countSource, DigitalSource &directionSource)
Constructs a new ExternalDirectionCounter.
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
~ExternalDirectionCounter() override
void Reset()
Resets the current count.
Definition: SendableBuilder.h:18
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:19
Interface for Sendable objects.
Definition: Sendable.h:16
::int32_t int32_t
Definition: Meta.h:57
Definition: AprilTagFieldLayout.h:22
EdgeConfiguration
Definition: EdgeConfiguration.h:8