Promotion of location.lnx.1.0-00036.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 992647 Ib886b96b2e95dafc151bead041e5fc3d6740c468 gps: include support to check hardware type property 1007417 Icc71de1fab3fd5967901c39a5c11eaea17b7766c Default apn ip type to ipv4 1005413 1006831 I3a9e2219c1c9b4ca127a4b55f71b0a78a84cdd11 Use QMI_LOC_SET_NMEA_TYPES to set the NMEA sentences req Change-Id: I9f01953ba3c18819c8a1a90dad18e350ddc93531 CRs-Fixed: 1007417, 1006831, 1005413, 992647
This commit is contained in:
commit
bc1348c515
8 changed files with 101 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -445,6 +445,10 @@ enum loc_api_adapter_err LocApiBase::
|
|||
setSUPLVersion(uint32_t version)
|
||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||
|
||||
enum loc_api_adapter_err LocApiBase::
|
||||
setNMEATypes (uint32_t typesMask)
|
||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||
|
||||
enum loc_api_adapter_err LocApiBase::
|
||||
setLPPConfig(uint32_t profile)
|
||||
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -171,6 +171,8 @@ public:
|
|||
informNiResponse(GpsUserResponseType userResponse, const void* passThroughData);
|
||||
virtual enum loc_api_adapter_err
|
||||
setSUPLVersion(uint32_t version);
|
||||
virtual enum loc_api_adapter_err
|
||||
setNMEATypes (uint32_t typesMask);
|
||||
virtual enum loc_api_adapter_err
|
||||
setLPPConfig(uint32_t profile);
|
||||
virtual enum loc_api_adapter_err
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -346,6 +346,34 @@ typedef uint32_t LocPosTechMask;
|
|||
#define LOC_POS_TECH_MASK_AFLT ((LocPosTechMask)0x00000040)
|
||||
#define LOC_POS_TECH_MASK_HYBRID ((LocPosTechMask)0x00000080)
|
||||
|
||||
// Nmea sentence types mask
|
||||
typedef uint32_t NmeaSentenceTypesMask;
|
||||
#define LOC_NMEA_MASK_GGA_V02 ((NmeaSentenceTypesMask)0x00000001) /**< Enable GGA type */
|
||||
#define LOC_NMEA_MASK_RMC_V02 ((NmeaSentenceTypesMask)0x00000002) /**< Enable RMC type */
|
||||
#define LOC_NMEA_MASK_GSV_V02 ((NmeaSentenceTypesMask)0x00000004) /**< Enable GSV type */
|
||||
#define LOC_NMEA_MASK_GSA_V02 ((NmeaSentenceTypesMask)0x00000008) /**< Enable GSA type */
|
||||
#define LOC_NMEA_MASK_VTG_V02 ((NmeaSentenceTypesMask)0x00000010) /**< Enable VTG type */
|
||||
#define LOC_NMEA_MASK_PQXFI_V02 ((NmeaSentenceTypesMask)0x00000020) /**< Enable PQXFI type */
|
||||
#define LOC_NMEA_MASK_PSTIS_V02 ((NmeaSentenceTypesMask)0x00000040) /**< Enable PSTIS type */
|
||||
#define LOC_NMEA_MASK_GLGSV_V02 ((NmeaSentenceTypesMask)0x00000080) /**< Enable GLGSV type */
|
||||
#define LOC_NMEA_MASK_GNGSA_V02 ((NmeaSentenceTypesMask)0x00000100) /**< Enable GNGSA type */
|
||||
#define LOC_NMEA_MASK_GNGNS_V02 ((NmeaSentenceTypesMask)0x00000200) /**< Enable GNGNS type */
|
||||
#define LOC_NMEA_MASK_GARMC_V02 ((NmeaSentenceTypesMask)0x00000400) /**< Enable GARMC type */
|
||||
#define LOC_NMEA_MASK_GAGSV_V02 ((NmeaSentenceTypesMask)0x00000800) /**< Enable GAGSV type */
|
||||
#define LOC_NMEA_MASK_GAGSA_V02 ((NmeaSentenceTypesMask)0x00001000) /**< Enable GAGSA type */
|
||||
#define LOC_NMEA_MASK_GAVTG_V02 ((NmeaSentenceTypesMask)0x00002000) /**< Enable GAVTG type */
|
||||
#define LOC_NMEA_MASK_GAGGA_V02 ((NmeaSentenceTypesMask)0x00004000) /**< Enable GAGGA type */
|
||||
#define LOC_NMEA_MASK_PQGSA_V02 ((NmeaSentenceTypesMask)0x00008000) /**< Enable PQGSA type */
|
||||
#define LOC_NMEA_MASK_PQGSV_V02 ((NmeaSentenceTypesMask)0x00010000) /**< Enable PQGSV type */
|
||||
#define LOC_NMEA_ALL_SUPPORTED_MASK (LOC_NMEA_MASK_GGA_V02 | LOC_NMEA_MASK_RMC_V02 | \
|
||||
LOC_NMEA_MASK_GSV_V02 | LOC_NMEA_MASK_GSA_V02 | LOC_NMEA_MASK_VTG_V02 | \
|
||||
LOC_NMEA_MASK_PQXFI_V02 | LOC_NMEA_MASK_PSTIS_V02 | LOC_NMEA_MASK_GLGSV_V02 | \
|
||||
LOC_NMEA_MASK_GNGSA_V02 | LOC_NMEA_MASK_GNGNS_V02 | LOC_NMEA_MASK_GARMC_V02 | \
|
||||
LOC_NMEA_MASK_GAGSV_V02 | LOC_NMEA_MASK_GAGSA_V02 | LOC_NMEA_MASK_GAVTG_V02 | \
|
||||
LOC_NMEA_MASK_GAGGA_V02 | LOC_NMEA_MASK_PQGSA_V02 | LOC_NMEA_MASK_PQGSV_V02 )
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC = 0,
|
||||
LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -185,6 +185,11 @@ public:
|
|||
{
|
||||
return mLocApi->setSUPLVersion(version);
|
||||
}
|
||||
inline enum loc_api_adapter_err
|
||||
setNMEATypes (uint32_t typesMask)
|
||||
{
|
||||
return mLocApi->setNMEATypes(typesMask);
|
||||
}
|
||||
inline enum loc_api_adapter_err
|
||||
setLPPConfig(uint32_t profile)
|
||||
{
|
||||
|
|
|
@ -731,7 +731,7 @@ static int loc_agps_open_with_apniptype(const char* apn, ApnIpType apnIpType)
|
|||
bearerType = AGPS_APN_BEARER_IPV4V6;
|
||||
break;
|
||||
default:
|
||||
bearerType = AGPS_APN_BEARER_INVALID;
|
||||
bearerType = AGPS_APN_BEARER_IPV4;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -497,6 +497,31 @@ struct LocEngSuplMode : public LocMsg {
|
|||
}
|
||||
};
|
||||
|
||||
// case LOC_ENG_MSG_SET_NMEA_TYPE:
|
||||
struct LocEngSetNmeaTypes : public LocMsg {
|
||||
LocEngAdapter* mAdapter;
|
||||
uint32_t nmeaTypesMask;
|
||||
inline LocEngSetNmeaTypes(LocEngAdapter* adapter,
|
||||
uint32_t typesMask) :
|
||||
LocMsg(), mAdapter(adapter), nmeaTypesMask(typesMask)
|
||||
{
|
||||
locallog();
|
||||
}
|
||||
inline virtual void proc() const {
|
||||
// set the nmea types
|
||||
mAdapter->setNMEATypes(nmeaTypesMask);
|
||||
}
|
||||
inline void locallog() const
|
||||
{
|
||||
LOC_LOGV("LocEngSetNmeaTypes %u\n",nmeaTypesMask);
|
||||
}
|
||||
inline virtual void log() const
|
||||
{
|
||||
locallog();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// case LOC_ENG_MSG_LPP_CONFIG:
|
||||
struct LocEngLppConfig : public LocMsg {
|
||||
LocEngAdapter* mAdapter;
|
||||
|
@ -1749,7 +1774,7 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks,
|
|||
event = event ^ LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT; // unregister for modem NMEA report
|
||||
loc_eng_data.generateNmea = true;
|
||||
}
|
||||
else
|
||||
else if (gps_conf.NMEA_PROVIDER == NMEA_PROVIDER_MP)
|
||||
{
|
||||
loc_eng_data.generateNmea = false;
|
||||
}
|
||||
|
@ -1779,6 +1804,13 @@ static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data)
|
|||
sap_conf.SENSOR_PROVIDER));
|
||||
adapter->sendMsg(new LocEngAGlonassProtocol(adapter, gps_conf.A_GLONASS_POS_PROTOCOL_SELECT));
|
||||
|
||||
if (!loc_eng_data.generateNmea)
|
||||
{
|
||||
NmeaSentenceTypesMask typesMask = LOC_NMEA_ALL_SUPPORTED_MASK;
|
||||
LOC_LOGD("loc_eng_init setting nmea types, mask = %u\n",typesMask);
|
||||
adapter->sendMsg(new LocEngSetNmeaTypes(adapter,typesMask));
|
||||
}
|
||||
|
||||
/* Make sure at least one of the sensor property is specified by the user in the gps.conf file. */
|
||||
if( sap_conf.GYRO_BIAS_RANDOM_WALK_VALID ||
|
||||
sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID ||
|
||||
|
|
|
@ -174,6 +174,20 @@ void loc_get_platform_name(char *platform_name, int array_length)
|
|||
}
|
||||
}
|
||||
|
||||
/*The character array passed to this function should have length
|
||||
of atleast PROPERTY_VALUE_MAX*/
|
||||
void loc_get_auto_platform_name(char *platform_name, int array_length)
|
||||
{
|
||||
if(platform_name && (array_length >= PROPERTY_VALUE_MAX)) {
|
||||
property_get("ro.hardware.type", platform_name, "");
|
||||
LOC_LOGD("%s:%d]: Autoplatform name: %s\n", __func__, __LINE__, platform_name);
|
||||
}
|
||||
else {
|
||||
LOC_LOGE("%s:%d]: Null parameter or array length less than PROPERTY_VALUE_MAX\n",
|
||||
__func__, __LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int loc_get_target(void)
|
||||
{
|
||||
if (gTarget != (unsigned int)-1)
|
||||
|
@ -190,6 +204,7 @@ unsigned int loc_get_target(void)
|
|||
char rd_id[LINE_LEN];
|
||||
char rd_mdm[LINE_LEN];
|
||||
char baseband[LINE_LEN];
|
||||
char rd_auto_platform[LINE_LEN];
|
||||
|
||||
if (is_qca1530()) {
|
||||
gTarget = TARGET_QCA1530;
|
||||
|
@ -208,7 +223,10 @@ unsigned int loc_get_target(void)
|
|||
} else {
|
||||
read_a_line(id_dep, rd_id, LINE_LEN);
|
||||
}
|
||||
if( !memcmp(baseband, STR_AUTO, LENGTH(STR_AUTO)) )
|
||||
|
||||
/*check automotive platform*/
|
||||
loc_get_auto_platform_name(rd_auto_platform, sizeof(rd_auto_platform));
|
||||
if( !memcmp(rd_auto_platform, STR_AUTO, LENGTH(STR_AUTO)) )
|
||||
{
|
||||
gTarget = TARGET_AUTO;
|
||||
goto detected;
|
||||
|
|
|
@ -52,6 +52,10 @@ void loc_get_target_baseband(char *baseband, int array_length);
|
|||
/*The character array passed to this function should have length
|
||||
of atleast PROPERTY_VALUE_MAX*/
|
||||
void loc_get_platform_name(char *platform_name, int array_length);
|
||||
/*The character array passed to this function should have length
|
||||
of atleast PROPERTY_VALUE_MAX*/
|
||||
void loc_get_auto_platform_name(char *platform_name, int array_length);
|
||||
|
||||
/*Reads the property ro.lean to identify if this is a lean target
|
||||
Returns:
|
||||
0 if not a lean and mean target
|
||||
|
|
Loading…
Reference in a new issue