History

fix bad conditional serial pairing

Stephen Birarda committed 13 years ago

Commit 8e4e5d01 parent 660630e1 file · +3 −1Browse files

Showing the changes to interface/src/SerialInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/SerialInterface.cpp+3−1
@@ -31,13 +31,14 @@ const short NO_READ_MAXIMUM = 10; · 30 unmodified lines
31const short SAMPLES_TO_DISCARD = 100;31const short SAMPLES_TO_DISCARD = 100;
32 32
33void SerialInterface::pair() {33void SerialInterface::pair() {
34
35#ifdef __APPLE__
34 // look for a matching gyro setup36 // look for a matching gyro setup
35 DIR *devDir;37 DIR *devDir;
36 struct dirent *entry;38 struct dirent *entry;
37 int matchStatus;39 int matchStatus;
38 regex_t regex;40 regex_t regex;
39 41
40#ifdef __APPLE__
41 // for now this only works on OS X, where the usb serial shows up as /dev/tty.usb*42 // for now this only works on OS X, where the usb serial shows up as /dev/tty.usb*
42 if((devDir = opendir("/dev"))) {43 if((devDir = opendir("/dev"))) {
43 while((entry = readdir(devDir))) {44 while((entry = readdir(devDir))) {
@@ -56,6 +57,7 @@ void SerialInterface::pair() { · 12 unmodified lines
56 closedir(devDir);57 closedir(devDir);
57 }58 }
58#endif59#endif
60
59}61}
60 62
61// Init the serial port to the specified values63// Init the serial port to the specified values