mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
fix: dev: switched left and right leds
This commit is contained in:
@ -20,6 +20,8 @@ void MultiColorLight::setLed(uint8_t index , uint32_t color){
|
|||||||
void MultiColorLight::setLed(leds leds, uint32_t color){
|
void MultiColorLight::setLed(leds leds, uint32_t color){
|
||||||
switch (leds){
|
switch (leds){
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
|
MultiColorLight::setLed(1,color);break;
|
||||||
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(0,color);break;
|
MultiColorLight::setLed(0,color);break;
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(1,color);break;
|
MultiColorLight::setLed(1,color);break;
|
||||||
@ -30,7 +32,7 @@ void MultiColorLight::setLed(leds leds, uint32_t color){
|
|||||||
MultiColorLight::setLed(index,color);
|
MultiColorLight::setLed(index,color);
|
||||||
}break;
|
}break;
|
||||||
case ALL:
|
case ALL:
|
||||||
for (int index = 0; index<3; index++){
|
for (int index = 0; index<ledAmount; index++){
|
||||||
MultiColorLight::setLed(index,color);
|
MultiColorLight::setLed(index,color);
|
||||||
}break;
|
}break;
|
||||||
default:
|
default:
|
||||||
@ -58,6 +60,8 @@ void MultiColorLight::blink(uint16_t amount,uint32_t color, leds leds, uint32_t
|
|||||||
void MultiColorLight::turnOff(leds leds){
|
void MultiColorLight::turnOff(leds leds){
|
||||||
switch (leds){
|
switch (leds){
|
||||||
case TOP_LEFT:
|
case TOP_LEFT:
|
||||||
|
MultiColorLight::setLed(1,0);break;
|
||||||
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(0,0);break;
|
MultiColorLight::setLed(0,0);break;
|
||||||
case TOP_RIGHT:
|
case TOP_RIGHT:
|
||||||
MultiColorLight::setLed(1,0);break;
|
MultiColorLight::setLed(1,0);break;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "ColorConstants.h"
|
#include "ColorConstants.h"
|
||||||
/**
|
/**
|
||||||
* @brief Describes combinations of leds on the Dezibot.
|
* @brief Describes combinations of leds on the Dezibot.
|
||||||
* With the Robot in Front of you, if you can read the Dezibotlogo, the LED left from the Logo is TOP_LEFT
|
* With the Robot in Front of you, when the robot drives away from you, the left LED is TOP_LEFT
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
enum leds{
|
enum leds{
|
||||||
@ -42,7 +42,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the specified led to the passed color
|
* @brief Set the specified led to the passed color
|
||||||
* @param index ranging from 0-2, 0: Left, 1: Right, 2: Bottom
|
* @param index ranging from 0-2, 0: Right, 1: Left, 2: Bottom
|
||||||
* @param color A 32-bit unsigned integer representing the color in the format
|
* @param color A 32-bit unsigned integer representing the color in the format
|
||||||
* 0x00RRGGBB, where RR is the red component, GG is the green
|
* 0x00RRGGBB, where RR is the red component, GG is the green
|
||||||
* 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
|
||||||
|
Reference in New Issue
Block a user