From a109227cbee9863036d4ad469f0fca933932e0da Mon Sep 17 00:00:00 2001 From: hhaupt Date: Sun, 9 Jun 2024 09:35:38 +0200 Subject: [PATCH] fixed errors from merge (added calls .begin for submodules and renamed colorConstant) --- src/Dezibot.cpp | 7 ++++++- src/Dezibot.h | 1 - src/colorDetection/ColorDetection.cpp | 8 ++++---- src/colorDetection/ColorDetection.h | 8 ++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/Dezibot.cpp b/src/Dezibot.cpp index 610479e..e2648d9 100644 --- a/src/Dezibot.cpp +++ b/src/Dezibot.cpp @@ -14,5 +14,10 @@ #define GPIO_LED 48 void Dezibot::begin(void) { - + motion.begin(); + lightDetection.begin(); + colorDetection.begin(); + multiColorLight.begin(); + motionDetection.begin(); + infraredLight.begin(); } diff --git a/src/Dezibot.h b/src/Dezibot.h index 6f047de..51f465a 100644 --- a/src/Dezibot.h +++ b/src/Dezibot.h @@ -23,7 +23,6 @@ class Dezibot { protected: public: - Dezibot(); Motion motion; LightDetection lightDetection; ColorDetection colorDetection; diff --git a/src/colorDetection/ColorDetection.cpp b/src/colorDetection/ColorDetection.cpp index 6caf26b..3bcc0ef 100644 --- a/src/colorDetection/ColorDetection.cpp +++ b/src/colorDetection/ColorDetection.cpp @@ -37,16 +37,16 @@ uint16_t ColorDetection::getColorValue(color color){ switch(color) { - case RED: + case VEML_RED: return readDoubleRegister(REG_RED); break; - case GREEN: + case VEML_GREEN: return readDoubleRegister(REG_GREEN); break; - case BLUE: + case VEML_BLUE: return readDoubleRegister(REG_BLUE); break; - case WHITE: + case VEML_WHITE: return readDoubleRegister(REG_WHITE); break; default: diff --git a/src/colorDetection/ColorDetection.h b/src/colorDetection/ColorDetection.h index a8d42e2..45244a2 100644 --- a/src/colorDetection/ColorDetection.h +++ b/src/colorDetection/ColorDetection.h @@ -40,10 +40,10 @@ struct VEML_CONFIG{ enum color{ - RED, - GREEN, - BLUE, - WHITE + VEML_RED, + VEML_GREEN, + VEML_BLUE, + VEML_WHITE }; class ColorDetection{ public: