Merge "[Bugfix][T106BUG-494]can't sync gnss time in ES module"
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 d508438..90a5521 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
@@ -474,6 +474,7 @@
{
int ret = 0;
int i = 0;
+ int location = 17;
static struct mopen_location_info_t mopen_location_info;
static int64_t tmp_time = 0;
mopen_gnss_nmea_info_t nmea_info;
@@ -513,7 +514,9 @@
//set system time.
if (g_gnss_sync_enable_flag == 1 && g_gnss_sync_done == 0)
{
- if( strncmp(data+3,NMEA_RMC,strlen(NMEA_RMC)) == 0 && data[17] == 'A')
+
+ location = (gpio21_value == 0?17:18);
+ if(strncmp(data+3,NMEA_RMC,strlen(NMEA_RMC)) == 0 && data[location] == 'A')
{
if (update_system_time(nmea_info.timestamp) == 0)
{