mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Deprecate getInstance() in favor of static functions (#3440)
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ using namespace frc;
|
||||
AnalogTrigger::AnalogTrigger(int channel)
|
||||
: AnalogTrigger(new AnalogInput(channel)) {
|
||||
m_ownsAnalog = true;
|
||||
wpi::SendableRegistry::GetInstance().AddChild(this, m_analogInput);
|
||||
wpi::SendableRegistry::AddChild(this, m_analogInput);
|
||||
}
|
||||
|
||||
AnalogTrigger::AnalogTrigger(AnalogInput* input) {
|
||||
@@ -31,7 +31,7 @@ AnalogTrigger::AnalogTrigger(AnalogInput* input) {
|
||||
int index = GetIndex();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_AnalogTrigger, index + 1);
|
||||
wpi::SendableRegistry::GetInstance().AddLW(this, "AnalogTrigger", index);
|
||||
wpi::SendableRegistry::AddLW(this, "AnalogTrigger", index);
|
||||
}
|
||||
|
||||
AnalogTrigger::AnalogTrigger(DutyCycle* input) {
|
||||
@@ -42,7 +42,7 @@ AnalogTrigger::AnalogTrigger(DutyCycle* input) {
|
||||
int index = GetIndex();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_AnalogTrigger, index + 1);
|
||||
wpi::SendableRegistry::GetInstance().AddLW(this, "AnalogTrigger", index);
|
||||
wpi::SendableRegistry::AddLW(this, "AnalogTrigger", index);
|
||||
}
|
||||
|
||||
AnalogTrigger::~AnalogTrigger() {
|
||||
|
||||
Reference in New Issue
Block a user