mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-25 14:42:57 +00:00
checking error
This commit is contained in:
parent
073d36e77f
commit
f29b5afe64
@ -101,7 +101,7 @@ int Nmea_Printer::init_serial (std::string serial_device)
|
|||||||
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
fd = open(serial_device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
|
||||||
if (fd == -1) return fd; //failed to open TTY port
|
if (fd == -1) return fd; //failed to open TTY port
|
||||||
|
|
||||||
fcntl(fd, F_SETFL, 0); // clear all flags on descriptor, enable direct I/O
|
if(fcntl(fd, F_SETFL, 0) == -1) LOG(INFO) << "Error enabling direct I/O"; // clear all flags on descriptor, enable direct I/O
|
||||||
tcgetattr(fd, &options); // read serial port options
|
tcgetattr(fd, &options); // read serial port options
|
||||||
|
|
||||||
BAUD = B9600;
|
BAUD = B9600;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user