mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
remove/fix references to cRIO documentation.
Edited comments related to sidecar, breakout, 9472. Some references were to unused methods in simulation that were removed. Change-Id: I99b6fe9e8cb982831ffbf29177f84e2f9f71ef47
This commit is contained in:
@@ -16,8 +16,7 @@ import edu.wpi.first.wpilibj.util.AllocationException;
|
||||
import edu.wpi.first.wpilibj.util.CheckedAllocationException;
|
||||
|
||||
/**
|
||||
* DoubleSolenoid class for running 2 channels of high voltage Digital Output
|
||||
* (9472 module).
|
||||
* DoubleSolenoid class for running 2 channels of high voltage Digital Output.
|
||||
*
|
||||
* The DoubleSolenoid class is typically used for pneumatics solenoids that
|
||||
* have two positions controlled by two separate channels.
|
||||
|
||||
@@ -141,10 +141,7 @@ public class DriverStation implements RobotState.Interface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the battery voltage from the specified AnalogChannel.
|
||||
*
|
||||
* This accessor assumes that the battery voltage is being measured
|
||||
* through the voltage divider on an analog breakout.
|
||||
* Read the battery voltage.
|
||||
*
|
||||
* @return The battery voltage.
|
||||
*/
|
||||
|
||||
@@ -23,40 +23,31 @@ public abstract class SensorBase { // TODO: Refactor
|
||||
*/
|
||||
public static final int kSystemClockTicksPerMicrosecond = 40;
|
||||
/**
|
||||
* Number of digital channels per digital sidecar
|
||||
* Number of digital channels per roboRIO
|
||||
*/
|
||||
public static final int kDigitalChannels = 20;
|
||||
public static final int kDigitalChannels = 26;
|
||||
/**
|
||||
* Number of digital modules
|
||||
* XXX: This number is incorrect. We need to find the correct number.
|
||||
*/
|
||||
public static final int kDigitalModules = 1;
|
||||
/**
|
||||
* Number of analog input channels per module
|
||||
* Number of analog input channels
|
||||
*/
|
||||
public static final int kAnalogInputChannels = 8;
|
||||
/**
|
||||
* Number of analog output channels per module
|
||||
* Number of analog output channels
|
||||
*/
|
||||
public static final int kAnalogOutputChannels = 2;
|
||||
/**
|
||||
* Number of analog modules
|
||||
*/
|
||||
public static final int kAnalogModules = 1;
|
||||
/**
|
||||
* Number of solenoid channels per module
|
||||
*/
|
||||
public static final int kSolenoidChannels = 8;
|
||||
/**
|
||||
* Number of analog modules
|
||||
* Number of solenoid modules
|
||||
*/
|
||||
public static final int kSolenoidModules = 2;
|
||||
/**
|
||||
* Number of PWM channels per sidecar
|
||||
* Number of PWM channels per roboRIO
|
||||
*/
|
||||
public static final int kPwmChannels = 20;
|
||||
/**
|
||||
* Number of relay channels per sidecar
|
||||
* Number of relay channels per roboRIO
|
||||
*/
|
||||
public static final int kRelayChannels = 4;
|
||||
/**
|
||||
@@ -64,8 +55,6 @@ public abstract class SensorBase { // TODO: Refactor
|
||||
*/
|
||||
public static final int kPDPChannels = 16;
|
||||
|
||||
private static int m_defaultAnalogModule = 1;
|
||||
private static int m_defaultDigitalModule = 1;
|
||||
private static int m_defaultSolenoidModule = 1;
|
||||
|
||||
/**
|
||||
@@ -75,33 +64,7 @@ public abstract class SensorBase { // TODO: Refactor
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default Digital Module.
|
||||
* This sets the default digital module to use for objects that are created without
|
||||
* specifying the digital module in the constructor. The default module is initialized
|
||||
* to the first module in the chassis.
|
||||
*
|
||||
* @param moduleNumber The number of the digital module to use.
|
||||
*/
|
||||
public static void setDefaultDigitalModule(final int moduleNumber) {
|
||||
checkDigitalModule(moduleNumber);
|
||||
SensorBase.m_defaultDigitalModule = moduleNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default Analog module.
|
||||
* This sets the default analog module to use for objects that are created without
|
||||
* specifying the analog module in the constructor. The default module is initialized
|
||||
* to the first module in the chassis.
|
||||
*
|
||||
* @param moduleNumber The number of the analog module to use.
|
||||
*/
|
||||
public static void setDefaultAnalogModule(final int moduleNumber) {
|
||||
checkAnalogModule(moduleNumber);
|
||||
SensorBase.m_defaultAnalogModule = moduleNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default location for the Solenoid (9472) module.
|
||||
* Set the default location for the Solenoid module.
|
||||
*
|
||||
* @param moduleNumber The number of the solenoid module to use.
|
||||
*/
|
||||
@@ -110,52 +73,8 @@ public abstract class SensorBase { // TODO: Refactor
|
||||
SensorBase.m_defaultSolenoidModule = moduleNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the digital module number is valid.
|
||||
* Module numbers are 1 or 2 (they are no longer real cRIO slots).
|
||||
*
|
||||
* @param moduleNumber The digital module module number to check.
|
||||
*/
|
||||
protected static void checkDigitalModule(final int moduleNumber) {
|
||||
if (moduleNumber != 1 && moduleNumber != 2)
|
||||
System.err.println("Digital module " + moduleNumber + " is not present.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the digital module number is valid.
|
||||
* Module numbers are 1 or 2 (they are no longer real cRIO slots).
|
||||
*
|
||||
* @param moduleNumber The digital module module number to check.
|
||||
*/
|
||||
protected static void checkRelayModule(final int moduleNumber) {
|
||||
checkDigitalModule(moduleNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the digital module number is valid.
|
||||
* Module numbers are 1 or 2 (they are no longer real cRIO slots).
|
||||
*
|
||||
* @param moduleNumber The digital module module number to check.
|
||||
*/
|
||||
protected static void checkPWMModule(final int moduleNumber) {
|
||||
checkDigitalModule(moduleNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the analog module number is valid.
|
||||
* Module numbers are 1 or 2 (they are no longer real cRIO slots).
|
||||
*
|
||||
* @param moduleNumber The analog module module number to check.
|
||||
*/
|
||||
protected static void checkAnalogModule(final int moduleNumber) {
|
||||
if (moduleNumber != 1 && moduleNumber != 2) {
|
||||
System.err.println("Analog module " + moduleNumber + " is not present.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that the solenoid module is correct.
|
||||
* Module numbers are 1 or 2 (they are no longer real cRIO slots).
|
||||
*
|
||||
* @param moduleNumber The solenoid module module number to check.
|
||||
*/
|
||||
@@ -257,27 +176,9 @@ public abstract class SensorBase { // TODO: Refactor
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of the default analog module.
|
||||
* Get the number of the default solenoid module.
|
||||
*
|
||||
* @return The number of the default analog module.
|
||||
*/
|
||||
public static int getDefaultAnalogModule() {
|
||||
return SensorBase.m_defaultAnalogModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of the default analog module.
|
||||
*
|
||||
* @return The number of the default analog module.
|
||||
*/
|
||||
public static int getDefaultDigitalModule() {
|
||||
return SensorBase.m_defaultDigitalModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of the default analog module.
|
||||
*
|
||||
* @return The number of the default analog module.
|
||||
* @return The number of the default solenoid module.
|
||||
*/
|
||||
public static int getDefaultSolenoidModule() {
|
||||
return SensorBase.m_defaultSolenoidModule;
|
||||
|
||||
@@ -14,10 +14,10 @@ import edu.wpi.first.wpilibj.tables.ITable;
|
||||
import edu.wpi.first.wpilibj.tables.ITableListener;
|
||||
|
||||
/**
|
||||
* Solenoid class for running high voltage Digital Output (9472 module).
|
||||
* Solenoid class for running high voltage Digital Output.
|
||||
*
|
||||
* The Solenoid class is typically used for pneumatics solenoids, but could be used
|
||||
* for any device within the current spec of the 9472 module.
|
||||
* for any device within the current spec of the PCM.
|
||||
*/
|
||||
public class Solenoid implements LiveWindowSendable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user