mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Major formatting changes (breaks diffs). No code changes.
The changes made in this commit do not affect any actual code,
they are purely aesthetic. I ran clang-format with google style
over all .h/.cpp files in wpilibc that weren't in wpilibC++Sim
or gtest, and the eclipse formatter over all of the Java files
using the Google eclipse formatting configuration.
Change-Id: I9627bca0bc103c398ecc1c5ba17467193291ae63
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2014. All Rights Reserved. */
|
||||
/* Copyright (c) FIRST 2014. All Rights Reserved.
|
||||
*/
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@@ -12,35 +13,35 @@
|
||||
#include "LiveWindow/LiveWindowSendable.h"
|
||||
|
||||
/**
|
||||
* Class for getting voltage, current, temperature, power and energy from the CAN PDP.
|
||||
* Class for getting voltage, current, temperature, power and energy from the
|
||||
* CAN PDP.
|
||||
* The PDP must be at CAN Address 0.
|
||||
* @author Thomas Clark
|
||||
*/
|
||||
class PowerDistributionPanel : public SensorBase, public LiveWindowSendable {
|
||||
public:
|
||||
PowerDistributionPanel();
|
||||
PowerDistributionPanel(uint8_t module);
|
||||
|
||||
double GetVoltage() const;
|
||||
double GetTemperature() const;
|
||||
double GetCurrent(uint8_t channel) const;
|
||||
double GetTotalCurrent() const;
|
||||
double GetTotalPower() const;
|
||||
double GetTotalEnergy() const;
|
||||
void ResetTotalEnergy();
|
||||
void ClearStickyFaults();
|
||||
public:
|
||||
PowerDistributionPanel();
|
||||
PowerDistributionPanel(uint8_t module);
|
||||
|
||||
void UpdateTable() override;
|
||||
void StartLiveWindowMode() override;
|
||||
void StopLiveWindowMode() override;
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(ITable *subTable) override;
|
||||
ITable * GetTable() const override;
|
||||
double GetVoltage() const;
|
||||
double GetTemperature() const;
|
||||
double GetCurrent(uint8_t channel) const;
|
||||
double GetTotalCurrent() const;
|
||||
double GetTotalPower() const;
|
||||
double GetTotalEnergy() const;
|
||||
void ResetTotalEnergy();
|
||||
void ClearStickyFaults();
|
||||
|
||||
private:
|
||||
ITable *m_table;
|
||||
uint8_t m_module;
|
||||
void UpdateTable() override;
|
||||
void StartLiveWindowMode() override;
|
||||
void StopLiveWindowMode() override;
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(ITable *subTable) override;
|
||||
ITable *GetTable() const override;
|
||||
|
||||
private:
|
||||
ITable *m_table;
|
||||
uint8_t m_module;
|
||||
};
|
||||
|
||||
#endif /* __WPILIB_POWER_DISTRIBUTION_PANEL_H__ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user