From ac03535bc7d08c4fc05c19eda6271e92b6558e41 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 21 Mar 2015 18:07:44 +0100 Subject: o Dropping empty samples when looking for an end sample. --- apps/SoilMoistureIo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/SoilMoistureIo.cpp') diff --git a/apps/SoilMoistureIo.cpp b/apps/SoilMoistureIo.cpp index 7d8f5bb..66e1dce 100644 --- a/apps/SoilMoistureIo.cpp +++ b/apps/SoilMoistureIo.cpp @@ -12,6 +12,10 @@ using namespace std; using json = nlohmann::json; void VectorSampleOutputStream::write(SampleRecord const &sample) { + if (sample.empty()) { + return; + } + samples.emplace_back(sample); } -- cgit v1.2.3