Send status report msg through ULP
In order to preserve the ordering of position reports and status reports from the GPS engine, status reports are sent through the ULP too CRS-Fixed: 538143 Change-Id: I41be2121493c6a0b35a5726fd546eb0fa5e9b20c
This commit is contained in:
parent
e585cc23fe
commit
41d3c44644
5 changed files with 18 additions and 7 deletions
|
@ -54,6 +54,9 @@ public:
|
|||
void* svExt) {
|
||||
return false;
|
||||
}
|
||||
inline virtual bool reportStatus(GpsStatusValue status) {
|
||||
return false;
|
||||
}
|
||||
inline virtual void setAdapter(LocAdapterBase* adapter) {}
|
||||
inline virtual void setCapabilities(unsigned long capabilities) {}
|
||||
};
|
||||
|
|
|
@ -157,10 +157,16 @@ void LocEngAdapter::reportSv(GpsSvStatus &svStatus,
|
|||
}
|
||||
}
|
||||
|
||||
inline
|
||||
void LocInternalAdapter::reportStatus(GpsStatusValue status)
|
||||
{
|
||||
sendMsg(new LocEngReportStatus(mLocEngAdapter, status));
|
||||
}
|
||||
|
||||
void LocEngAdapter::reportStatus(GpsStatusValue status)
|
||||
{
|
||||
sendMsg(new LocEngReportStatus(mOwner, status));
|
||||
if (!mUlp->reportStatus(status)) {
|
||||
mInternalAdapter->reportStatus(status);
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
virtual void reportSv(GpsSvStatus &svStatus,
|
||||
GpsLocationExtended &locationExtended,
|
||||
void* svExt);
|
||||
virtual void reportStatus(GpsStatusValue status);
|
||||
virtual void setPositionModeInt(LocPosMode& posMode);
|
||||
virtual void startFixInt();
|
||||
virtual void stopFixInt();
|
||||
|
|
|
@ -821,15 +821,16 @@ void LocEngReportSv::send() const {
|
|||
}
|
||||
|
||||
// case LOC_ENG_MSG_REPORT_STATUS:
|
||||
LocEngReportStatus::LocEngReportStatus(void* locEng,
|
||||
LocEngReportStatus::LocEngReportStatus(LocAdapterBase* adapter,
|
||||
GpsStatusValue engineStatus) :
|
||||
LocMsg(), mLocEng(locEng), mStatus(engineStatus)
|
||||
LocMsg(), mAdapter(adapter), mStatus(engineStatus)
|
||||
{
|
||||
locallog();
|
||||
}
|
||||
inline void LocEngReportStatus::proc() const
|
||||
{
|
||||
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*) mLocEng;
|
||||
LocEngAdapter* adapter = (LocEngAdapter*)mAdapter;
|
||||
loc_eng_data_s_type* locEng = (loc_eng_data_s_type*)adapter->getOwner();
|
||||
|
||||
loc_eng_report_status(*locEng, mStatus);
|
||||
update_aiding_data_for_deletion(*locEng);
|
||||
|
|
|
@ -119,9 +119,9 @@ struct LocEngReportSv : public LocMsg {
|
|||
};
|
||||
|
||||
struct LocEngReportStatus : public LocMsg {
|
||||
void* mLocEng;
|
||||
LocAdapterBase* mAdapter;
|
||||
const GpsStatusValue mStatus;
|
||||
LocEngReportStatus(void* locEng,
|
||||
LocEngReportStatus(LocAdapterBase* adapter,
|
||||
GpsStatusValue engineStatus);
|
||||
virtual void proc() const;
|
||||
void locallog() const;
|
||||
|
|
Loading…
Reference in a new issue