From 31f4a2b2816087ab3cb0c9c21c671e3d3c7e6dde Mon Sep 17 00:00:00 2001 From: hhau Date: Wed, 6 Dec 2023 00:08:55 +0100 Subject: [PATCH] fix: dev: equalized naming of functions in MultiColorLight --- src/multiColorLight/MultiColorLight.cpp | 8 ++------ src/multiColorLight/MultiColorLight.h | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/multiColorLight/MultiColorLight.cpp b/src/multiColorLight/MultiColorLight.cpp index f8d3a4d..f0235a4 100644 --- a/src/multiColorLight/MultiColorLight.cpp +++ b/src/multiColorLight/MultiColorLight.cpp @@ -23,8 +23,6 @@ void MultiColorLight::setLed(leds leds, uint32_t color){ MultiColorLight::setLed(1,color);break; case TOP_RIGHT: MultiColorLight::setLed(0,color);break; - case TOP_RIGHT: - MultiColorLight::setLed(1,color);break; case BOTTOM: MultiColorLight::setLed(2,color);break; 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++){ MultiColorLight::setLed(leds, color); vTaskDelay(interval); - MultiColorLight::turnOff(leds); + MultiColorLight::turnOffLed(leds); vTaskDelay(interval); } }; -void MultiColorLight::turnOff(leds leds){ +void MultiColorLight::turnOffLed(leds leds){ switch (leds){ case TOP_LEFT: MultiColorLight::setLed(1,0);break; case TOP_RIGHT: MultiColorLight::setLed(0,0);break; - case TOP_RIGHT: - MultiColorLight::setLed(1,0);break; case BOTTOM: MultiColorLight::setLed(2,0);break; case TOP: diff --git a/src/multiColorLight/MultiColorLight.h b/src/multiColorLight/MultiColorLight.h index ce9ba5c..44498cf 100644 --- a/src/multiColorLight/MultiColorLight.h +++ b/src/multiColorLight/MultiColorLight.h @@ -58,7 +58,7 @@ public: * component, and BB is the blue component. Each color can range between 0 to 100 */ void setLed(leds leds, uint32_t color); - + /** * @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 */ void setTopLeds(uint32_t 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 */ - void turnOff(leds leds=ALL); + void turnOffLed(leds leds=ALL); /** * @brief wrapper to calulate the used colorformat from a rgb-value