mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] PowerDistribution: Add module type getter (#3948)
This commit is contained in:
@@ -124,6 +124,13 @@ int PowerDistribution::GetModule() const {
|
||||
return m_module;
|
||||
}
|
||||
|
||||
PowerDistribution::ModuleType PowerDistribution::GetType() const {
|
||||
int32_t status = 0;
|
||||
auto type = HAL_GetPowerDistributionType(m_handle, &status);
|
||||
FRC_ReportError(status, "Module {}", m_module);
|
||||
return static_cast<ModuleType>(type);
|
||||
}
|
||||
|
||||
bool PowerDistribution::GetSwitchableChannel() const {
|
||||
int32_t status = 0;
|
||||
bool state = HAL_GetPowerDistributionSwitchableChannel(m_handle, &status);
|
||||
|
||||
Reference in New Issue
Block a user