Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-gps: Commit

hardware/gps


Commit MetaInfo

Revisión598ad0a81eb4dd7ad2482f092dc494057fd57897 (tree)
Tiempo2015-03-24 10:33:42
AutorKeith Conger <keith.conger@gmai...>
CommiterChih-Wei Huang

Log Message

* Added 4800 baud support

Cambiar Resumen

Diferencia incremental

--- a/gps.c
+++ b/gps.c
@@ -60,7 +60,7 @@ static int id_in_fixed[12];
6060 #define GPS_DEV_SLOW_UPDATE_RATE (10)
6161 #define GPS_DEV_HIGH_UPDATE_RATE (1)
6262
63-#define GPS_DEV_LOW_BAUD (B9600)
63+#define GPS_DEV_LOW_BAUD (B4800)
6464 #define GPS_DEV_HIGH_BAUD (B115200)
6565 static void gps_dev_init(int fd);
6666 static void gps_dev_deinit(int fd);
@@ -966,7 +966,10 @@ gps_state_init( GpsState* state, GpsCallbacks* callbacks )
966966 ios.c_iflag |= (IGNCR | IXOFF); /* Ignore \r & XON/XOFF on input */
967967 // set baud rate and other flags
968968 property_get("ro.kernel.android.gpsttybaud",baud,"9600");
969- if (strcmp(baud, "9600") == 0) {
969+ if (strcmp(baud, "4800") == 0) {
970+ ALOGE("setting gps baud rate to 4800");
971+ ios.c_cflag = B4800 | CRTSCTS | CS8 | CLOCAL | CREAD;
972+ } else if (strcmp(baud, "9600") == 0) {
970973 ALOGE("setting gps baud rate to 9600");
971974 ios.c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
972975 } else if (strcmp(baud, "19200") == 0) {
Show on old repository browser