mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Improve const correctness.
See https://usfirst.collab.net/sf/tracker/do/viewArtifact/projects.wpilib/tracker.4_defects/artf4148 Change-Id: I47b0d5a91fd49e47e2c7348b0705e998ec815682
This commit is contained in:
@@ -59,7 +59,7 @@ AnalogPotentiometer::~AnalogPotentiometer() {
|
||||
*
|
||||
* @return The current position of the potentiometer (in the units used for fullRaneg and offset).
|
||||
*/
|
||||
double AnalogPotentiometer::Get() {
|
||||
double AnalogPotentiometer::Get() const {
|
||||
return (m_analog_input->GetVoltage() / ControllerPower::GetVoltage5V()) * m_fullRange + m_offset;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ double AnalogPotentiometer::Get() {
|
||||
*
|
||||
* @return The current reading.
|
||||
*/
|
||||
double AnalogPotentiometer::PIDGet() {
|
||||
double AnalogPotentiometer::PIDGet() const {
|
||||
return Get();
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ double AnalogPotentiometer::PIDGet() {
|
||||
/**
|
||||
* @return the Smart Dashboard Type
|
||||
*/
|
||||
std::string AnalogPotentiometer::GetSmartDashboardType() {
|
||||
std::string AnalogPotentiometer::GetSmartDashboardType() const {
|
||||
return "Analog Input";
|
||||
}
|
||||
|
||||
@@ -94,6 +94,6 @@ void AnalogPotentiometer::UpdateTable() {
|
||||
}
|
||||
}
|
||||
|
||||
ITable* AnalogPotentiometer::GetTable() {
|
||||
ITable* AnalogPotentiometer::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user