[wpilib] Deprecate getInstance() in favor of static functions (#3440)

Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
Peter Johnson
2021-06-15 23:06:03 -07:00
committed by GitHub
parent 26ff9371d9
commit 362066a9b7
105 changed files with 1500 additions and 1539 deletions

View File

@@ -23,7 +23,7 @@ using namespace frc;
AnalogGyro::AnalogGyro(int channel)
: AnalogGyro(std::make_shared<AnalogInput>(channel)) {
wpi::SendableRegistry::GetInstance().AddChild(this, m_analog.get());
wpi::SendableRegistry::AddChild(this, m_analog.get());
}
AnalogGyro::AnalogGyro(AnalogInput* channel)
@@ -41,7 +41,7 @@ AnalogGyro::AnalogGyro(std::shared_ptr<AnalogInput> channel)
AnalogGyro::AnalogGyro(int channel, int center, double offset)
: AnalogGyro(std::make_shared<AnalogInput>(channel), center, offset) {
wpi::SendableRegistry::GetInstance().AddChild(this, m_analog.get());
wpi::SendableRegistry::AddChild(this, m_analog.get());
}
AnalogGyro::AnalogGyro(std::shared_ptr<AnalogInput> channel, int center,
@@ -124,8 +124,7 @@ void AnalogGyro::InitGyro() {
HAL_Report(HALUsageReporting::kResourceType_Gyro, m_analog->GetChannel() + 1);
wpi::SendableRegistry::GetInstance().AddLW(this, "AnalogGyro",
m_analog->GetChannel());
wpi::SendableRegistry::AddLW(this, "AnalogGyro", m_analog->GetChannel());
}
void AnalogGyro::Calibrate() {