mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Deprecate getInstance() in favor of static functions (#3440)
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user