[Bugfix][T106BUG-168][T106BUG-217]when the mode is set to location information,printing of no callback function information after positioning
Only Configure: No
Affected branch: master
Affected module: GNSS
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I434f9dc468a8f8329482e090f84308ad237e7229
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
index 862aeea..f874f59 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
@@ -393,6 +393,12 @@
_mopen_location_info->longitude = atof(tmp_str);
memset(tmp_str, 0, sizeof(tmp_str));
// get product name
+ ret = gnss_get_para_from_nmea(str, tmp_str, 6);
+ if(ret)
+ return;
+ _mopen_location_info->flags = atoi(tmp_str);
+ memset(tmp_str, 0, sizeof(tmp_str));
+ // get product name
ret = gnss_get_para_from_nmea(str, tmp_str, 9);
if(ret)
return;
@@ -495,12 +501,7 @@
{
handle->gnss_handler_func((uint32)handle, E_MT_LOC_MSG_ID_NMEA_INFO, &nmea_info, NULL);
}
- if(handle->gnss_handler_func && handle->mode == 1 &&
- mopen_location_info.latitude &&
- mopen_location_info.longitude &&
- mopen_location_info.altitude &&
- mopen_location_info.timestamp &&
- mopen_location_info.speed)
+ if(handle->gnss_handler_func && handle->mode == 1 && mopen_location_info.timestamp && mopen_location_info.flags)
{
handle->gnss_handler_func((uint32)handle, E_MT_LOC_MSG_ID_LOCATION_INFO, &mopen_location_info, NULL);