mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Remove GetTable from wpilibc Sendable interface.
This allows nearly all m_table member variables to be removed.
This commit is contained in:
@@ -336,17 +336,12 @@ void Compressor::StopLiveWindowMode() {
|
||||
std::string Compressor::GetSmartDashboardType() const { return "Compressor"; }
|
||||
|
||||
void Compressor::InitTable(std::shared_ptr<nt::NetworkTable> subTable) {
|
||||
m_table = subTable;
|
||||
if (m_table) {
|
||||
m_enabledEntry = m_table->GetEntry("Enabled");
|
||||
m_pressureSwitchEntry = m_table->GetEntry("Pressure switch");
|
||||
if (subTable) {
|
||||
m_enabledEntry = subTable->GetEntry("Enabled");
|
||||
m_pressureSwitchEntry = subTable->GetEntry("Pressure switch");
|
||||
UpdateTable();
|
||||
} else {
|
||||
m_enabledEntry = nt::NetworkTableEntry();
|
||||
m_pressureSwitchEntry = nt::NetworkTableEntry();
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<nt::NetworkTable> Compressor::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user