]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_lamp/commitdiff
lamp-touch: fix typo in LFS scan
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 25 Jan 2020 18:57:06 +0000 (18:57 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 25 Jan 2020 18:57:06 +0000 (18:57 +0000)
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.

lamp-touch.lua

index 951ce95a6b91acee363154a88608b64f45784ae8..5ff2e02e2104bb57cb4035f362b3f61f3f414eb4 100644 (file)
@@ -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)