From 6a127ea4979122caf48d5743ab3696e6dd59cc67 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 29 Jul 2012 23:46:03 +0200 Subject: [PATCH] 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. --- pulsetunnel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsetunnel.lua b/pulsetunnel.lua index a8e1440..3f629e2 100644 --- a/pulsetunnel.lua +++ b/pulsetunnel.lua @@ -27,7 +27,7 @@ function periodic() local redEnergy = get_energy_in_band(0, 400); local greenEnergy = get_energy_in_band(400, 4000); local blueEnergy = get_energy_in_band(4000, 22000); - local centerIndex = 2 * center_module; + local centerIndex = 2 * center_module + 1; maxRedEnergy = maxRedEnergy * COOLDOWN_FACTOR if redEnergy > maxRedEnergy then