mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal,wpilib] Remove a ton of things related to the FPGA (#7846)
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
@@ -12,16 +12,6 @@
|
||||
class Robot : public wpi::TimedRobot {
|
||||
public:
|
||||
Robot() {
|
||||
// Sets the AnalogInput to 4-bit oversampling. 16 samples will be added
|
||||
// together.
|
||||
// Thus, the reported values will increase by about a factor of 16, and the
|
||||
// update rate will decrease by a similar amount.
|
||||
m_analog.SetOversampleBits(4);
|
||||
|
||||
// Sets the AnalogInput to 4-bit averaging. 16 samples will be averaged
|
||||
// together. The update rate will decrease by a factor of 16.
|
||||
m_analog.SetAverageBits(4);
|
||||
|
||||
// Gets the raw instantaneous measured value from the analog input, without
|
||||
// applying any calibration and ignoring oversampling and averaging
|
||||
// settings.
|
||||
@@ -30,14 +20,6 @@ class Robot : public wpi::TimedRobot {
|
||||
// Gets the instantaneous measured voltage from the analog input.
|
||||
// Oversampling and averaging settings are ignored
|
||||
m_analog.GetVoltage();
|
||||
|
||||
// Gets the averaged value from the analog input. The value is not
|
||||
// rescaled, but oversampling and averaging are both applied.
|
||||
m_analog.GetAverageValue();
|
||||
|
||||
// Gets the averaged voltage from the analog input. Rescaling,
|
||||
// oversampling, and averaging are all applied.
|
||||
m_analog.GetAverageVoltage();
|
||||
}
|
||||
|
||||
void TeleopPeriodic() override {}
|
||||
|
||||
@@ -12,10 +12,7 @@
|
||||
*/
|
||||
class Robot : public wpi::TimedRobot {
|
||||
public:
|
||||
Robot() {
|
||||
// Set averaging bits to 2
|
||||
m_input.SetAverageBits(2);
|
||||
}
|
||||
Robot() {}
|
||||
|
||||
void TeleopPeriodic() override {
|
||||
// Get the value of the potentiometer
|
||||
|
||||
Reference in New Issue
Block a user