From 14f917b84f287c89fb376fe9e40013d4363e2654 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Sat, 26 Dec 2020 17:35:20 +0100 Subject: [PATCH] Document special-case return values Thanks, supakeen! Additional thought: should maybe be an enum --- operame.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operame.ino b/operame.ino index 8db526a..92be484 100644 --- a/operame.ino +++ b/operame.ino @@ -385,6 +385,8 @@ int mhz_get_co2() { } int get_co2() { + // <0 means read error, 0 means still initializing, >0 is PPM value + if (driver == AQC) return aqc_get_co2(); if (driver == MHZ) return mhz_get_co2();