Squashed 'LYNQ_PUBLIC/' changes from 994e41a76..f3dd8cbdf
f3dd8cbdf [Feature][ZK-92] ftp gpslog to soc with syslog
8bb9992d3 [Feature][API-1508] in NMEA-statement for ZK ,transfer BD to GB
17579bbfa [BugFix][API-1564]fix File descriptor leakage
9c8bb35ff Merge "[Bugfix][API-1561][mtklog] support mtk log slim fota upgrade"
926d2ad75 [Bugfix][API-1561][mtklog] support mtk log slim fota upgrade
4bcc14334 Merge "[Bugfix][ZK-78][FOTA]get process and upgrade status error when start fota up status"
610236b60 [Bugfix][ZK-78][FOTA]get process and upgrade status error when start fota up status
f700d98cb Merge "[Bugfix][API-1473][mdlog] lynq_query_registration_state type Voice lac cid error"
0c874421d [Feature][T8TSK-320]Print the reason for the PDN when disconnected by the modem into the syslog
dac13540e Merge "[Feature][API-1406][API-1113]Adjust SEND_SMS timeout"
31850f3e5 Merge "[Feature][API-1557] FIX libvendor-ril can`t connected RILD issue"
d3a8f5da1 [Feature][API-1557] FIX libvendor-ril can`t connected RILD issue
2f4c07922 Merge "[Feature][T8TSK-316][rtp] rtp confirm to the standard of Geely"
1ee60ec01 Merge "[Bugfix][API-1551[network] lynq_set_vlan_info, vlan_info is "", ret 8004"
98beaeaf3 Merge "[Bugfix][API-1534]After turning on the USB port, delay for 3 seconds to make a call"
786e97304 [Feature][T8TSK-289] missing wom when add telephonyware to LYNQ_PUBLIC repo 0
d25d37156 [Bugfix][API-1534]After turning on the USB port, delay for 3 seconds to make a call
4157623f6 [Feature][T8TSK-316][rtp] rtp confirm to the standard of Geely
c66c73d5d [Bugfix][API-1551[network] lynq_set_vlan_info, vlan_info is "", ret 8004
4bf2e2e0b [Feature][API-1406][API-1113]Adjust SEND_SMS timeout
4b1c33121 [Bugfix][API-1473][mdlog] lynq_query_registration_state type Voice lac cid error
git-subtree-dir: LYNQ_PUBLIC
git-subtree-split: f3dd8cbdf17f75f5c9672368b59c1cd59194fce6
Change-Id: Ie206616813b8064220450958d9f91e5048c08ac2
diff --git a/IC_src/mtk/lib/liblynq-gnss/include/lynq_gnss.h b/IC_src/mtk/lib/liblynq-gnss/include/lynq_gnss.h
index fac71b0..ea02c2e 100755
--- a/IC_src/mtk/lib/liblynq-gnss/include/lynq_gnss.h
+++ b/IC_src/mtk/lib/liblynq-gnss/include/lynq_gnss.h
@@ -110,7 +110,9 @@
int lynq_gnss_epo_switch(LYNQ_CONF_SWITCH switch_op);
int lynq_gnss_output_frequency_set(int frequency);
-
+#ifdef GNSS_BD_TRANSFORM_GB
+int lynq_gnss_bd_transform_enable(int flag);
+#endif
int lynq_agps_set_enabled(LYNQ_CONF_SWITCH agps_status);
int lynq_agps_get_enabled_status(int *status);
diff --git a/IC_src/mtk/lib/liblynq-gnss/makefile b/IC_src/mtk/lib/liblynq-gnss/makefile
index 1d21aef..66084e0 100755
--- a/IC_src/mtk/lib/liblynq-gnss/makefile
+++ b/IC_src/mtk/lib/liblynq-gnss/makefile
@@ -50,6 +50,10 @@
LOCAL_CFLAGS += -DGNSS_CN_OUTPUT_SYSLOG
endif
+ifeq ($(strip $(MOBILETEK_GNSS_BD_TRANSFORM_GB)), yes)
+ LOCAL_CFLAGS += -DGNSS_BD_TRANSFORM_GB
+endif
+
$(warning libs=$(LOCAL_LIBS))
diff --git a/IC_src/mtk/lib/liblynq-gnss/src/lynq_callback.c b/IC_src/mtk/lib/liblynq-gnss/src/lynq_callback.c
index 51dd989..e0102a3 100755
--- a/IC_src/mtk/lib/liblynq-gnss/src/lynq_callback.c
+++ b/IC_src/mtk/lib/liblynq-gnss/src/lynq_callback.c
@@ -25,7 +25,8 @@
#define NMEA_GGA "GGA"
#define NMEA_VTG "VTG"
#define NMEA_GSV "GSV"
-
+#define NMEA_BD "BD"
+#define NMEA_GB "GB"
time_t reopen_start;
extern lynq_gnss_cb* lynq_callbacks;
extern lynq_raw_gnss_cbs *lynq_meas_callbacks;
@@ -75,6 +76,9 @@
int count = 0;
int nmea_count = 0;
#endif
+#ifdef GNSS_BD_TRANSFORM_GB
+extern int BD_transform_GB_flag;
+#endif
static inline int update_systime_time(GpsUtcTime gpstime)
{
@@ -135,6 +139,22 @@
}
}
#endif
+#ifdef GNSS_BD_TRANSFORM_GB
+void BD_transform_GB(char *str)
+{
+ int i;
+ int result;
+
+ strncpy(str + 1, NMEA_GB,strlen(NMEA_GB));
+ result = str[1];
+ for(i = 2; str[i] != '*'; i++)
+ {
+ result ^= str[i];
+ }
+ sprintf(str+i+1,"%02X",result);
+ return;
+}
+#endif
void lynq_gps_nmea_callback(GpsUtcTime timestamp, const char* nmea, int length)
{
@@ -191,6 +211,15 @@
}
}
#endif
+#ifdef GNSS_BD_TRANSFORM_GB
+ char str[128];
+ if(BD_transform_GB_flag == 1 && strncmp(nmea + 1, NMEA_BD,strlen(NMEA_BD)) == 0)
+ {
+ strncpy(str,nmea,strlen(nmea));
+ BD_transform_GB(str);
+ nmea = str;
+ }
+#endif
#ifdef GNSS_ELT_OUTPUT_CFG
if(Open_ELT)
{
diff --git a/IC_src/mtk/lib/liblynq-gnss/src/lynq_gnss.c b/IC_src/mtk/lib/liblynq-gnss/src/lynq_gnss.c
index 053a2fd..c6ad803 100755
--- a/IC_src/mtk/lib/liblynq-gnss/src/lynq_gnss.c
+++ b/IC_src/mtk/lib/liblynq-gnss/src/lynq_gnss.c
@@ -398,6 +398,15 @@
return 0;
}
+#ifdef GNSS_BD_TRANSFORM_GB
+int BD_transform_GB_flag = 0;
+int lynq_gnss_bd_transform_enable(int flag)
+{
+ BD_transform_GB_flag = flag;
+ return 0;
+}
+#endif
+
lynq_atsvc_outcb atsvc_gnss_outcb;
void atsvc_incb_entity(const char *input,const int length);
int lynq_at_cgps(int at_type,char *at_paramter);