mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
GCS/HID compile fix, still has problems!!
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1180 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
561d42c73a
commit
927592cb7d
@ -261,7 +261,8 @@ QString pjrc_rawhid::getserial(int num)
|
||||
char temp[126];
|
||||
|
||||
hid = get_hid(num);
|
||||
if (!hid || !hid->open) return -1;
|
||||
if (!hid || !hid->open)
|
||||
return "";
|
||||
|
||||
/* Should we do some "critical section" stuff here?? */
|
||||
if(!HidD_GetSerialNumberString(hid->handle, temp, sizeof(temp))) {
|
||||
@ -269,7 +270,7 @@ QString pjrc_rawhid::getserial(int num)
|
||||
return QString("Error");
|
||||
}
|
||||
|
||||
return QString().fromUtf16(temp,-1);
|
||||
return QString().fromUtf16((ushort*)temp,-1);
|
||||
}
|
||||
|
||||
// close - close a device
|
||||
|
Loading…
x
Reference in New Issue
Block a user