diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 19:28:07 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 19:28:07 +0200 |
commit | af63bd5688731b57551ac161c0dad26a0b4557d7 (patch) | |
tree | 0479ee6abae253b6c70b33934422d53cef9670fb /apps/SoilMoisture.cpp | |
parent | 9042b87f32bcabcc671e393376d3fb96ad858caa (diff) | |
download | ble-toys-af63bd5688731b57551ac161c0dad26a0b4557d7.tar.gz ble-toys-af63bd5688731b57551ac161c0dad26a0b4557d7.tar.bz2 ble-toys-af63bd5688731b57551ac161c0dad26a0b4557d7.tar.xz ble-toys-af63bd5688731b57551ac161c0dad26a0b4557d7.zip |
SoilMoisture:
o Updating for changed get_value struct.
Diffstat (limited to 'apps/SoilMoisture.cpp')
-rw-r--r-- | apps/SoilMoisture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/SoilMoisture.cpp b/apps/SoilMoisture.cpp index 5edba0e..fea1ef9 100644 --- a/apps/SoilMoisture.cpp +++ b/apps/SoilMoisture.cpp @@ -113,10 +113,11 @@ uint8_t SoilMoisture::getSensorCount() { uint16_t SoilMoisture::getValue(uint8_t sensor) { auto req = createGetValue(sensor); - return writeAndRead(req).read16le(); + auto buffer = writeAndRead(req); + buffer.read8(); // sensor index + return buffer.read16le(); } - string SoilMoisture::getName(uint8_t sensor) { auto req = createGetSensorName(sensor); |