19class DigitalGlitchFilter;
143 std::shared_ptr<DigitalSource> downSource,
bool inverted);
468 double m_distancePerPulse = 1;
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition: ThirdPartyNotices.txt:111
Definition: AnalogTrigger.h:21
Interface for counting the number of ticks on a digital input channel.
Definition: CounterBase.h:20
EncodingType
Definition: CounterBase.h:22
Class for counting the number of ticks on a digital input channel.
Definition: Counter.h:35
void SetSemiPeriodMode(bool highSemiPeriod)
Set Semi-period mode on this counter.
hal::Handle< HAL_CounterHandle > m_counter
The FPGA counter object.
Definition: Counter.h:461
void SetUpSource(std::shared_ptr< DigitalSource > source)
Set the source object that causes the counter to count up.
void ClearUpSource()
Disable the up counting source to the counter.
double GetDistance() const
Read the current scaled counter value.
void SetDistancePerPulse(double distancePerPulse)
Set the distance per pulse for this counter.
Counter(const AnalogTrigger &trigger)
Create an instance of a Counter object.
void SetUpSource(DigitalSource *source)
Counter & operator=(Counter &&)=default
Counter(EncodingType encodingType, DigitalSource *upSource, DigitalSource *downSource, bool inverted)
Create an instance of a Counter object.
void SetUpDownCounterMode()
Set standard up / down counting mode on this counter.
void Reset() override
Reset the Counter to zero.
void SetDownSource(std::shared_ptr< AnalogTrigger > analogTrigger, AnalogTriggerType triggerType)
Set the down counting source to be an analog trigger.
void SetExternalDirectionMode()
Set external direction mode on this counter.
std::shared_ptr< DigitalSource > m_downSource
Makes the counter count down.
Definition: Counter.h:458
void SetUpSource(std::shared_ptr< AnalogTrigger > analogTrigger, AnalogTriggerType triggerType)
Set the up counting source to be an analog trigger.
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
bool GetDirection() const override
The last direction the counter value changed.
Counter(Counter &&)=default
units::second_t GetPeriod() const override
Get the Period of the most recent count.
void SetDownSource(DigitalSource *source)
Set the source object that causes the counter to count down.
void SetUpSource(DigitalSource &source)
Set the source object that causes the counter to count up.
void SetDownSource(int channel)
Set the down counting source to be a digital input channel.
Counter(DigitalSource *source)
Create an instance of a counter from a Digital Source (such as a Digital Input).
Counter(Mode mode=kTwoPulse)
Create an instance of a counter where no sources are selected.
int Get() const override
Read the current counter value.
void SetReverseDirection(bool reverseDirection)
Set the Counter to return reversed sensing on the direction.
Counter(int channel)
Create an instance of a Counter object.
double GetRate() const
Get the current rate of the Counter.
Mode
Definition: Counter.h:40
@ kTwoPulse
Definition: Counter.h:41
@ kSemiperiod
Definition: Counter.h:42
@ kPulseLength
Definition: Counter.h:43
@ kExternalDirection
Definition: Counter.h:44
void SetUpdateWhenEmpty(bool enabled)
Select whether you want to continue updating the event timer output when there are no samples capture...
void SetDownSource(AnalogTrigger *analogTrigger, AnalogTriggerType triggerType)
Set the down counting source to be an analog trigger.
int GetSamplesToAverage() const
Get the Samples to Average which specifies the number of samples of the timer to average when calcula...
void SetDownSourceEdge(bool risingEdge, bool fallingEdge)
Set the edge sensitivity on a down counting source.
void SetUpSource(AnalogTrigger *analogTrigger, AnalogTriggerType triggerType)
Set the up counting source to be an analog trigger.
void ClearDownSource()
Disable the down counting source to the counter.
void SetUpSource(int channel)
Set the upsource for the counter as a digital input channel.
void SetDownSource(std::shared_ptr< DigitalSource > source)
Counter(std::shared_ptr< DigitalSource > source)
Create an instance of a counter from a Digital Source (such as a Digital Input).
bool GetStopped() const override
Determine if the clock is stopped.
Counter(EncodingType encodingType, std::shared_ptr< DigitalSource > upSource, std::shared_ptr< DigitalSource > downSource, bool inverted)
Create an instance of a Counter object.
void SetMaxPeriod(units::second_t maxPeriod) final
Set the maximum period where the device is still considered "moving".
std::shared_ptr< DigitalSource > m_upSource
Makes the counter count up.
Definition: Counter.h:455
void SetSamplesToAverage(int samplesToAverage)
Set the Samples to Average which specifies the number of samples of the timer to average when calcula...
void SetUpSourceEdge(bool risingEdge, bool fallingEdge)
Set the edge sensitivity on an up counting source.
void SetDownSource(DigitalSource &source)
Set the source object that causes the counter to count down.
void SetPulseLengthMode(double threshold)
Configure the counter to count in up or down based on the length of the input pulse.
Class for configuring Direct Memory Access (DMA) of FPGA inputs.
Definition: DMA.h:23
DMA sample.
Definition: DMASample.h:23
Class to enable glitch filtering on a set of digital inputs.
Definition: DigitalGlitchFilter.h:30
DigitalSource Interface.
Definition: DigitalSource.h:22
Helper class for building Sendable dashboard representations.
Definition: SendableBuilder.h:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:19
Interface for Sendable objects.
Definition: Sendable.h:16
Definition: AprilTagPoseEstimator.h:15
AnalogTriggerType
Defines the state in which the AnalogTrigger triggers.
Definition: AnalogTriggerType.h:10