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:
Tyler Veness
2015-06-19 17:23:54 -07:00
parent c6b790cadd
commit 5598445a67
172 changed files with 1165 additions and 1140 deletions

View File

@@ -147,7 +147,7 @@ Gyro::~Gyro()
* @return the current heading of the robot in degrees. This heading is based on integration
* of the returned rate from the gyro.
*/
float Gyro::GetAngle( void )
float Gyro::GetAngle() const
{
int64_t rawValue;
uint32_t count;
@@ -169,7 +169,7 @@ float Gyro::GetAngle( void )
*
* @return the current rate in degrees per second
*/
double Gyro::GetRate( void )
double Gyro::GetRate() const
{
return (m_analog->GetAverageValue() - ((double)m_center + m_offset)) * 1e-9 * m_analog->GetLSBWeight()
/ ((1 << m_analog->GetOversampleBits()) * m_voltsPerDegreePerSecond);
@@ -220,7 +220,7 @@ void Gyro::SetPIDSourceParameter(PIDSourceParameter pidSource)
*
* @return The PIDOutput (angle or rate, defaults to angle)
*/
double Gyro::PIDGet()
double Gyro::PIDGet() const
{
switch(m_pidSource){
case kRate:
@@ -246,7 +246,7 @@ void Gyro::StopLiveWindowMode() {
}
std::string Gyro::GetSmartDashboardType() {
std::string Gyro::GetSmartDashboardType() const {
return "Gyro";
}
@@ -255,6 +255,6 @@ void Gyro::InitTable(ITable *subTable) {
UpdateTable();
}
ITable * Gyro::GetTable() {
ITable * Gyro::GetTable() const {
return m_table;
}