fixed errors from merge (added calls .begin for submodules and renamed colorConstant)

This commit is contained in:
hhaupt 2024-06-09 09:35:38 +02:00
parent 3f175e6b75
commit a109227cbe
4 changed files with 14 additions and 10 deletions

View File

@ -14,5 +14,10 @@
#define GPIO_LED 48 #define GPIO_LED 48
void Dezibot::begin(void) { void Dezibot::begin(void) {
motion.begin();
lightDetection.begin();
colorDetection.begin();
multiColorLight.begin();
motionDetection.begin();
infraredLight.begin();
} }

View File

@ -23,7 +23,6 @@ class Dezibot {
protected: protected:
public: public:
Dezibot();
Motion motion; Motion motion;
LightDetection lightDetection; LightDetection lightDetection;
ColorDetection colorDetection; ColorDetection colorDetection;

View File

@ -37,16 +37,16 @@ uint16_t ColorDetection::getColorValue(color color){
switch(color) switch(color)
{ {
case RED: case VEML_RED:
return readDoubleRegister(REG_RED); return readDoubleRegister(REG_RED);
break; break;
case GREEN: case VEML_GREEN:
return readDoubleRegister(REG_GREEN); return readDoubleRegister(REG_GREEN);
break; break;
case BLUE: case VEML_BLUE:
return readDoubleRegister(REG_BLUE); return readDoubleRegister(REG_BLUE);
break; break;
case WHITE: case VEML_WHITE:
return readDoubleRegister(REG_WHITE); return readDoubleRegister(REG_WHITE);
break; break;
default: default:

View File

@ -40,10 +40,10 @@ struct VEML_CONFIG{
enum color{ enum color{
RED, VEML_RED,
GREEN, VEML_GREEN,
BLUE, VEML_BLUE,
WHITE VEML_WHITE
}; };
class ColorDetection{ class ColorDetection{
public: public: