We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb7f946 commit 67df92eCopy full SHA for 67df92e
hc_nmea.c
@@ -122,6 +122,7 @@
122
#include <sys/stat.h>
123
#include <fcntl.h>
124
#include <time.h>
125
+#include <termios.h>
126
127
#include "houseclock.h"
128
#include "hc_db.h"
@@ -214,6 +215,16 @@ int hc_nmea_initialize (int argc, const char **argv) {
214
215
hc_nmea_reset();
216
gpsTty = open(gpsDevice, O_RDONLY);
217
218
+ // Remove echo of characters from the GPS device.
219
+ if (gpsTty >= 0) {
220
+ struct termios options;
221
+ int status = tcgetattr(gpsTty, &options);
222
+ if (status == 0) {
223
+ options.c_lflag &= (~(ECHO+ECHONL));
224
+ tcsetattr(gpsTty, TCSANOW, &options);
225
+ }
226
227
+
228
gpsInitialized = time(0);
229
return gpsTty;
230
}
0 commit comments