[hal,wpiutil] Error out of HAL_Initialize if SetupRioNow fails (#6374)

This commit is contained in:
Thad House
2024-02-15 22:57:06 -08:00
committed by GitHub
parent 6afff99640
commit ba15844c28
3 changed files with 23 additions and 15 deletions

View File

@@ -74,10 +74,12 @@ void SetupNowDefaultOnRio();
*/
#ifdef __FRC_ROBORIO__
template <typename T>
void SetupNowRio(void* chipObjectLibrary, std::unique_ptr<T> hmbObject);
bool SetupNowRio(void* chipObjectLibrary, std::unique_ptr<T> hmbObject);
#else
template <typename T>
inline void SetupNowRio(void*, std::unique_ptr<T>) {}
inline bool SetupNowRio(void*, std::unique_ptr<T>) {
return true;
}
#endif
/**
@@ -85,7 +87,7 @@ inline void SetupNowRio(void*, std::unique_ptr<T>) {}
* No effect on non-Rio platforms. This take an FPGA session that has
* already been initialized, and is used from LabVIEW.
*/
void SetupNowRio(uint32_t session);
bool SetupNowRio(uint32_t session);
/**
* De-initialize the on-Rio Now() implementation. No effect on non-Rio