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