summaryrefslogtreecommitdiff
path: root/gnss/GnssAdapter.cpp
diff options
context:
space:
mode:
authorqctecmdr Service <qctecmdr@qualcomm.com>2019-01-15 10:36:14 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-01-15 10:36:14 -0800
commit7d9edb3c227a53d146afd00967b9619da33e5fad (patch)
tree4c1daade88f0294cdd5d2768962062ec39a1b8cc /gnss/GnssAdapter.cpp
parent63dca9043692387636fd8b8023129d1ef37b9df9 (diff)
parentabfeea182d6ea4905f80da6f17556da278cce4d4 (diff)
downloadgps-7d9edb3c227a53d146afd00967b9619da33e5fad.tar.gz
Merge "Fix KW P1 related issues"
Diffstat (limited to 'gnss/GnssAdapter.cpp')
-rw-r--r--gnss/GnssAdapter.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 8112a71..791f9d6 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -2000,8 +2000,10 @@ GnssAdapter::restartSessions()
}
// get the LocationOptions that has the smallest interval, which should be the active one
- TrackingOptions smallestIntervalOptions = {}; // size is zero until set for the first time
- TrackingOptions highestPowerTrackingOptions = {};
+ TrackingOptions smallestIntervalOptions; // size is zero until set for the first time
+ TrackingOptions highestPowerTrackingOptions;
+ memset(&smallestIntervalOptions, 0, sizeof(smallestIntervalOptions));
+ memset(&highestPowerTrackingOptions, 0, sizeof(highestPowerTrackingOptions));
for (auto it = mTrackingSessions.begin(); it != mTrackingSessions.end(); ++it) {
// size of zero means we havent set it yet
if (0 == smallestIntervalOptions.size ||
@@ -3023,8 +3025,8 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation,
loc_nmea_generate_pos(ulpLocation, locationExtended, mLocSystemInfo,
generate_nmea, nmeaArraystr);
stringstream ss;
- for (auto sentence : nmeaArraystr) {
- ss << sentence;
+ for (auto itor = nmeaArraystr.begin(); itor != nmeaArraystr.end(); ++itor) {
+ ss << *itor;
}
string s = ss.str();
reportNmea(s.c_str(), s.length());
@@ -3119,8 +3121,8 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
std::vector<std::string> nmeaArraystr;
loc_nmea_generate_sv(svNotify, nmeaArraystr);
stringstream ss;
- for (auto sentence : nmeaArraystr) {
- ss << sentence;
+ for (auto itor = nmeaArraystr.begin(); itor != nmeaArraystr.end(); ++itor) {
+ ss << *itor;
}
string s = ss.str();
reportNmea(s.c_str(), s.length());