From c8e44256ef8c92b04cf4959921b5fbc94985f44e Mon Sep 17 00:00:00 2001 From: Thad House Date: Wed, 8 Nov 2017 23:41:16 -0800 Subject: [PATCH] Uses NI provided function for SetOccurDataRef rather then importing the symbol ourselves. (#714) --- hal/src/main/native/athena/FRCDriverStation.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hal/src/main/native/athena/FRCDriverStation.cpp b/hal/src/main/native/athena/FRCDriverStation.cpp index 9e0c47ed91..819de77bb3 100644 --- a/hal/src/main/native/athena/FRCDriverStation.cpp +++ b/hal/src/main/native/athena/FRCDriverStation.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include "HAL/DriverStation.h" @@ -351,22 +352,17 @@ HAL_Bool HAL_WaitForDSDataTimeout(double timeout) { return true; } -// Internal NetComm function to set new packet callback -extern int NetCommRPCProxy_SetOccurFuncPointer( - int32_t (*occurFunc)(uint32_t refNum)); - // Constant number to be used for our occur handle constexpr int32_t refNumber = 42; -static int32_t newDataOccur(uint32_t refNum) { +static void newDataOccur(uint32_t refNum) { // Since we could get other values, require our specific handle // to signal our threads - if (refNum != refNumber) return 0; + if (refNum != refNumber) return; std::lock_guard lock(newDSDataAvailableMutex); // Nofify all threads newDSDataAvailableCounter++; newDSDataAvailableCond.notify_all(); - return 0; } /*