aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-07-26 22:54:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-07-26 22:54:52 +0200
commit1268da96983b522266603989cffb9a2423679c9f (patch)
tree8217dff6f6cf02af22bd023a77a8d544387ca500
parent22b3bbc0855aa50864f33305e818626fbd3b7725 (diff)
downloadtrygvisio_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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Debug.h b/Debug.h
index a70a144..2de911b 100644
--- a/Debug.h
+++ b/Debug.h
@@ -18,8 +18,8 @@ public:
}
}
- inline bool operator!() const {
- return !available();
+ inline operator bool() const {
+ return Serial.operator bool();
};
inline bool available() const {