Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
AKMaily committed Oct 4, 2024
1 parent ff62448 commit e2508ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/analyze_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,16 @@ void AnalyzeStateManager::selectData(const std::map<Omniscope::Id, std::vector<s
void AnalyzeStateManager::loadAndSendData( const std::map<Omniscope::Id, std::vector<std::pair<double, double>>> &captureData){
// disableAllOtherFields();

std::vector<double> loadedData = this->loadData(captureData); // loading the data
std::vector<double> 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;
});
Expand Down

0 comments on commit e2508ef

Please sign in to comment.