msm8974-common: gps: NMEA report indication to ULP

Enabled NMEA report indication to ulp

Change-Id: Ia27fe0d805f53bf17c86f7c27eaaedd960101370
CRs-Fixed: 1055201
This commit is contained in:
Naresh Munagala 2016-08-10 17:14:18 +05:30 committed by Kevin F. Haggerty
parent 09c85861d6
commit 98b9fa2f33
No known key found for this signature in database
GPG Key ID: 6D95512933112729
5 changed files with 29 additions and 4 deletions

View File

@ -100,6 +100,12 @@ public:
(void)number_of_locations;
return false;
}
inline virtual bool reportNmea(const char* nmea, int length)
{
(void)nmea;
(void)length;
return false;
}
};
} // namespace loc_core

View File

@ -70,6 +70,7 @@ extern "C" {
#define ULP_LOCATION_IS_FROM_PIP 0x0040
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
#define ULP_MAX_NMEA_STRING_SIZE 201
/*Emergency SUPL*/
#define GPS_NI_TYPE_EMERGENCY_SUPL 4
@ -97,6 +98,13 @@ typedef struct {
unsigned char map_index[GPS_LOCATION_MAP_INDEX_SIZE];
} UlpLocation;
typedef struct {
/** set to sizeof(UlpNmea) */
size_t size;
char nmea_str[ULP_MAX_NMEA_STRING_SIZE];
unsigned int len;
} UlpNmea;
/** AGPS type */
typedef int16_t AGpsExtType;
#define AGPS_TYPE_INVALID -1

View File

@ -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
@ -418,10 +418,17 @@ void LocEngAdapter::reportStatus(GpsStatusValue status)
}
}
inline
void LocEngAdapter::reportNmea(const char* nmea, int length)
void LocInternalAdapter::reportNmea(const char* nmea, int length)
{
sendMsg(new LocEngReportNmea(mOwner, nmea, length));
sendMsg(new LocEngReportNmea(mLocEngAdapter->getOwner(), nmea, length));
}
inline void LocEngAdapter::reportNmea(const char* nmea, int length)
{
if (!mUlp->reportNmea(nmea, length)) {
//Report it to HAL
mInternalAdapter->reportNmea(nmea, length);
}
}
inline

View File

@ -64,6 +64,7 @@ public:
virtual void stopFixInt();
virtual void getZppInt();
virtual void setUlpProxy(UlpProxyBase* ulp);
virtual void reportNmea(const char* nmea, int length);
};
typedef void (*loc_msg_sender)(void* loc_eng_data_p, void* msgp);

View File

@ -62,6 +62,9 @@ void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_dat
CALLBACK_LOG_CALLFLOW("nmea_cb", %p, pNmea);
if (loc_eng_data_p->nmea_cb != NULL)
loc_eng_data_p->nmea_cb(now, pNmea, length);
loc_eng_data_p->adapter->getUlpProxy()->reportNmea(pNmea, length);
LOC_LOGD("NMEA <%s", pNmea);
}