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:
@@ -45,7 +45,7 @@ AnalogInput::~AnalogInput()
|
||||
* The value is scaled to units of Volts using the calibrated scaling data from GetLSBWeight() and GetOffset().
|
||||
* @return A scaled sample straight from this channel.
|
||||
*/
|
||||
float AnalogInput::GetVoltage()
|
||||
float AnalogInput::GetVoltage() const
|
||||
{
|
||||
return m_impl->Get();
|
||||
}
|
||||
@@ -57,7 +57,7 @@ float AnalogInput::GetVoltage()
|
||||
* Using averaging will cause this value to be more stable, but it will update more slowly.
|
||||
* @return A scaled sample from the output of the oversample and average engine for this channel.
|
||||
*/
|
||||
float AnalogInput::GetAverageVoltage()
|
||||
float AnalogInput::GetAverageVoltage() const
|
||||
{
|
||||
return m_impl->Get();
|
||||
}
|
||||
@@ -66,7 +66,7 @@ float AnalogInput::GetAverageVoltage()
|
||||
* Get the channel number.
|
||||
* @return The channel number.
|
||||
*/
|
||||
uint32_t AnalogInput::GetChannel()
|
||||
uint32_t AnalogInput::GetChannel() const
|
||||
{
|
||||
return m_channel;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ uint32_t AnalogInput::GetChannel()
|
||||
*
|
||||
* @return The average voltage.
|
||||
*/
|
||||
double AnalogInput::PIDGet()
|
||||
double AnalogInput::PIDGet() const
|
||||
{
|
||||
return GetAverageVoltage();
|
||||
}
|
||||
@@ -95,7 +95,7 @@ void AnalogInput::StopLiveWindowMode() {
|
||||
|
||||
}
|
||||
|
||||
std::string AnalogInput::GetSmartDashboardType() {
|
||||
std::string AnalogInput::GetSmartDashboardType() const {
|
||||
return "Analog Input";
|
||||
}
|
||||
|
||||
@@ -104,6 +104,6 @@ void AnalogInput::InitTable(ITable *subTable) {
|
||||
UpdateTable();
|
||||
}
|
||||
|
||||
ITable * AnalogInput::GetTable() {
|
||||
ITable * AnalogInput::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user