mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[sim] SimDataValue: Fix cancellation
The uid was getting incremented by 1 during registration but not decremented by 1 during cancellation, so cancellation didn't work correctly. As the underlying registration ensures a non-zero result, don't increment the result.
This commit is contained in:
@@ -53,7 +53,7 @@ class SimDataValueBase : protected SimCallbackRegistryBase {
|
||||
lock.unlock();
|
||||
callback(name, param, &value);
|
||||
}
|
||||
return newUid + 1;
|
||||
return newUid;
|
||||
}
|
||||
|
||||
void DoSet(T value, const char* name) {
|
||||
|
||||
Reference in New Issue
Block a user