mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Removed AnalogModule, DigitalModule, and Module from C++
The HAL calls from Analog/DigitalModule are now directly in the classes that use them. Change-Id: I1cf879ab2979be903d03ab8282dfe5a5e7ae9443
This commit is contained in:
@@ -367,6 +367,29 @@ void AnalogInput::GetAccumulatorOutput(int64_t *value, uint32_t *count)
|
||||
*value += m_accumulatorOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the sample rate for all analog channels.
|
||||
*
|
||||
* @param samplesPerSecond The number of samples per second.
|
||||
*/
|
||||
void AnalogInput::SetSampleRate(float samplesPerSecond)
|
||||
{
|
||||
int32_t status = 0;
|
||||
setAnalogSampleRate(samplesPerSecond, &status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current sample rate for all channels
|
||||
*
|
||||
* @return Sample rate.
|
||||
*/
|
||||
float AnalogInput::GetSampleRate()
|
||||
{
|
||||
int32_t status = 0;
|
||||
float sampleRate = getAnalogSampleRate(&status);
|
||||
return sampleRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Average value for the PID Source base object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user