From 674835ae7378b00fddabb3f968c08ced71201af9 Mon Sep 17 00:00:00 2001 From: ollo Date: Sun, 18 Feb 2018 14:08:56 +0100 Subject: [PATCH] Default values fixed --- displayword.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/displayword.lua b/displayword.lua index 9f35bce..779385d 100644 --- a/displayword.lua +++ b/displayword.lua @@ -1,6 +1,9 @@ -- Module filling a buffer, sent to the LEDs -function updateColor(data, inverseRow=false) +function updateColor(data, inverseRow) + if (inverseRow == nil) then + inverseRow=false + end -- special case, and there are exactly 4 words to display (so each word for each minute) if (data.amountWords == 4) then print ("Amount words are " .. tostring(data.amountWords)) @@ -53,7 +56,10 @@ function updateColor(data, inverseRow=false) end end -function drawLEDs(data, numberNewChars, inverseRow=false) +function drawLEDs(data, numberNewChars, inverseRow) + if (inverseRow == nil) then + inverseRow=false + end local tmpBuf=nil for i=1,numberNewChars do if (tmpBuf == nil) then