mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +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:
@@ -16,16 +16,7 @@ public class Robot extends TimedRobot {
|
||||
AnalogInput m_analog = new AnalogInput(0);
|
||||
|
||||
/** Called once at the beginning of the robot program. */
|
||||
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);
|
||||
}
|
||||
public Robot() {}
|
||||
|
||||
@Override
|
||||
public void teleopPeriodic() {
|
||||
@@ -37,13 +28,5 @@ public class Robot extends 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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,7 @@ public class Robot extends TimedRobot {
|
||||
AnalogPotentiometer m_pot1 = new AnalogPotentiometer(m_input, 180, 30);
|
||||
|
||||
/** Called once at the beginning of the robot program. */
|
||||
public Robot() {
|
||||
// Set averaging bits to 2
|
||||
m_input.setAverageBits(2);
|
||||
}
|
||||
public Robot() {}
|
||||
|
||||
@Override
|
||||
public void teleopPeriodic() {
|
||||
|
||||
Reference in New Issue
Block a user