SensorUtil
- class wpilib.SensorUtil
Bases:
pybind11_objectStores most recent status information as well as containing utility functions for checking channels and error processing.
- static checkAnalogInputChannel(channel: SupportsInt | SupportsIndex) bool
Check that the analog input number is value.
Verify that the analog input number is one of the legal channel numbers. Channel numbers are 0-based.
- Returns:
Analog channel is valid
- static checkAnalogOutputChannel(channel: SupportsInt | SupportsIndex) bool
Check that the analog output number is valid.
Verify that the analog output number is one of the legal channel numbers. Channel numbers are 0-based.
- Returns:
Analog channel is valid
- static checkDigitalChannel(channel: SupportsInt | SupportsIndex) bool
Check that the digital channel number is valid.
Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.
- Returns:
Digital channel is valid
- static checkPWMChannel(channel: SupportsInt | SupportsIndex) bool
Check that the digital channel number is valid.
Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.
- Returns:
PWM channel is valid
- static checkRelayChannel(channel: SupportsInt | SupportsIndex) bool
Check that the relay channel number is valid.
Verify that the channel number is one of the legal channel numbers. Channel numbers are 0-based.
- Returns:
Relay channel is valid
- static getDefaultCTREPCMModule() int
Get the number of the default solenoid module.
- Returns:
The number of the default solenoid module.
- static getDefaultREVPHModule() int
Get the number of the default solenoid module.
- Returns:
The number of the default solenoid module.
- static getNumAnalogInputs() int
- static getNumAnalogOuputs() int
- static getNumDigitalChannels() int
- static getNumPwmChannels() int
- static getNumRelayChannels() int