From 1dfdcabc870cb9a54a2557b6997a87f41c48655b Mon Sep 17 00:00:00 2001 From: "ethan.kim" Date: Wed, 24 Jun 2015 15:46:43 -0700 Subject: [PATCH] Add to check ZPP report condition for NMEA generation NMEA is supposed to be generated only when GPS tracking is going on in GPS HAL but it was also observed when ZPP report, so add a check if isInSession is true to avoid that. Change-Id: Ia6152fe78243d45e71adccce956d0a727c3f17a2 --- loc_api/libloc_api_50001/loc_eng.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 722f99a2..998681f0 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -815,8 +815,14 @@ void LocEngReportPosition::proc() const { locEng->adapter->setInSession(false); } + LOC_LOGV("LocEngReportPosition::proc() - generateNmea: %d, position source: %d, " + "engine_status: %d, isInSession: %d", + locEng->generateNmea, mLocation.position_source, + locEng->engine_status, locEng->adapter->isInSession()); + if (locEng->generateNmea && mLocation.position_source == ULP_LOCATION_IS_FROM_GNSS && + locEng->adapter->isInSession() && mTechMask & (LOC_POS_TECH_MASK_SATELLITE | LOC_POS_TECH_MASK_SENSORS | LOC_POS_TECH_MASK_HYBRID))