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:
@@ -113,11 +113,10 @@ std::string ADXL345_SPI::GetSmartDashboardType() const {
|
||||
}
|
||||
|
||||
void ADXL345_SPI::InitTable(std::shared_ptr<nt::NetworkTable> subtable) {
|
||||
m_table = subtable;
|
||||
if (m_table) {
|
||||
m_xEntry = m_table->GetEntry("X");
|
||||
m_yEntry = m_table->GetEntry("Y");
|
||||
m_zEntry = m_table->GetEntry("Z");
|
||||
if (subtable) {
|
||||
m_xEntry = subtable->GetEntry("X");
|
||||
m_yEntry = subtable->GetEntry("Y");
|
||||
m_zEntry = subtable->GetEntry("Z");
|
||||
UpdateTable();
|
||||
} else {
|
||||
m_xEntry = nt::NetworkTableEntry();
|
||||
@@ -131,7 +130,3 @@ void ADXL345_SPI::UpdateTable() {
|
||||
if (m_yEntry) m_yEntry.SetDouble(GetY());
|
||||
if (m_zEntry) m_zEntry.SetDouble(GetZ());
|
||||
}
|
||||
|
||||
std::shared_ptr<nt::NetworkTable> ADXL345_SPI::GetTable() const {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user