mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Switches all notifiers created with the external API to be threaded (#546)
Testing showed this wasn't an issue with timing, and allows for more safety in user code making mistakes. Places where the extra thread wouldn't help have been kept non threaded, using a new internal API.
This commit is contained in:
committed by
Peter Johnson
parent
1d15fcd072
commit
c57a7f0a41
@@ -25,6 +25,7 @@
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Notifier.h"
|
||||
#include "HAL/cpp/NotifierInternal.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "ctre/ctre.h"
|
||||
@@ -306,7 +307,8 @@ int32_t HAL_Initialize(int32_t mode) {
|
||||
HAL_BaseInitialize(&status);
|
||||
|
||||
if (!rolloverNotifier)
|
||||
rolloverNotifier = HAL_InitializeNotifier(timerRollover, nullptr, &status);
|
||||
rolloverNotifier = HAL_InitializeNotifierNonThreadedUnsafe(
|
||||
timerRollover, nullptr, &status);
|
||||
if (status == 0) {
|
||||
uint64_t curTime = HAL_GetFPGATime(&status);
|
||||
if (status == 0)
|
||||
|
||||
Reference in New Issue
Block a user