aboutsummaryrefslogtreecommitdiff
path: root/apps/SoilMoistureIo.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-21 18:07:44 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-21 18:07:44 +0100
commitac03535bc7d08c4fc05c19eda6271e92b6558e41 (patch)
treeed33830b5fb6740ca80ba408a113ca944d0906ef /apps/SoilMoistureIo.cpp
parentf12bef0c3696f87c55210557fb3b056284e82494 (diff)
downloadble-toys-ac03535bc7d08c4fc05c19eda6271e92b6558e41.tar.gz
ble-toys-ac03535bc7d08c4fc05c19eda6271e92b6558e41.tar.bz2
ble-toys-ac03535bc7d08c4fc05c19eda6271e92b6558e41.tar.xz
ble-toys-ac03535bc7d08c4fc05c19eda6271e92b6558e41.zip
o Dropping empty samples when looking for an end sample.
Diffstat (limited to 'apps/SoilMoistureIo.cpp')
-rw-r--r--apps/SoilMoistureIo.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}