mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] Don't update timestamp when value is unchanged (#5356)
This fixes an issue with commands run/cancel.
This commit is contained in:
@@ -113,9 +113,11 @@ TEST(ShuffleboardInstanceTest, DuplicateSelectTabs) {
|
||||
NTWrapper ntInst;
|
||||
frc::detail::ShuffleboardInstance shuffleboardInst{ntInst.inst};
|
||||
std::atomic_int counter = 0;
|
||||
auto listener = nt::NetworkTableListener::CreateListener(
|
||||
ntInst.inst.GetStringTopic("/Shuffleboard/.metadata/Selected"),
|
||||
nt::EventFlags::kValueAll | nt::EventFlags::kImmediate,
|
||||
auto subscriber =
|
||||
ntInst.inst.GetStringTopic("/Shuffleboard/.metadata/Selected")
|
||||
.Subscribe("", {.keepDuplicates = true});
|
||||
ntInst.inst.AddListener(
|
||||
subscriber, nt::EventFlags::kValueAll | nt::EventFlags::kImmediate,
|
||||
[&counter](auto& event) { counter++; });
|
||||
|
||||
// There shouldn't be anything there
|
||||
|
||||
Reference in New Issue
Block a user