mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
fix: dev: equalized naming of functions in MultiColorLight
This commit is contained in:
@ -23,8 +23,6 @@ void MultiColorLight::setLed(leds leds, uint32_t color){
|
|||||||
MultiColorLight::setLed(1,color);break;
|
MultiColorLight::setLed(1,color);break;
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(0,color);break;
|
MultiColorLight::setLed(0,color);break;
|
||||||
case TOP_RIGHT:
|
|
||||||
MultiColorLight::setLed(1,color);break;
|
|
||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
MultiColorLight::setLed(2,color);break;
|
MultiColorLight::setLed(2,color);break;
|
||||||
case TOP:
|
case TOP:
|
||||||
@ -59,20 +57,18 @@ void MultiColorLight::blink(uint16_t amount,uint32_t color, leds leds, uint32_t
|
|||||||
for(uint16_t index = 0; index < amount;index++){
|
for(uint16_t index = 0; index < amount;index++){
|
||||||
MultiColorLight::setLed(leds, color);
|
MultiColorLight::setLed(leds, color);
|
||||||
vTaskDelay(interval);
|
vTaskDelay(interval);
|
||||||
MultiColorLight::turnOff(leds);
|
MultiColorLight::turnOffLed(leds);
|
||||||
vTaskDelay(interval);
|
vTaskDelay(interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void MultiColorLight::turnOff(leds leds){
|
void MultiColorLight::turnOffLed(leds leds){
|
||||||
switch (leds){
|
switch (leds){
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
MultiColorLight::setLed(1,0);break;
|
MultiColorLight::setLed(1,0);break;
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(0,0);break;
|
MultiColorLight::setLed(0,0);break;
|
||||||
case TOP_RIGHT:
|
|
||||||
MultiColorLight::setLed(1,0);break;
|
|
||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
MultiColorLight::setLed(2,0);break;
|
MultiColorLight::setLed(2,0);break;
|
||||||
case TOP:
|
case TOP:
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
* component, and BB is the blue component. Each color can range between 0 to 100
|
* component, and BB is the blue component. Each color can range between 0 to 100
|
||||||
*/
|
*/
|
||||||
void setLed(leds leds, uint32_t color);
|
void setLed(leds leds, uint32_t color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the specified leds to the passed color value
|
* @brief Set the specified leds to the passed color value
|
||||||
*
|
*
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
* component, and BB is the blue component. Each color can range between 0 to 100
|
* component, and BB is the blue component. Each color can range between 0 to 100
|
||||||
*/
|
*/
|
||||||
void setTopLeds(uint32_t color);
|
void setTopLeds(uint32_t color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief sets the two leds on the top of the robot to the specified color
|
* @brief sets the two leds on the top of the robot to the specified color
|
||||||
*
|
*
|
||||||
@ -106,7 +106,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param leds which leds should be turned off, defaults to ALL
|
* @param leds which leds should be turned off, defaults to ALL
|
||||||
*/
|
*/
|
||||||
void turnOff(leds leds=ALL);
|
void turnOffLed(leds leds=ALL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief wrapper to calulate the used colorformat from a rgb-value
|
* @brief wrapper to calulate the used colorformat from a rgb-value
|
||||||
|
Reference in New Issue
Block a user