pub struct PowerDistributionPanel { /* fields omitted */ }
An interface to the PDP for getting information about robot power.
Initalizes a PDP using the default module, which is 0, according to WPILibC.
Create a new PDP interface on the specified module.
Get the voltage going into the PDP.
Get the PDP's temperature, in degrees Celsius.
The HalMaybe
returned will have an error most commonly
in the case of a CAN timeout. (In Fact, this is the only
error WPILib will ever report!).
Get the current on a specific channel on the PDP, in amps.
If channel
is invalid, the return value will contain
NAN
and `HalError(0).
The HalMaybe
returned will have an error most commonly
in the case of a CAN timeout. (In Fact, this is the only
error WPILib will ever report!).
Get the total current drawn from the PDP, in amps.
The HalMaybe
returned will have an error most commonly
in the case of a CAN timeout. (In Fact, this is the only
error WPILib will ever report!).
Get the total power drawn from the PDP, in watts.
The HalMaybe
returned will have an error most commonly
in the case of a CAN timeout. (In Fact, this is the only
error WPILib will ever report!).
Get the total energy expended by the PDP, in joules.
The HalMaybe
returned will have an error most commonly
in the case of a CAN timeout. (In Fact, this is the only
error WPILib will ever report!).
Reset the total energy count so far to zero.
Errors in the case of a CAN timeout. (In Fact, this
is the only error WPILib will ever report!).
Clear sticky faults in the PDP.
Errors in the case of a CAN timeout. (In Fact, this
is the only error WPILib will ever report!).
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static