From bc8f68bec76beb92f027b797f6b85b67fc62ec73 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 3 Jan 2020 22:38:45 -0800 Subject: [PATCH] Add sim HAL_WaitForCachedControlData (#2221) --- hal/src/main/native/sim/DriverStation.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hal/src/main/native/sim/DriverStation.cpp b/hal/src/main/native/sim/DriverStation.cpp index e8404cf415..14e0ffdde0 100644 --- a/hal/src/main/native/sim/DriverStation.cpp +++ b/hal/src/main/native/sim/DriverStation.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -230,6 +230,10 @@ static int& GetThreadLocalLastCount() { return lastCount; } +void HAL_WaitForCachedControlData(void) { + HAL_WaitForCachedControlDataTimeout(0); +} + HAL_Bool HAL_WaitForCachedControlDataTimeout(double timeout) { int& lastCount = GetThreadLocalLastCount(); std::unique_lock lock(newDSDataAvailableMutex);