Correctly set smart dashboard type for AnalogGyro and ADXRS450_Gyro.

The GetSmartDashboardType() function defined by GyroBase was returning the
correct "Gyro", but the overrides in AnalogGyro and ADXRS450_Gyro were
incorrectly changing this, resulting in SmartDashboard not recognizing these
as being gyros.

Additionally, AddSensor in the C++ AnalogGyro was setting the name to Gyro
rather than AnalogGyro.

Change-Id: Ib2e31cd2712cc2bc26c8082ed760175d0ee80fb6
This commit is contained in:
Peter Johnson
2016-01-06 20:45:47 -08:00
parent c57e749a94
commit 628811ed03
6 changed files with 1 additions and 23 deletions

View File

@@ -132,7 +132,7 @@ void AnalogGyro::InitGyro() {
SetPIDSourceType(PIDSourceType::kDisplacement);
HALReport(HALUsageReporting::kResourceType_Gyro, m_analog->GetChannel());
LiveWindow::GetInstance()->AddSensor("Gyro", m_analog->GetChannel(), this);
LiveWindow::GetInstance()->AddSensor("AnalogGyro", m_analog->GetChannel(), this);
}
/**
@@ -251,5 +251,3 @@ void AnalogGyro::SetDeadband(float volts) {
(1 << m_analog->GetOversampleBits());
m_analog->SetAccumulatorDeadband(deadband);
}
std::string AnalogGyro::GetSmartDashboardType() const { return "AnalogGyro"; }