From 1268da96983b522266603989cffb9a2423679c9f Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 26 Jul 2015 22:54:52 +0200 Subject: o operator bool() wasn't if there was data available, but if there are anyone connected to the serial port. --- Debug.h | 4 ++-- 1 file 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 { -- cgit v1.2.3