From 328da08d51148e6525871d27de8d6aeae0c24553 Mon Sep 17 00:00:00 2001 From: UsualSpec <98665326+UsualSpec@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:06:25 +0200 Subject: [PATCH] Redirect sampling back to stdout Moving data printing back to stdout is needed for autopower devices. --- src/Sampler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sampler.cpp b/src/Sampler.cpp index dcfc5ba..3f50a03 100644 --- a/src/Sampler.cpp +++ b/src/Sampler.cpp @@ -144,7 +144,7 @@ void Sampler::continuous_print_tick() if (settings::countinous_timestamp_flag) { // I wanted to use duration>, but this resulted in weird constant epoch auto ms_since_epoch = std::chrono::duration_cast(timestamp.time_since_epoch()).count(); - settings::output_stream << ms_since_epoch * 0.001 << ","; + std::cout << ms_since_epoch * 0.001 << ","; } - settings::output_stream << buf << std::endl; + std::cout << buf << std::endl; }