mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Fixes SerialHelper when used with OS serial ports. (#411)
Also makes the SerialHelper API public so it can be used externally.
This commit is contained in:
committed by
Peter Johnson
parent
8e4afc95c7
commit
841f016017
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "SerialHelper.h"
|
||||
#include "HAL/cpp/SerialHelper.h"
|
||||
#include "visa/visa.h"
|
||||
|
||||
static int32_t resourceManagerHandle;
|
||||
@@ -23,7 +23,7 @@ void HAL_InitializeSerialPort(HAL_SerialPort port, int32_t* status) {
|
||||
if (resourceManagerHandle == 0)
|
||||
viOpenDefaultRM(reinterpret_cast<ViSession*>(&resourceManagerHandle));
|
||||
|
||||
hal::SerialHelper serialHelper(resourceManagerHandle);
|
||||
hal::SerialHelper serialHelper;
|
||||
|
||||
portName = serialHelper.GetVISASerialPortName(port, status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user