From acf1cba02df7a3b10161b95628fcdf9f88d67e14 Mon Sep 17 00:00:00 2001 From: Madhanraj Chelladurai Date: Thu, 23 Mar 2017 17:15:04 +0530 Subject: [PATCH] nmea: call the right function for reporting AP generated NMEA When AP generates NMEA, we need call the right function to forward the sentence to Adapter and then to framework. Change-Id: I537c19f900b7d72ec38dc29b789329c52c0b2811 CRs-Fixed: 2023810 --- gnss/GnssAdapter.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 66211714..952af9c0 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -2043,7 +2043,6 @@ GnssAdapter::reportNmea(const char* nmea, size_t length) it->second.gnssNmeaCb(nmeaNotification); } } - } bool @@ -2374,23 +2373,23 @@ GnssAdapter::generateNmeaBlank() strlcpy(sentence, "$GPGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence)); length = nmeaPutChecksum(sentence, sizeof(sentence)); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); strlcpy(sentence, "$GNGSA,A,1,,,,,,,,,,,,,,,", sizeof(sentence)); length = nmeaPutChecksum(sentence, sizeof(sentence)); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); strlcpy(sentence, "$GPVTG,,T,,M,,N,,K,N", sizeof(sentence)); length = nmeaPutChecksum(sentence, sizeof(sentence)); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); strlcpy(sentence, "$GPRMC,,V,,,,,,,,,,N", sizeof(sentence)); length = nmeaPutChecksum(sentence, sizeof(sentence)); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); strlcpy(sentence, "$GPGGA,,,,,,0,,,,,,,,", sizeof(sentence)); length = nmeaPutChecksum(sentence, sizeof(sentence)); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); } void @@ -2425,7 +2424,7 @@ GnssAdapter::generateNmeaGSV(const GnssSvNotification& svNotify, NmeaSvMeta& svM // no svs in view, so just send a blank $--GSV sentence snprintf(sentence, lengthRemaining, "$%sGSV,1,1,0,", svMeta.talker); length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); return; } @@ -2477,7 +2476,7 @@ GnssAdapter::generateNmeaGSV(const GnssSvNotification& svNotify, NmeaSvMeta& svM } length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); sentenceNumber++; } //while } @@ -2567,7 +2566,7 @@ GnssAdapter::generateNmeaGSA(const GpsLocationExtended& locationExtended, /* Sentence is ready, add checksum and broadcast */ length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); return svUsedCount; } @@ -2642,7 +2641,7 @@ GnssAdapter::generateNmeaVTG(const UlpLocation& ulpLocation, length = snprintf(pMarker, lengthRemaining, "%c", 'D'); // D means differential length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); } void @@ -2786,7 +2785,7 @@ GnssAdapter::generateNmeaRMC(const UlpLocation& ulpLocation, } length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); } void @@ -2914,7 +2913,7 @@ GnssAdapter::generateNmeaGGA(const UlpLocation& ulpLocation, } length = nmeaPutChecksum(sentence, size); - reportNmeaEvent(sentence, length); + reportNmea(sentence, length); } /* INIT LOC AGPS MANAGER */