mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
fix bad conditional serial pairing
This commit is contained in:
parent
660630e981
commit
8e4e5d049b
1 changed files with 3 additions and 1 deletions
|
@ -31,13 +31,14 @@ const short NO_READ_MAXIMUM = 10;
|
||||||
const short SAMPLES_TO_DISCARD = 100;
|
const short SAMPLES_TO_DISCARD = 100;
|
||||||
|
|
||||||
void SerialInterface::pair() {
|
void SerialInterface::pair() {
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
// look for a matching gyro setup
|
// look for a matching gyro setup
|
||||||
DIR *devDir;
|
DIR *devDir;
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
int matchStatus;
|
int matchStatus;
|
||||||
regex_t regex;
|
regex_t regex;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
// for now this only works on OS X, where the usb serial shows up as /dev/tty.usb*
|
// for now this only works on OS X, where the usb serial shows up as /dev/tty.usb*
|
||||||
if((devDir = opendir("/dev"))) {
|
if((devDir = opendir("/dev"))) {
|
||||||
while((entry = readdir(devDir))) {
|
while((entry = readdir(devDir))) {
|
||||||
|
@ -56,6 +57,7 @@ void SerialInterface::pair() {
|
||||||
closedir(devDir);
|
closedir(devDir);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init the serial port to the specified values
|
// Init the serial port to the specified values
|
||||||
|
|
Loading…
Reference in a new issue