Merge "Send status report msg through ULP"
This commit is contained in:
commit
0561631818
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) {}
|
||||
};
|
||||
|
|
|
@ -173,10 +173,16 @@ void LocEngAdapter::setInSession(bool inSession)
|
|||
}
|
||||
}
|
||||
|
||||
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