Fix:vehicle: Change how port is read|
authorzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 9 Nov 2008 19:18:14 +0000 (19:18 +0000)
committerzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 9 Nov 2008 19:18:14 +0000 (19:18 +0000)
Now instead of 32/114/64 byte chunks it gives 275 bytes in one read,
that is the whole sequence reported by the gps.

git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1715 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/vehicle/file/vehicle_file.c

index c9c6dee..c6c36db 100644 (file)
@@ -49,7 +49,7 @@ enum file_type {
        file_type_pipe = 1, file_type_device, file_type_file
 };
 
-static int buffer_size = 256;
+static int buffer_size = 1024;
 
 struct vehicle_priv {
        char *source;
@@ -193,8 +193,8 @@ vehicle_file_open(struct vehicle_priv *priv)
                        cfmakeraw(&tio);
                        cfsetispeed(&tio, priv->baudrate);
                        cfsetospeed(&tio, priv->baudrate);
-                       tio.c_cc[VMIN] = 16;
-                       tio.c_cc[VTIME] = 1;
+                       tio.c_cc[VMIN] = 200;
+                       tio.c_cc[VTIME] = 0;
                        tcsetattr(priv->fd, TCSANOW, &tio);
                        priv->file_type = file_type_device;
                }