Represents a single device. Take measurements, send commands. Needs SDI12 bus instance as argument. Allows to detect devices on the bus
Revision 23:59447d795751, committed 2018-08-09
- Comitter:
- amateusz
- Date:
- Thu Aug 09 10:44:42 2018 +0000
- Parent:
- 22:c6e99d486304
- Commit message:
- idk
Changed in this revision
| SDI12_device.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SDI12_device.h Wed Aug 08 18:54:37 2018 +0000
+++ b/SDI12_device.h Thu Aug 09 10:44:42 2018 +0000
@@ -170,8 +170,8 @@
buffer[bufferSize] = '\0';
const std::string response(buffer);
- debug("parser. recv: %s\r\n", response);
- if (response[0] == _address) {
+// debug("parser recv: %s\r\n", response);
+ if (response[0] == _address && response.size() > 1) {
// debug("__%s__\r\n", response);
// parser here
// const!!! response = response.substr(1); // to limit repeting this operation later. i.e. extract only values e.g. +21.3-123+123