[hal] Rename PowerDistributionPanel to PowerDistribution (#3466)

Makes HAL more generic for the PDP, to enable the Rev PDH in the future.
This commit is contained in:
Thad House
2021-08-04 20:31:17 -07:00
committed by GitHub
parent 2014115bca
commit 1ac73a247e
50 changed files with 1612 additions and 1177 deletions

View File

@@ -2,7 +2,7 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "frc/PowerDistributionPanel.h" // NOLINT(build/include_order)
#include "frc/PowerDistribution.h" // NOLINT(build/include_order)
#include <hal/Ports.h>
#include <units/time.h>
@@ -14,13 +14,13 @@
static constexpr auto kMotorTime = 0.25_s;
class PowerDistributionPanelTest : public testing::Test {
class PowerDistributionTest : public testing::Test {
protected:
frc::PowerDistributionPanel m_pdp;
frc::PowerDistribution m_pdp;
frc::Talon m_talon{TestBench::kTalonChannel};
};
TEST_F(PowerDistributionPanelTest, CheckRepeatedCalls) {
TEST_F(PowerDistributionTest, CheckRepeatedCalls) {
auto numChannels = HAL_GetNumPDPChannels();
// 1 second
for (int i = 0; i < 50; i++) {
@@ -35,7 +35,7 @@ TEST_F(PowerDistributionPanelTest, CheckRepeatedCalls) {
/**
* Test if the current changes when the motor is driven using a talon
*/
TEST_F(PowerDistributionPanelTest, CheckCurrentTalon) {
TEST_F(PowerDistributionTest, CheckCurrentTalon) {
frc::Wait(kMotorTime);
/* The Current should be 0 */