Csr location class shows location and satellite information, which supports H13467 + ST F103RB/NXP LCP1549 boards now.
Dependents: CsrLocationDemo CsrLocationDemo
Fork of CsrLocation by
Diff: CsrLocation.cpp
- Revision:
- 15:ee388b77d730
- Parent:
- 14:bb86a6ca6662
- Child:
- 16:37d3ea06cbb4
--- a/CsrLocation.cpp Wed Nov 05 02:26:49 2014 +0000 +++ b/CsrLocation.cpp Wed Nov 05 13:23:21 2014 +0000 @@ -193,7 +193,7 @@ uint32_t CSRLocation::ioctl(uint32_t command, void *arg) { uint32_t ret = 0; - + CSR_LOG_INFO("ioctl command 0x%lx\r\n", command); switch(command) { @@ -236,7 +236,7 @@ ret = 0xFFFFFFFF; break; } - + return ret; } @@ -574,7 +574,7 @@ /* report NMEA */ outputHandler(LOC_OUTPUT_NMEA, serialPkt, strlen((char *)serialPkt)); -#if 0 +#if 0 tLocPosResp pos; const char *pNmeaGga = "GPGGA"; float deg, min; @@ -584,7 +584,6 @@ int valid; int i, cnt; - if (strncmp((char *)serialPkt, pNmeaGga, strlen(pNmeaGga)) == 0) { cnt = 0; for (i = 0; i < (int)strlen((char *)serialPkt); i++) { @@ -603,7 +602,7 @@ if (valid == 0) { return; } - + /* Parse GPGGA and output position information */ memset(&pos, 0, sizeof(tLocPosResp)); if (sscanf((char *)serialPkt, "GPGGA,%f,%lf,%c,%lf,%c,%d,%d,%f,%lf", &pos.u.utcTime, &pos.lat, &ns, &pos.lon, &ew, &valid, &svUsed, &horDop,