#define GPSD_NMEA "r+\r\n"
#define GPSD_PORT (2947)
+#define LOCALHOST "127.0.0.1"
+#define GPS_DEVICE_FILE "/dev/ttyS0"
const GpsTypes gps_types[] = {
#ifdef WITH_BLUEZ
#ifdef WITH_BLUEZ_DBUS_BT
{ GPS_IO_BLUEZ_DBUS, "Bluetooth connection (new)", TRUE, TRUE, FALSE},
#endif
- { GPS_IO_GPSD, "GPSD Connection", FALSE, TRUE, TRUE, GPSD_PORT },
- { GPS_IO_FILE, "File or device", FALSE, TRUE, FALSE},
- { GPS_IO_TCP, "TCP Connection", FALSE, TRUE, TRUE, 1024 },
+ { GPS_IO_GPSD, "GPSD Connection", FALSE, TRUE, TRUE, GPSD_PORT, LOCALHOST },
+ { GPS_IO_FILE, "File or device", FALSE, TRUE, FALSE, 0, GPS_DEVICE_FILE },
+ { GPS_IO_TCP, "TCP Connection", FALSE, TRUE, TRUE, 1024, LOCALHOST },
#ifdef WITH_GYPSY
- { GPS_IO_GYPSY, "Gypsy", FALSE, TRUE, FALSE},
+ { GPS_IO_GYPSY, "Gypsy", FALSE, TRUE, FALSE },
#endif
{ GPS_IO_SIMULATION, "Simulation (random)", FALSE, FALSE, FALSE},
{ 0 }
g_debug("GPS: Requesting NMEA mode from GPSD using cmd %s", GPSD_NMEA);
status=g_io_channel_write_chars(gps->io.channel, GPSD_NMEA, strlen(GPSD_NMEA), &written, &error);
if (status==G_IO_STATUS_NORMAL && written==strlen(GPSD_NMEA)) {
- g_debug("GPS: NMEA mode set (%d %d)", written, status);
+ g_debug("GPS: NMEA mode set (%d %d)", (gint)written, (gint)status);
} else {
- g_printerr("Failed to set gpsd to NMEA mode: %d %d %s\n",status, written, error->message);
+ g_printerr("Failed to set gpsd to NMEA mode: %d %d %s\n",(gint)status,(gint)written, error->message);
g_error_free(error);
gps_disconnect(gps);
gps_connect_later(gps);