diff --git a/samples/readInfinite.cpp b/samples/readInfinite.cpp index eaf6814..724f986 100644 --- a/samples/readInfinite.cpp +++ b/samples/readInfinite.cpp @@ -39,7 +39,8 @@ int main (int argc, char **argv) { std::this_thread::sleep_for(std::chrono::milliseconds(10)); //get the first match of the pattern in the read buffer - auto result = rs232_interface.retrieveFirstMatch(pattern); + //auto result = rs232_interface.retrieveFirstMatch(pattern); + auto result = rs232_interface.retrieveAllMatches(pattern); //don't output anything if there is no match if (result.empty()) { @@ -47,7 +48,9 @@ int main (int argc, char **argv) { } //output the result to the console - std::cout << result << std::endl; + for(const auto& res : result){ + std::cout << res << std::endl; + } } }else{ while(true){