Changement du remplissage pour éviter les flash
This commit is contained in:
parent
0af54b04b8
commit
78f085915d
@ -15,7 +15,7 @@
|
||||
#include <Arduino.h>
|
||||
//#define ModeDebug
|
||||
|
||||
const String firmwareActualVersion = "1.1.0";
|
||||
const String firmwareActualVersion = "1.1.1";
|
||||
|
||||
#ifdef ModeDebug
|
||||
#define DEBUG(message) \
|
||||
|
@ -269,16 +269,10 @@ void theaterChaseRainbow(uint8_t wait) {
|
||||
*/
|
||||
void LED_Remplissage(unsigned int value){
|
||||
|
||||
// ON PASSE TOUTES LES LEDS EN NOIR
|
||||
for (int i = 0; i < LED_COUNT; i++) {
|
||||
strip.setPixelColor(i, strip.Color(0,0,0)); // Noir
|
||||
}
|
||||
strip.show();
|
||||
|
||||
|
||||
// ALLUMAGE DES LEDS
|
||||
Couleur color;
|
||||
for (int i = 0; i <= (int) ((LED_COUNT/2) * value / 100); i++) {
|
||||
int max = (int) ((LED_COUNT/2) * value / 100);
|
||||
for (int i = 0; i <= max; i++) {
|
||||
// DEFINITION DE LA COULEUR
|
||||
int value = 255 - i * 255/(LED_COUNT/2);
|
||||
color.R = 255 - value;
|
||||
@ -289,6 +283,15 @@ void LED_Remplissage(unsigned int value){
|
||||
// ALLUMAGE DU BATON DE LEDS
|
||||
LED_AllumeBaton(i, color );
|
||||
}
|
||||
|
||||
// ON PASSE TOUTES LES LEDS EN NOIR
|
||||
color.R = 0;
|
||||
color.V = 0;
|
||||
color.B = 0;
|
||||
for (int i = max +1; i < LED_COUNT / 2 ; i++) {
|
||||
LED_AllumeBaton(i, color );
|
||||
}
|
||||
strip.show();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user