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:
parent
09c85861d6
commit
98b9fa2f33
@ -100,6 +100,12 @@ public:
|
|||||||
(void)number_of_locations;
|
(void)number_of_locations;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
inline virtual bool reportNmea(const char* nmea, int length)
|
||||||
|
{
|
||||||
|
(void)nmea;
|
||||||
|
(void)length;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace loc_core
|
} // namespace loc_core
|
||||||
|
@ -70,6 +70,7 @@ extern "C" {
|
|||||||
#define ULP_LOCATION_IS_FROM_PIP 0x0040
|
#define ULP_LOCATION_IS_FROM_PIP 0x0040
|
||||||
|
|
||||||
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
|
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
|
||||||
|
#define ULP_MAX_NMEA_STRING_SIZE 201
|
||||||
|
|
||||||
/*Emergency SUPL*/
|
/*Emergency SUPL*/
|
||||||
#define GPS_NI_TYPE_EMERGENCY_SUPL 4
|
#define GPS_NI_TYPE_EMERGENCY_SUPL 4
|
||||||
@ -97,6 +98,13 @@ typedef struct {
|
|||||||
unsigned char map_index[GPS_LOCATION_MAP_INDEX_SIZE];
|
unsigned char map_index[GPS_LOCATION_MAP_INDEX_SIZE];
|
||||||
} UlpLocation;
|
} UlpLocation;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/** set to sizeof(UlpNmea) */
|
||||||
|
size_t size;
|
||||||
|
char nmea_str[ULP_MAX_NMEA_STRING_SIZE];
|
||||||
|
unsigned int len;
|
||||||
|
} UlpNmea;
|
||||||
|
|
||||||
/** AGPS type */
|
/** AGPS type */
|
||||||
typedef int16_t AGpsExtType;
|
typedef int16_t AGpsExtType;
|
||||||
#define AGPS_TYPE_INVALID -1
|
#define AGPS_TYPE_INVALID -1
|
||||||
|
@ -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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
@ -418,10 +418,17 @@ void LocEngAdapter::reportStatus(GpsStatusValue status)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
void LocInternalAdapter::reportNmea(const char* nmea, int length)
|
||||||
void LocEngAdapter::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
|
inline
|
||||||
|
@ -64,6 +64,7 @@ public:
|
|||||||
virtual void stopFixInt();
|
virtual void stopFixInt();
|
||||||
virtual void getZppInt();
|
virtual void getZppInt();
|
||||||
virtual void setUlpProxy(UlpProxyBase* ulp);
|
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);
|
typedef void (*loc_msg_sender)(void* loc_eng_data_p, void* msgp);
|
||||||
|
@ -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);
|
CALLBACK_LOG_CALLFLOW("nmea_cb", %p, pNmea);
|
||||||
if (loc_eng_data_p->nmea_cb != NULL)
|
if (loc_eng_data_p->nmea_cb != NULL)
|
||||||
loc_eng_data_p->nmea_cb(now, pNmea, length);
|
loc_eng_data_p->nmea_cb(now, pNmea, length);
|
||||||
|
|
||||||
|
loc_eng_data_p->adapter->getUlpProxy()->reportNmea(pNmea, length);
|
||||||
|
|
||||||
LOC_LOGD("NMEA <%s", pNmea);
|
LOC_LOGD("NMEA <%s", pNmea);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user