fix led leb double lib issue
This commit is contained in:
parent
743ca41758
commit
e60c966a97
@ -26,7 +26,7 @@ void LedLib::actLed(int nb, int start){
|
||||
|
||||
// Boucle dans les LEDs
|
||||
// Loop in LEDs
|
||||
for (int i = start; i < nb+start+1; i++) {
|
||||
for (int i = start; i <= nb+start-1; i++) {
|
||||
int j = i;
|
||||
if(j > 24){
|
||||
j -= 24;
|
||||
@ -35,9 +35,9 @@ void LedLib::actLed(int nb, int start){
|
||||
// Une LED sur deux est blanche : heure entière, l'autre rouge pour 30m
|
||||
// One LED out of two is white: whole hour, the other red for 30m
|
||||
if (j%2 == 0) {
|
||||
this->strip->setPixelColor(j-1, 255, 0, 0);
|
||||
this->strip->setPixelColor(j, 255, 255, 255);
|
||||
}else{
|
||||
this->strip->setPixelColor(j-1, 255, 255, 255);
|
||||
this->strip->setPixelColor(j, 255, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user