mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Use new NetworkTables across WPILib (C++ and Java).
Also make sure table listeners stop listening in their destructors. This might be better handled by moving the table itself into ITableListener and providing cleanup functionality there. A submodule is used to pull in ntcore. Change-Id: I3031c1a768595cf0f8754c47e15cd423e2dbcce5
This commit is contained in:
committed by
Brad Miller (WPI)
parent
f65e697107
commit
f89c5e150f
@@ -21,5 +21,5 @@ bool NetworkButton::Get() {
|
||||
return m_netTable->GetBoolean(m_field.c_str());
|
||||
else
|
||||
return false;*/
|
||||
return m_netTable->GetBoolean(m_field);
|
||||
return m_netTable->GetBoolean(m_field, false);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ bool Trigger::Grab() {
|
||||
return true;
|
||||
else if (m_table != nullptr) {
|
||||
// if (m_table->isConnected())//TODO is connected on button?
|
||||
return m_table->GetBoolean("pressed");
|
||||
return m_table->GetBoolean("pressed", false);
|
||||
/*else
|
||||
return false;*/
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user