diff --git a/README.md b/README.md index faf7588..060efbc 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ the messages according to OpenDLV Standard Message Set into session 111 in Google Protobuf format, simply start it as follows: ``` -docker run --init --rm --net=host chalmersrevere/opendlv-device-gps-pos-multi:v0.0.11 --pos_ip=192.168.1.77 --pos_port=5602 --cid=111 --verbose +docker run --init --rm --net=host chalmersrevere/opendlv-device-gps-pos-multi:v0.0.12 --pos_ip=192.168.1.77 --pos_port=5602 --cid=111 --verbose ``` ## Build from sources on the example of Ubuntu 16.04 LTS diff --git a/src/pos-decoder.cpp b/src/pos-decoder.cpp index e8b57b5..16f7a62 100644 --- a/src/pos-decoder.cpp +++ b/src/pos-decoder.cpp @@ -105,7 +105,7 @@ void POSDecoder::decode(const std::string &data, std::chrono::system_clock::time } size_t POSDecoder::parseBuffer(uint8_t *buffer, const size_t size, std::chrono::system_clock::time_point &&tp) { - cluon::data::TimeStamp sampleTimeStamp{cluon::time::convert(std::move(tp))}; + cluon::data::TimeStamp timeStampFromPacket{cluon::time::convert(std::move(tp))}; auto extractTimeDistance = [timeOffsetSinceGPSinMicroseconds = m_timeOffsetSinceGPSinMicroseconds](double time1){ int64_t seconds{static_cast(floor(time1))}; @@ -154,6 +154,8 @@ size_t POSDecoder::parseBuffer(uint8_t *buffer, const size_t size, std::chrono:: return offset; } else { + cluon::data::TimeStamp sampleTimeStamp{timeStampFromPacket}; + // We can decode the next message. const std::string message(reinterpret_cast(buffer + offset + POSDecoder::GRP_HEADER_SIZE), messageSize); std::stringstream b(message);