diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-26 22:54:52 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-26 22:54:52 +0200 |
commit | 1268da96983b522266603989cffb9a2423679c9f (patch) | |
tree | 8217dff6f6cf02af22bd023a77a8d544387ca500 | |
parent | 22b3bbc0855aa50864f33305e818626fbd3b7725 (diff) | |
download | trygvisio_soil_moisture-1268da96983b522266603989cffb9a2423679c9f.tar.gz trygvisio_soil_moisture-1268da96983b522266603989cffb9a2423679c9f.tar.bz2 trygvisio_soil_moisture-1268da96983b522266603989cffb9a2423679c9f.tar.xz trygvisio_soil_moisture-1268da96983b522266603989cffb9a2423679c9f.zip |
o operator bool() wasn't if there was data available, but if there are anyone connected to the serial port.
-rw-r--r-- | Debug.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -18,8 +18,8 @@ public: } } - inline bool operator!() const { - return !available(); + inline operator bool() const { + return Serial.operator bool(); }; inline bool available() const { |