diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index e9201a6c51..378cff68e4 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -31,6 +31,15 @@ config SENSORS_GPS ---help--- Allow application to use gps by /dev/uorb/gps or /dev/ttyGPS +config SENSORS_GPS_RECV_BUFFERSIZE + int "The size of recvive buffer for nmea message in gps driver" + default 2048 + depends on SENSORS_GPS + ---help--- + The size of recvive buffer for nmea message in gps driver, if + the nmea message happen overwrite when driver push, you can increase + the size. + config SENSORS_WTGAHRS2 bool "Wtgahrs2 Sensor Support" default n diff --git a/drivers/sensors/gps_uorb.c b/drivers/sensors/gps_uorb.c index 257a34f37a..cfa81efac0 100644 --- a/drivers/sensors/gps_uorb.c +++ b/drivers/sensors/gps_uorb.c @@ -44,7 +44,6 @@ #define GPS_SATELLITE_IDX 1 #define GPS_MAX_IDX 2 -#define GPS_RECV_BUFFERSIZE 2048 #define GPS_PARSE_BUFFERSIZE 256 #define GPS_KNOT_TO_KMH 1.852f @@ -685,7 +684,8 @@ int gps_register(FAR struct gps_lowerhalf_s *lower, int devno, goto satellite_err; } - ret = circbuf_init(&upper->buffer, NULL, GPS_RECV_BUFFERSIZE); + ret = circbuf_init(&upper->buffer, NULL, + CONFIG_SENSORS_GPS_RECV_BUFFERSIZE); if (ret < 0) { goto circ_err;