diff --git a/src/v2i-hub/PedestrianPlugin/src/FLIRWebSockAsyncClnSession.cpp b/src/v2i-hub/PedestrianPlugin/src/FLIRWebSockAsyncClnSession.cpp index 1ab432dfc..afebbca1f 100644 --- a/src/v2i-hub/PedestrianPlugin/src/FLIRWebSockAsyncClnSession.cpp +++ b/src/v2i-hub/PedestrianPlugin/src/FLIRWebSockAsyncClnSession.cpp @@ -367,14 +367,15 @@ namespace PedestrianPlugin std::string milliseconds = dateTimeStr.substr(0, dateTimeStr.find(delimiter2)); milliseconds.erase(0, std::min(milliseconds.find_first_not_of('0'), milliseconds.size()-1)); - + + int millisecondsTotal = (std::stoi(sec) * 1000) + std::stoi(milliseconds); parsedArr.push_back(std::stoi(year)); parsedArr.push_back(std::stoi(month)); parsedArr.push_back(std::stoi(day)); parsedArr.push_back(std::stoi(hour)); parsedArr.push_back(std::stoi(mins)); parsedArr.push_back(std::stoi(sec)); - parsedArr.push_back(std::stoi(milliseconds)); + parsedArr.push_back(millisecondsTotal); return parsedArr; } diff --git a/src/v2i-hub/PedestrianPlugin/src/PedestrianPlugin.cpp b/src/v2i-hub/PedestrianPlugin/src/PedestrianPlugin.cpp index eb257c29b..ee1a6330e 100644 --- a/src/v2i-hub/PedestrianPlugin/src/PedestrianPlugin.cpp +++ b/src/v2i-hub/PedestrianPlugin/src/PedestrianPlugin.cpp @@ -136,13 +136,12 @@ int PedestrianPlugin::checkXML() //retrieve the PSM queue and send each one to be broadcast, then pop std::queue currentPSMQueue = flirSession->getPSMQueue(); - if (currentPSMQueue.size() > 0) - { - for (int i = 0; i < currentPSMQueue.size(); i++) - { - BroadcastPsm(const_cast(currentPSMQueue.front().c_str())); - currentPSMQueue.pop(); - } + while(!currentPSMQueue.empty()) + { + char* char_arr = ¤tPSMQueue.front()[0]; + + BroadcastPsm(char_arr); + currentPSMQueue.pop(); } }