From: Rachael Date: Tue, 20 Feb 2018 01:08:33 +0000 (-0800) Subject: fixes some minor typos in the color redrawing logic in a few drawings X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=08d672116985fa847882e3a102e49b09ff4bc1b7;p=acmetensortoys-esp-lua_lamp fixes some minor typos in the color redrawing logic in a few drawings --- diff --git a/draw-butterfly.lua b/draw-butterfly.lua index 88e8d03..ce6142e 100644 --- a/draw-butterfly.lua +++ b/draw-butterfly.lua @@ -43,5 +43,5 @@ return function(t,fb,p) dodraw() end) - return { ['cccb'] = function() reinit(); for ixp = 1,ix do ft[ixp]() end; dodraw() end } + return { ['cccb'] = function() reinit();local ixp for ixp = 1,ix do ft[ixp]() end; dodraw() end } end diff --git a/draw-flower.lua b/draw-flower.lua index 009e563..d9c3535 100644 --- a/draw-flower.lua +++ b/draw-flower.lua @@ -54,7 +54,7 @@ return function(t,fb,p) } local ix = #ft - local function cb() + local function cb() ix = (ix == #ft and 1) or ix + 1 local dly = ft[ix]() dodraw() @@ -64,5 +64,5 @@ return function(t,fb,p) cb() - return { ['ncolors'] = 1, ['cccb'] = function() reinit(); for ixp = 1,ix do ft[ixp]() end; dodraw() end } + return { ['ncolors'] = 1, ['cccb'] = function() reinit();local ixp for ixp = 1,ix do ft[ixp]() end; dodraw() end } end diff --git a/draw-heartbeat.lua b/draw-heartbeat.lua index 2e6afd2..40693b3 100644 --- a/draw-heartbeat.lua +++ b/draw-heartbeat.lua @@ -36,5 +36,5 @@ return function(t,fb,p) dodraw() end) - return { ['ncolors'] = 2, ['cccb'] = function() reinit(); local ixp = 1,ix do ft[ixp]() end; dodraw() end } + return { ['ncolors'] = 2, ['cccb'] = function() reinit(); local ixp for ixp = 1,ix do ft[ixp]() end; dodraw() end } end diff --git a/draw-sketchheart.lua b/draw-sketchheart.lua index a23c12a..205cc40 100644 --- a/draw-sketchheart.lua +++ b/draw-sketchheart.lua @@ -53,5 +53,5 @@ return function(t,fb,p) dodraw() end) - return { ['cccb'] = function() reinit(); local ixp=1,ix do ft[ixp]() end; dodraw() end } + return { ['ncolors'] = 2, ['cccb'] = function() reinit(); local ixp for ixp=1,ix do ft[ixp]() end; dodraw() end } end