mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SmartDashboard override .name entry in putData(String, Sendable) (#866)
Fixes #865
This commit is contained in:
committed by
Peter Johnson
parent
0ef9803363
commit
ee33296e1f
@@ -162,10 +162,12 @@ void SmartDashboard::PutData(llvm::StringRef key, Sendable* data) {
|
||||
auto& sddata = inst.tablesToData[key];
|
||||
if (!sddata.sendable || sddata.sendable != data) {
|
||||
sddata = SmartDashboardData(data);
|
||||
sddata.builder.SetTable(inst.table->GetSubTable(key));
|
||||
auto dataTable = inst.table->GetSubTable(key);
|
||||
sddata.builder.SetTable(dataTable);
|
||||
data->InitSendable(sddata.builder);
|
||||
sddata.builder.UpdateTable();
|
||||
sddata.builder.StartListeners();
|
||||
dataTable->GetEntry(".name").SetString(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user