mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11: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:
@@ -72,7 +72,7 @@ AnalogAccelerometer::~AnalogAccelerometer()
|
||||
*
|
||||
* @return The current acceleration of the sensor in Gs.
|
||||
*/
|
||||
float AnalogAccelerometer::GetAcceleration()
|
||||
float AnalogAccelerometer::GetAcceleration() const
|
||||
{
|
||||
return (m_AnalogInput->GetAverageVoltage() - m_zeroGVoltage) / m_voltsPerG;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ void AnalogAccelerometer::SetZero(float zero)
|
||||
*
|
||||
* @return The current acceleration in Gs.
|
||||
*/
|
||||
double AnalogAccelerometer::PIDGet()
|
||||
double AnalogAccelerometer::PIDGet() const
|
||||
{
|
||||
return GetAcceleration();
|
||||
}
|
||||
@@ -124,7 +124,7 @@ void AnalogAccelerometer::StartLiveWindowMode() {
|
||||
void AnalogAccelerometer::StopLiveWindowMode() {
|
||||
}
|
||||
|
||||
std::string AnalogAccelerometer::GetSmartDashboardType() {
|
||||
std::string AnalogAccelerometer::GetSmartDashboardType() const {
|
||||
return "Accelerometer";
|
||||
}
|
||||
|
||||
@@ -133,6 +133,6 @@ void AnalogAccelerometer::InitTable(ITable *subTable) {
|
||||
UpdateTable();
|
||||
}
|
||||
|
||||
ITable * AnalogAccelerometer::GetTable() {
|
||||
ITable * AnalogAccelerometer::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user