SDS011read.cpp: bugfix conditional compile

This commit is contained in:
Verkehrsrot 2020-02-06 16:53:50 +01:00
parent 867c5477df
commit fa2920340c

View File

@ -3,15 +3,19 @@
// Local logging tag // Local logging tag
static const char TAG[] = __FILE__; static const char TAG[] = __FILE__;
#if (HAS_SDS)
#include "sds011read.h" #include "sds011read.h"
// UART(2) is unused in this project // UART(2) is unused in this project
#if (HAS_IF482) #if (HAS_IF482)
#error cannot use IF482 together with SDS011 (both use UART#2) #error cannot use IF482 together with SDS011 (both use UART#2)
#endif #endif
#ifndef SDS011_SERIAL #ifndef SDS011_SERIAL
#error serial settings for SDS011 connection missing #error serial settings for SDS011 connection missing
#endif #endif
static HardwareSerial sdsSerial(2); // so we use it here static HardwareSerial sdsSerial(2); // so we use it here
static SDS011 sdsSensor; // fine dust sensor static SDS011 sdsSensor; // fine dust sensor
@ -58,3 +62,5 @@ void sds011_wakeup() {
isSDS011Active = true; isSDS011Active = true;
} }
} }
#endif // HAS_SDS