Browse Source

Correction bug pour l'allumage des batons (il y en a LED_Count /2)

main
Alex 2 years ago
parent
commit
a2e969b51d
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      src/main.cpp
  2. 2
    2
      src/my_leds.h

+ 1
- 1
src/main.cpp View File

@@ -13,7 +13,7 @@
// lumiere/allume/lampeADN value : Allummage des leds du bas vers le haut (en %) 0= aucune, 100 =) toutes
// ---------------------------------------------------------------------------------------
#include <Arduino.h>
//#define ModeDebug
#define ModeDebug

const String firmwareActualVersion = "1.0.0";


+ 2
- 2
src/my_leds.h View File

@@ -66,7 +66,7 @@ void LED_colorWipe(uint32_t color, int wait) {
* @param wait intger avec le delay
*/
void LED_changeCouleur(Couleur color, int wait){
for( int i =0; i<= LED_COUNT; i++){
for( int i =0; i<= LED_COUNT/2; i++){
LED_AllumeBaton(i, color);
strip.show(); // Update strip to match
delay(wait); // Pause for a moment
@@ -81,7 +81,7 @@ void LED_changeCouleur(Couleur color, int wait){
* @param wait intger avec le delay
*/
void LED_changeCouleurInverse(Couleur color, int wait){
for( int i = LED_COUNT; i >= 0; i--){
for( int i = LED_COUNT/2; i >= 0; i--){
LED_AllumeBaton(i, color);
strip.show(); // Update strip to match
delay(wait); // Pause for a moment

Loading…
Cancel
Save