DoubleSolenoid class for running 2 channels of high voltage Digital Output on a pneumatics module.
More...
#include <frc/DoubleSolenoid.h>
DoubleSolenoid class for running 2 channels of high voltage Digital Output on a pneumatics module.
The DoubleSolenoid class is typically used for pneumatics solenoids that have two positions controlled by two separate channels.
◆ Value
Enumerator |
---|
kOff | |
kForward | |
kReverse | |
◆ DoubleSolenoid() [1/3]
frc::DoubleSolenoid::DoubleSolenoid |
( |
int |
module, |
|
|
PneumaticsModuleType |
moduleType, |
|
|
int |
forwardChannel, |
|
|
int |
reverseChannel |
|
) |
| |
Constructs a double solenoid for a specified module of a specific module type.
- Parameters
-
module | The module of the solenoid module to use. |
moduleType | The module type to use. |
forwardChannel | The forward channel on the module to control. |
reverseChannel | The reverse channel on the module to control. |
◆ DoubleSolenoid() [2/3]
frc::DoubleSolenoid::DoubleSolenoid |
( |
PneumaticsModuleType |
moduleType, |
|
|
int |
forwardChannel, |
|
|
int |
reverseChannel |
|
) |
| |
Constructs a double solenoid for a default module of a specific module type.
- Parameters
-
moduleType | The module type to use. |
forwardChannel | The forward channel on the module to control. |
reverseChannel | The reverse channel on the module to control. |
◆ ~DoubleSolenoid()
frc::DoubleSolenoid::~DoubleSolenoid |
( |
| ) |
|
|
override |
◆ DoubleSolenoid() [3/3]
◆ Get()
virtual Value frc::DoubleSolenoid::Get |
( |
| ) |
const |
|
virtual |
Read the current value of the solenoid.
- Returns
- The current value of the solenoid.
◆ GetFwdChannel()
int frc::DoubleSolenoid::GetFwdChannel |
( |
| ) |
const |
Get the forward channel.
- Returns
- the forward channel.
◆ GetRevChannel()
int frc::DoubleSolenoid::GetRevChannel |
( |
| ) |
const |
Get the reverse channel.
- Returns
- the reverse channel.
◆ InitSendable()
Initializes this Sendable object.
- Parameters
-
Implements wpi::Sendable.
◆ IsFwdSolenoidDisabled()
bool frc::DoubleSolenoid::IsFwdSolenoidDisabled |
( |
| ) |
const |
Check if the forward solenoid is Disabled.
If a solenoid is shorted, it is added to the DisabledList and disabled until power cycle, or until faults are cleared.
- See also
- ClearAllPCMStickyFaults()
- Returns
- If solenoid is disabled due to short.
◆ IsRevSolenoidDisabled()
bool frc::DoubleSolenoid::IsRevSolenoidDisabled |
( |
| ) |
const |
Check if the reverse solenoid is Disabled.
If a solenoid is shorted, it is added to the DisabledList and disabled until power cycle, or until faults are cleared.
- See also
- ClearAllPCMStickyFaults()
- Returns
- If solenoid is disabled due to short.
◆ operator=()
◆ Set()
virtual void frc::DoubleSolenoid::Set |
( |
Value |
value | ) |
|
|
virtual |
Set the value of a solenoid.
- Parameters
-
value | The value to set (Off, Forward or Reverse) |
◆ Toggle()
void frc::DoubleSolenoid::Toggle |
( |
| ) |
|
Toggle the value of the solenoid.
If the solenoid is set to forward, it'll be set to reverse. If the solenoid is set to reverse, it'll be set to forward. If the solenoid is set to off, nothing happens.
The documentation for this class was generated from the following file: