LED driver.

Revision:
4:59c5b7dee5bc
Parent:
3:b5cec57779aa
Child:
5:b84ce6bea4ac
--- a/main.cpp	Mon Mar 18 13:17:00 2019 +0000
+++ b/main.cpp	Tue Mar 19 08:19:01 2019 +0000
@@ -165,13 +165,9 @@
             if(led_counter + i > 7) led_index = led_counter + i - 8;
             else led_index = led_counter + i;
             
-            // The function is used to change the direction of the "tail".
-            //if(dir_flag){
-                leds.set_color(led_index, current_col[(NUM_LEDS_LIGHTING - 1) - i]);
-            //}
-            //else{
-            //        leds.set_color(led_index, current_col[i]);
-            //}
+            // The function is used to set the direction of the "tail".
+                leds.set_color(led_index, current_col[i]);
+  
         }
         
         // Turn off / turn on all the buffer of leds prepared above.
@@ -184,9 +180,7 @@
         if(UserButton){
             if(++led_counter > 7) led_counter = 0; // Right turn
         }
-        //else{
-        //    if(--led_counter < 0) led_counter = 7; // Left turn
-        //}
+
             
         // Turn off all LEDs, so we have a dark frame buffer again.
         // Must be done after delay, as with DMA refresh() operation