mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +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:
@@ -73,7 +73,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
|
||||
{
|
||||
return impl->GetAngle();
|
||||
}
|
||||
@@ -86,7 +86,7 @@ float Gyro::GetAngle( void )
|
||||
*
|
||||
* @return the current rate in degrees per second
|
||||
*/
|
||||
double Gyro::GetRate( void )
|
||||
double Gyro::GetRate() const
|
||||
{
|
||||
return impl->GetVelocity();
|
||||
}
|
||||
@@ -103,7 +103,7 @@ void Gyro::SetPIDSourceParameter(PIDSourceParameter pidSource)
|
||||
*
|
||||
* @return The angle in degrees.
|
||||
*/
|
||||
double Gyro::PIDGet()
|
||||
double Gyro::PIDGet() const
|
||||
{
|
||||
switch(m_pidSource){
|
||||
case kRate:
|
||||
@@ -129,7 +129,7 @@ void Gyro::StopLiveWindowMode() {
|
||||
|
||||
}
|
||||
|
||||
std::string Gyro::GetSmartDashboardType() {
|
||||
std::string Gyro::GetSmartDashboardType() const {
|
||||
return "Gyro";
|
||||
}
|
||||
|
||||
@@ -138,6 +138,6 @@ void Gyro::InitTable(ITable *subTable) {
|
||||
UpdateTable();
|
||||
}
|
||||
|
||||
ITable * Gyro::GetTable() {
|
||||
ITable * Gyro::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user