From: Nathaniel Wesley Filardo Date: Sat, 25 Jan 2020 18:57:06 +0000 (+0000) Subject: lamp-touch: fix typo in LFS scan X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=2bcfad8f919cc54b2e78c11038a7b0cd1cf9dddc;p=acmetensortoys-esp-lua_lamp lamp-touch: fix typo in LFS scan b239c3d0768c00be44f423609f705dcc96421a5b tried to walk the list of modules in LFS (as well as those in SPIFFS), but used the integer key, not string value, of the table of module names. This, understandably, didn't work out so well. --- diff --git a/lamp-touch.lua b/lamp-touch.lua index 951ce95..5ff2e02 100644 --- a/lamp-touch.lua +++ b/lamp-touch.lua @@ -28,7 +28,7 @@ for k,v in pairs(file.list()) do end local ut, fa, ma, sz, t = node.flashindex() if t then for k,v in ipairs(t) do - local ix, _, meth = k:find("^draw%-(%w+)$") + local ix, _, meth = v:find("^draw%-(%w+)$") if ix then touchfns[#touchfns+1] = meth end end end table.sort(touchfns)