[sim] Add callback for NotifyNewData

This commit is contained in:
Peter Johnson
2020-08-14 22:14:07 -07:00
parent ae5b07ba01
commit dc9e560f9b
5 changed files with 54 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ static int32_t newDataOccur(uint32_t refNum) {
// Since we could get other values, require our specific handle
// to signal our threads
if (refNum != refNumber) return 0;
SimDriverStationData->CallNewDataCallbacks();
std::scoped_lock lock(newDSDataAvailableMutex);
// Nofify all threads
newDSDataAvailableCounter++;