Remove GetTable from wpilibc Sendable interface.

This allows nearly all m_table member variables to be removed.
This commit is contained in:
Peter Johnson
2017-09-02 00:35:30 -07:00
parent 040a8c6bcc
commit 0d4fde17e0
57 changed files with 87 additions and 259 deletions

View File

@@ -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;
}