Skip to content

Commit 4cdde28

Browse files
committed
Improvement: Support for more than 9 COM ports
1 parent 0361ea5 commit 4cdde28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OpenVR/samples/driver_arduinohmd/driver_arduinohmd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ void ArduinoIMURead()
181181
}
182182

183183
void ArduinoIMUStart() {
184-
TCHAR PortName[15] = { 0 };
185-
_stprintf(PortName, TEXT("COM%d"), comPortNumber);
184+
TCHAR PortName[32] = { 0 };
185+
_stprintf(PortName, TEXT("\\\\.\\COM%d"), comPortNumber);
186186
//CString sPortName;
187187
//sPortName.Format(_T("COM%d"), IniFile.ReadInteger("Main", "ComPort", 2));
188188

0 commit comments

Comments
 (0)