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:
Thad House
2016-12-20 22:16:05 -08:00
committed by Peter Johnson
parent 8e4afc95c7
commit 841f016017
3 changed files with 12 additions and 10 deletions

View File

@@ -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);