mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-21 20:11:46 +02:00
fixed errors from merge (added calls .begin for submodules and renamed colorConstant)
This commit is contained in:
parent
3f175e6b75
commit
a109227cbe
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@ class Dezibot {
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Dezibot();
|
|
||||||
Motion motion;
|
Motion motion;
|
||||||
LightDetection lightDetection;
|
LightDetection lightDetection;
|
||||||
ColorDetection colorDetection;
|
ColorDetection colorDetection;
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user