| 276 | } |
| 277 | |
| 278 | std::string SerialPort::readLine() |
| 279 | { |
| 280 | std::string s; |
| 281 | |
| 282 | for (;;) |
| 283 | { |
| 284 | uint8_t b = readByte(); |
| 285 | if (b == '\r') |
| 286 | continue; |
| 287 | if (b == '\n') |
| 288 | return s; |
| 289 | |
| 290 | s += b; |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | std::unique_ptr<SerialPort> SerialPort::openSerialPort(const std::string& path) |
| 295 | { |
no outgoing calls