mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-20 03:21:46 +02:00
chg: dev: add wrapper for setLED that takes three color arguments
This commit is contained in:
parent
a108625ca9
commit
b12e07539b
@ -42,11 +42,19 @@ void MultiColorLight::setLed(leds leds, uint32_t color){
|
||||
|
||||
};
|
||||
|
||||
void MultiColorLight::setLed(leds leds, uint8_t red, uint8_t green, uint8_t blue){
|
||||
MultiColorLight::setLed(leds, MultiColorLight::color(red,green,blue));
|
||||
};
|
||||
|
||||
|
||||
void MultiColorLight::setTopLeds(uint32_t color){
|
||||
MultiColorLight::setLed(TOP,color);
|
||||
};
|
||||
|
||||
void MultiColorLight::setTopLeds(uint8_t red, uint8_t green, uint8_t blue){
|
||||
MultiColorLight::setTopLeds(MultiColorLight::color(red,green,blue));
|
||||
};
|
||||
|
||||
void MultiColorLight::blink(uint16_t amount,uint32_t color, leds leds, uint32_t interval){
|
||||
for(uint16_t index = 0; index < amount;index++){
|
||||
MultiColorLight::setLed(leds, color);
|
||||
|
@ -59,6 +59,16 @@ public:
|
||||
*/
|
||||
void setLed(leds leds, uint32_t color);
|
||||
|
||||
/**
|
||||
* @brief Set the specified leds to the passed color value
|
||||
*
|
||||
* @param leds which leds should be updated
|
||||
* @param red brightness of red, is normalized in the function
|
||||
* @param green brightness of green, is normalized in the function
|
||||
* @param blue brightness of blue, is normalized in the function
|
||||
*/
|
||||
void setLed(leds leds, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
/**
|
||||
* @brief sets the two leds on the top of the robot to the specified color
|
||||
*
|
||||
@ -68,6 +78,15 @@ public:
|
||||
*/
|
||||
void setTopLeds(uint32_t color);
|
||||
|
||||
/**
|
||||
* @brief sets the two leds on the top of the robot to the specified color
|
||||
*
|
||||
* @param red brightness of red, is normalized in the function
|
||||
* @param green brightness of green, is normalized in the function
|
||||
* @param blue brightness of blue, is normalized in the function
|
||||
*/
|
||||
void setTopLeds(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
/**
|
||||
* @brief Let LEDs blink, returns after all blinks were executed
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user