From fb9c641bb869301c9b3728608870673693ff593f Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Fri, 10 Oct 2014 10:35:28 -0700 Subject: [PATCH] Added Detection Logic For QMI_PDS Target. Added run time detection of PDS enabled fusion target to loc_target(), to support fusion platforms that has PDS service enabled. Change-Id: Ic53df027540f00eec9259776351b6bbc9afa0521 CRs-Fixed: 699757 --- utils/loc_target.cpp | 9 +++++++-- utils/loc_target.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index d46747ac..8dbe885e 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -46,6 +46,7 @@ #define MSM8930_ID_2 "116" #define APQ8030_ID_1 "157" #define APQ8074_ID_1 "184" +#define PDS_ID_1 "178" #define LINE_LEN 100 #define STR_LIQUID "Liquid" @@ -206,8 +207,12 @@ unsigned int loc_get_target(void) } else { read_a_line(id_dep, rd_id, LINE_LEN); } - - if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){ + if( !memcmp(rd_hw_platform, STR_MTP, LENGTH(STR_MTP)) ){ + if( !memcmp(rd_id, PDS_ID_1, LENGTH(PDS_ID_1)) + && IS_STR_END(rd_id[LENGTH(PDS_ID_1)]) ) + gTarget = TARGET_PDS; + } + else if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){ if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1)) && IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) ) gTarget = TARGET_MPQ; diff --git a/utils/loc_target.h b/utils/loc_target.h index 9aa525fc..208a34cb 100644 --- a/utils/loc_target.h +++ b/utils/loc_target.h @@ -35,6 +35,7 @@ #define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC) #define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC) #define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC) +#define TARGET_PDS TARGET_SET(GNSS_PDS, NO_SSC) #define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC) #define getTargetGnssType(target) (target>>1) @@ -60,6 +61,7 @@ typedef enum { GNSS_GSS, GNSS_MDM, GNSS_QCA1530, + GNSS_PDS, GNSS_UNKNOWN }GNSS_TARGET;