Fix SmartDashboard PutData to hook setters. (#851)

* Fix SmartDashboard PutData to hook setters.

Also update all PutData values in main periodic loop (same as LiveWindow).

* Improve SmartDashboard.putData() repeat call handling.
This commit is contained in:
Peter Johnson
2017-12-26 17:18:02 -06:00
committed by bradamiller
parent a3e5378d14
commit 40eb6dfc9b
8 changed files with 97 additions and 25 deletions

View File

@@ -29,16 +29,24 @@ void SendableBuilderImpl::UpdateTable() {
if (m_updateTable) m_updateTable();
}
void SendableBuilderImpl::StartLiveWindowMode() {
if (m_safeState) m_safeState();
void SendableBuilderImpl::StartListeners() {
for (auto& property : m_properties) property.StartListener();
}
void SendableBuilderImpl::StopLiveWindowMode() {
if (m_safeState) m_safeState();
void SendableBuilderImpl::StopListeners() {
for (auto& property : m_properties) property.StopListener();
}
void SendableBuilderImpl::StartLiveWindowMode() {
if (m_safeState) m_safeState();
StartListeners();
}
void SendableBuilderImpl::StopLiveWindowMode() {
StopListeners();
if (m_safeState) m_safeState();
}
void SendableBuilderImpl::SetSmartDashboardType(const llvm::Twine& type) {
m_table->GetEntry(".type").SetString(type);
}