Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial FatFileSystemCpp mbed
Diff: VIPSSerialProtocol.cpp
- Revision:
- 8:961bb15570a1
- Parent:
- 7:87aea27cc68b
- Child:
- 10:053bac3e326b
diff -r 87aea27cc68b -r 961bb15570a1 VIPSSerialProtocol.cpp --- a/VIPSSerialProtocol.cpp Fri Feb 12 14:24:55 2021 +0000 +++ b/VIPSSerialProtocol.cpp Tue Feb 16 09:53:54 2021 +0000 @@ -72,7 +72,7 @@ } else { messagePrt=0; } - } else { // in the middle of a message + } else { // in the middle of a message messagePrt++; if (messagePrt==messageLength) { processRxMessage(); @@ -247,9 +247,12 @@ lastPositions[nextPosition].pos.X = *(double *)(messageInBuffer+12); lastPositions[nextPosition].pos.Y = *(double *)(messageInBuffer+20); lastPositions[nextPosition].pos.Height = *(float *)(messageInBuffer+28); + if (mask & 0x0002) { // parse status - - offset +=4; + lastPositions[nextPosition].pos.beacons = messageInBuffer[offset++]; + lastPositions[nextPosition].pos.solutionType = messageInBuffer[offset++]; + lastPositions[nextPosition].pos.KFStatus = *(uint16_t*)(messageInBuffer + offset); + offset +=2; } if (mask & 0x0004) { @@ -336,7 +339,7 @@ // calculate timestamps as a function of time since last frame outputPosition.time = timeValue; int32_t lTime = lastPositions[lastPoint].pos.time; - + int32_t LastTimeMark = lastPositions[lastPoint].time; int32_t PrevTimeMark = lastPositions[prevPoint].time; if (PrevTimeMark > LastTimeMark) {