Browse Source

Center of pulsetunnel is now between 2 modules

The LED strip has an even number of modules, so this change makes the
animation completely symmetrical.
lua
Thomas Kolb 7 years ago
parent
commit
6a127ea497
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      pulsetunnel.lua

+ 1
- 1
pulsetunnel.lua View File

@@ -27,7 +27,7 @@ function periodic()
27 27
   local redEnergy = get_energy_in_band(0, 400);
28 28
   local greenEnergy = get_energy_in_band(400, 4000);
29 29
   local blueEnergy = get_energy_in_band(4000, 22000);
30
-  local centerIndex = 2 * center_module;
30
+  local centerIndex = 2 * center_module + 1;
31 31
 
32 32
   maxRedEnergy = maxRedEnergy * COOLDOWN_FACTOR
33 33
   if redEnergy > maxRedEnergy then

Loading…
Cancel
Save