Showing the changes to interface/src/SerialInterface.cpp (1 of 13 files). Show all
Unified · Split
| @@ -67,10 +67,10 @@ int SerialInterface::initializePort(char* portname, int baud) · 66 unmodified lines | |||
| 67 | #ifdef __APPLE__ | 67 | #ifdef __APPLE__ |
| 68 | serialFd = open(portname, O_RDWR | O_NOCTTY | O_NDELAY); | 68 | serialFd = open(portname, O_RDWR | O_NOCTTY | O_NDELAY); |
| 69 | 69 | ||
| 70 | printf("Opening SerialUSB %s: ", portname); | 70 | printLog("Opening SerialUSB %s: ", portname); |
| 71 | 71 | ||
| 72 | if (serialFd == -1) { | 72 | if (serialFd == -1) { |
| 73 | printf("Failed.\n"); | 73 | printLog("Failed.\n"); |
| 74 | return -1; // Failed to open port | 74 | return -1; // Failed to open port |
| 75 | } | 75 | } |
| 76 | struct termios options; | 76 | struct termios options; |
| @@ -101,7 +101,7 @@ int SerialInterface::initializePort(char* portname, int baud) · 24 unmodified lines | |||
| 101 | tcsetattr(serialFd,TCSANOW,&options); | 101 | tcsetattr(serialFd,TCSANOW,&options); |
| 102 | 102 | ||
| 103 | 103 | ||
| 104 | printf("Connected.\n"); | 104 | printLog("Connected.\n"); |
| 105 | resetSerial(); | 105 | resetSerial(); |
| 106 | active = true; | 106 | active = true; |
| 107 | #endif | 107 | #endif |