fix: dev: equalized naming of functions in MultiColorLight

This commit is contained in:
hhau
2023-12-06 00:08:55 +01:00
parent b12e07539b
commit 31f4a2b281
2 changed files with 5 additions and 9 deletions

View File

@ -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:

View File

@ -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