mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpilib] Fix PowerDistribution.GetAllCurrents() (#6025)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <hal/Types.h>
|
||||
#include <wpi/sendable/Sendable.h>
|
||||
#include <wpi/sendable/SendableHelper.h>
|
||||
@@ -50,6 +52,13 @@ class PowerDistribution : public wpi::Sendable,
|
||||
PowerDistribution(PowerDistribution&&) = default;
|
||||
PowerDistribution& operator=(PowerDistribution&&) = default;
|
||||
|
||||
/**
|
||||
* Gets the number of channels for this power distribution object.
|
||||
*
|
||||
* @return Number of output channels (16 for PDP, 24 for PDH).
|
||||
*/
|
||||
int GetNumChannels() const;
|
||||
|
||||
/**
|
||||
* Query the input voltage of the PDP/PDH.
|
||||
*
|
||||
@@ -75,6 +84,13 @@ class PowerDistribution : public wpi::Sendable,
|
||||
*/
|
||||
double GetCurrent(int channel) const;
|
||||
|
||||
/**
|
||||
* Query all currents of the PDP.
|
||||
*
|
||||
* @return The current of each channel in Amperes
|
||||
*/
|
||||
std::vector<double> GetAllCurrents() const;
|
||||
|
||||
/**
|
||||
* Query the total current of all monitored PDP/PDH channels.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user