DoubleSolenoid class for running 2 channels of high voltage Digital Output on a pneumatics module.
More...
#include <wpi/hardware/pneumatic/DoubleSolenoid.hpp>
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
Possible values for a DoubleSolenoid.
| Enumerator |
|---|
| kOff | Off position.
|
| kForward | Forward position.
|
| kReverse | Reverse position.
|
◆ DoubleSolenoid() [1/3]
| wpi::DoubleSolenoid::DoubleSolenoid |
( |
int | busId, |
|
|
int | module, |
|
|
PneumaticsModuleType | moduleType, |
|
|
int | forwardChannel, |
|
|
int | reverseChannel ) |
Constructs a double solenoid for a specified module of a specific module type.
- Parameters
-
| busId | The bus ID. |
| 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]
| wpi::DoubleSolenoid::DoubleSolenoid |
( |
int | busId, |
|
|
PneumaticsModuleType | moduleType, |
|
|
int | forwardChannel, |
|
|
int | reverseChannel ) |
Constructs a double solenoid for a default module of a specific module type.
- Parameters
-
| busId | The bus ID. |
| 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()
| wpi::DoubleSolenoid::~DoubleSolenoid |
( |
| ) |
|
|
override |
◆ DoubleSolenoid() [3/3]
| wpi::DoubleSolenoid::DoubleSolenoid |
( |
DoubleSolenoid && | | ) |
|
|
default |
◆ Get()
| Value wpi::DoubleSolenoid::Get |
( |
| ) |
const |
Read the current value of the solenoid.
- Returns
- The current value of the solenoid.
◆ GetFwdChannel()
| int wpi::DoubleSolenoid::GetFwdChannel |
( |
| ) |
const |
Get the forward channel.
- Returns
- the forward channel.
◆ GetRevChannel()
| int wpi::DoubleSolenoid::GetRevChannel |
( |
| ) |
const |
Get the reverse channel.
- Returns
- the reverse channel.
◆ InitSendable()
◆ IsFwdSolenoidDisabled()
| bool wpi::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
- ClearAllStickyFaults()
- Returns
- If solenoid is disabled due to short.
◆ IsRevSolenoidDisabled()
| bool wpi::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
- ClearAllStickyFaults()
- Returns
- If solenoid is disabled due to short.
◆ operator=()
◆ Set()
| void wpi::DoubleSolenoid::Set |
( |
Value | value | ) |
|
Set the value of a solenoid.
- Parameters
-
| value | The value to set (Off, Forward or Reverse) |
◆ Toggle()
| void wpi::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: