From e2508efda30ed3a071783adbc41e536169612332 Mon Sep 17 00:00:00 2001 From: AKMaily Date: Fri, 4 Oct 2024 09:36:17 +0200 Subject: [PATCH] Debugging --- src/analyze_data.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/analyze_data.cpp b/src/analyze_data.cpp index 94e5161f..5f50af05 100644 --- a/src/analyze_data.cpp +++ b/src/analyze_data.cpp @@ -128,13 +128,16 @@ void AnalyzeStateManager::selectData(const std::map>> &captureData){ // disableAllOtherFields(); - std::vector loadedData = this->loadData(captureData); // loading the data + std::vector loadedData = this->loadData(captureData); // loading the data + std::cout << "Loaded data size: " << loadedData.size() << std::endl; if(currentState != State::DATAISSENDING){ // start asynch task to load data - loadedDataJSON["meta"] = {}; + loadedDataJSON["meta"] = {"metadaten"}; loadedDataJSON["data"] = {{"sampling_rate", 100000}, {"y_values", loadedData}}; + future = std::async(std::launch::async, [&] { // take temp object returned from dump() and send it to sendData + std::cout << loadedDataJSON.dump(4) << std::endl; std::string result = sendData(loadedDataJSON.dump()); return result; });