diff --git a/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java b/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java index 4042863997..fd83b800be 100644 --- a/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java +++ b/hal/src/main/java/edu/wpi/first/hal/AnalogJNI.java @@ -129,7 +129,7 @@ public class AnalogJNI extends JNIWrapper { /** * Gets a sample straight from the channel on this module. * - *

The sample is a 12-bit value representing the 0V to 5V range of the A/D converter in the + *

The sample is a 12-bit value representing the 0V to 3.3V range of the A/D converter in the * module. The units are in A/D converter codes. Use GetVoltage() to get the analog value in * calibrated units. * diff --git a/hal/src/main/native/include/hal/AnalogInput.h b/hal/src/main/native/include/hal/AnalogInput.h index 47dc979e89..a3f3dbd512 100644 --- a/hal/src/main/native/include/hal/AnalogInput.h +++ b/hal/src/main/native/include/hal/AnalogInput.h @@ -144,7 +144,7 @@ int32_t HAL_GetAnalogOversampleBits(HAL_AnalogInputHandle analogPortHandle, /** * Gets a sample straight from the channel on this module. * - * The sample is a 12-bit value representing the 0V to 5V range of the A/D + * The sample is a 12-bit value representing the 0V to 3.3V range of the A/D * converter in the module. The units are in A/D converter codes. Use * GetVoltage() to get the analog value in calibrated units. * diff --git a/wpilibc/src/main/native/include/frc/AnalogInput.h b/wpilibc/src/main/native/include/frc/AnalogInput.h index f5f27633be..a7e2834585 100644 --- a/wpilibc/src/main/native/include/frc/AnalogInput.h +++ b/wpilibc/src/main/native/include/frc/AnalogInput.h @@ -44,7 +44,7 @@ class AnalogInput : public wpi::Sendable, /** * Get a sample straight from this channel. * - * The sample is a 12-bit value representing the 0V to 5V range of the A/D + * The sample is a 12-bit value representing the 0V to 3.3V range of the A/D * converter in the module. The units are in A/D converter codes. Use * GetVoltage() to get the analog value in calibrated units. * diff --git a/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h b/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h index 3d0588dfa4..10c61c8d69 100644 --- a/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h +++ b/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h @@ -38,7 +38,7 @@ class AnalogPotentiometer : public wpi::Sendable, * potentiometer is plugged into. 0-3 are on-board and 4-7 * are on the MXP port. * @param fullRange The value (in desired units) representing the full - * 0-5V range of the input. + * 0-3.3V range of the input. * @param offset The value (in desired units) representing the * angular output at 0V. */ @@ -60,7 +60,7 @@ class AnalogPotentiometer : public wpi::Sendable, * * @param input The existing Analog Input pointer * @param fullRange The value (in desired units) representing the full - * 0-5V range of the input. + * 0-3.3V range of the input. * @param offset The value (in desired units) representing the * angular output at 0V. */ @@ -82,7 +82,7 @@ class AnalogPotentiometer : public wpi::Sendable, * * @param input The existing Analog Input pointer * @param fullRange The value (in desired units) representing the full - * 0-5V range of the input. + * 0-3.3V range of the input. * @param offset The value (in desired units) representing the * angular output at 0V. */ diff --git a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp index d081df266f..aa76700def 100644 --- a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp @@ -52,9 +52,9 @@ class PotentiometerPIDTest : public testing::Test { m_elevatorSim.Update(20_ms); /* - meters = (v / 5v) * range - meters / range = v / 5v - 5v * (meters / range) = v + meters = (v / 3.3v) * range + meters / range = v / 3.3v + 3.3v * (meters / range) = v */ m_analogSim.SetVoltage( (frc::RobotController::GetVoltage3V3() * diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java index 1590e293eb..b91ccc1704 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java @@ -14,7 +14,7 @@ import edu.wpi.first.util.sendable.SendableRegistry; /** * Analog channel class. * - *

Each analog channel is read from hardware as a 12-bit number representing 0V to 5V. + *

Each analog channel is read from hardware as a 12-bit number representing 0V to 3.3V. * *

Connected to each analog channel is an averaging and oversampling engine. This engine * accumulates the specified ( by setAverageBits() and setOversampleBits() ) number of samples @@ -52,9 +52,9 @@ public class AnalogInput implements Sendable, AutoCloseable { } /** - * Get a sample straight from this channel. The sample is a 12-bit value representing the 0V to 5V - * range of the A/D converter. The units are in A/D converter codes. Use GetVoltage() to get the - * analog value in calibrated units. + * Get a sample straight from this channel. The sample is a 12-bit value representing the 0V to + * 3.3V range of the A/D converter. The units are in A/D converter codes. Use GetVoltage() to get + * the analog value in calibrated units. * * @return A sample straight from this channel. */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java index 7e9bc3007b..4f9b275f2d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java @@ -50,7 +50,7 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable { * fraction of the supply voltage, plus the offset. * * @param input The {@link AnalogInput} this potentiometer is plugged into. - * @param fullRange The angular value (in desired units) representing the full 0-5V range of the + * @param fullRange The angular value (in desired units) representing the full 0-3.3V range of the * input. * @param offset The angular value (in desired units) representing the angular output at 0V. */ diff --git a/wpilibj/src/test/java/edu/wpi/first/wpilibj/AnalogPotentiometerTest.java b/wpilibj/src/test/java/edu/wpi/first/wpilibj/AnalogPotentiometerTest.java index 928332ddc1..29eebfc025 100644 --- a/wpilibj/src/test/java/edu/wpi/first/wpilibj/AnalogPotentiometerTest.java +++ b/wpilibj/src/test/java/edu/wpi/first/wpilibj/AnalogPotentiometerTest.java @@ -81,7 +81,7 @@ class AnalogPotentiometerTest { RoboRioSim.resetData(); AnalogInputSim sim = new AnalogInputSim(1); - // Test at 5v + // Test at 3.3v sim.setVoltage(3.3); assertEquals(270, pot.get()); diff --git a/wpilibjExamples/src/test/java/edu/wpi/first/wpilibj/examples/potentiometerpid/PotentiometerPIDTest.java b/wpilibjExamples/src/test/java/edu/wpi/first/wpilibj/examples/potentiometerpid/PotentiometerPIDTest.java index eca8244076..51570e7635 100644 --- a/wpilibjExamples/src/test/java/edu/wpi/first/wpilibj/examples/potentiometerpid/PotentiometerPIDTest.java +++ b/wpilibjExamples/src/test/java/edu/wpi/first/wpilibj/examples/potentiometerpid/PotentiometerPIDTest.java @@ -68,9 +68,9 @@ class PotentiometerPIDTest { m_elevatorSim.update(0.02); /* - meters = (v / 5v) * range - meters / range = v / 5v - 5v * (meters / range) = v + meters = (v / 3.3v) * range + meters / range = v / 3.3v + 3.3v * (meters / range) = v */ m_analogSim.setVoltage( RobotController.getVoltage3V3()