diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-05-23 11:43:01 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-05-23 11:43:01 -0700 |
commit | 3255d3fe903fb92d3ba61d566d60d3d68655839a (patch) | |
tree | bf604c11a8a8f0cd1d551b1d094974deb29a4447 | |
parent | 1d4b267d062fb949824bef20c01115815336a69d (diff) | |
parent | 2ca4d2845ef166c6ddf9eab83f15fad33dd72052 (diff) |
Merge 2ca4d2845ef166c6ddf9eab83f15fad33dd72052 on remote branch
Change-Id: I897c31ed568e4a5a5f4dad967c0594efc9b4595d
-rw-r--r-- | core/SystemStatus.cpp | 5 | ||||
-rw-r--r-- | core/SystemStatus.h | 3 | ||||
-rw-r--r-- | gnss/GnssAdapter.cpp | 46 | ||||
-rw-r--r-- | utils/gps_extended_c.h | 11 |
4 files changed, 56 insertions, 9 deletions
diff --git a/core/SystemStatus.cpp b/core/SystemStatus.cpp index f206b00..82f1314 100644 --- a/core/SystemStatus.cpp +++ b/core/SystemStatus.cpp @@ -1602,9 +1602,10 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem) @return true when successfully done ******************************************************************************/ -bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly) const { +bool SystemStatus::getReport(SystemStatusReports& report, bool isLatestOnly, + bool inSessionOnly) const { pthread_mutex_lock(&mMutexSystemStatus); - if (!mTracking) { + if (inSessionOnly && !mTracking) { pthread_mutex_unlock(&mMutexSystemStatus); return true; } diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 78d58ea..1e155c1 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -887,7 +887,8 @@ public: bool eventPosition(const UlpLocation& location,const GpsLocationExtended& locationEx); bool eventDataItemNotify(IDataItemCore* dataitem); bool setNmeaString(const char *data, uint32_t len); - bool getReport(SystemStatusReports& reports, bool isLatestonly = false) const; + bool getReport(SystemStatusReports& reports, bool isLatestonly = false, + bool inSessionOnly = true) const; bool setDefaultGnssEngineStates(void); bool eventConnectionStatus(bool connected, int8_t type, bool roaming, NetworkHandle networkHandle, string& apn); diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index a39d0b3..ee69235 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -26,6 +26,43 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +/* +Changes from Qualcomm Innovation Center are provided under the following license: + +Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted (subject to the limitations in the +disclaimer below) provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE +GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT +HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + #define LOG_NDEBUG 0 #define LOG_TAG "LocSvc_GnssAdapter" @@ -2657,7 +2694,8 @@ GnssAdapter::updateClientsEventMask() // need to register for leap second info // for proper nmea generation LOC_API_ADAPTER_EVENT_MASK_T mask = LOC_API_ADAPTER_BIT_LOC_SYSTEM_INFO | - LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO; + LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO | + LOC_API_ADAPTER_BIT_FEATURE_STATUS_UPDATE; for (auto it=mClientData.begin(); it != mClientData.end(); ++it) { if (it->second.trackingCb != nullptr || it->second.gnssLocationInfoCb != nullptr || @@ -5875,7 +5913,7 @@ bool GnssAdapter::getDebugReport(GnssDebugReport& r) } SystemStatusReports reports; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); r.size = sizeof(r); @@ -5982,7 +6020,7 @@ GnssAdapter::getAgcInformation(GnssMeasurementsNotification& measurements, int m if (nullptr != systemstatus) { SystemStatusReports reports = {}; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) && (abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) { @@ -6037,7 +6075,7 @@ GnssAdapter::getDataInformation(GnssDataNotification& data, int msInWeek) LOC_LOGV("%s]: msInWeek=%d", __func__, msInWeek); if (nullptr != systemstatus) { SystemStatusReports reports = {}; - systemstatus->getReport(reports, true); + systemstatus->getReport(reports, true, false); if ((!reports.mRfAndParams.empty()) && (!reports.mTimeAndClock.empty()) && (abs(msInWeek - (int)reports.mTimeAndClock.back().mGpsTowMs) < 2000)) { diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index 8217a80..9a64c80 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -183,7 +183,12 @@ typedef enum { LOC_SUPPORTED_FEATURE_DSDA_CONFIGURATION, /**< Support the Multiple Attribution Apps(UTH clients Lock control) feature */ LOC_SUPPORTED_FEATURE_MULTIPLE_ATTRIBUTION_APPS, - LOC_SUPPORTED_FEATURE_QMI_FLP_NLP_SOURCE, /**< Support the FLP, NLP Z-Source provider feature */ + /**< Support the FLP, NLP Z-Source provider feature */ + LOC_SUPPORTED_FEATURE_QMI_FLP_NLP_SOURCE, + /**< Support the feature to report engine debug data */ + LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA, + /**< Support the feature to report feature update in QMI_LOC_EVENT_REPORT_IND */ + LOC_SUPPORTED_FEATURE_DYNAMIC_FEATURE_STATUS } loc_supported_feature_enum; typedef struct { @@ -1053,7 +1058,8 @@ enum loc_api_adapter_event_index { LOC_API_ADAPTER_LOC_SYSTEM_INFO, // Location system info event LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT, // GNSS SV nHz measurement report LOC_API_ADAPTER_EVENT_REPORT_INFO, // Event report info - LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT, // Latency information report + LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT, // Latency information report + LOC_API_ADAPTER_FEATURE_STATUS_UPDATE, // Dynamic feature status update LOC_API_ADAPTER_EVENT_MAX }; @@ -1097,6 +1103,7 @@ enum loc_api_adapter_event_index { #define LOC_API_ADAPTER_BIT_GNSS_NHZ_MEASUREMENT (1ULL<<LOC_API_ADAPTER_GNSS_NHZ_MEASUREMENT_REPORT) #define LOC_API_ADAPTER_BIT_EVENT_REPORT_INFO (1ULL<<LOC_API_ADAPTER_EVENT_REPORT_INFO) #define LOC_API_ADAPTER_BIT_LATENCY_INFORMATION (1ULL<<LOC_API_ADAPTER_LATENCY_INFORMATION_REPORT) +#define LOC_API_ADAPTER_BIT_FEATURE_STATUS_UPDATE (1ULL<<LOC_API_ADAPTER_FEATURE_STATUS_UPDATE) typedef uint64_t LOC_API_ADAPTER_EVENT_MASK_T; |