Improve demo files

This commit is contained in:
Marcos Kirsch
2015-02-22 16:06:06 -06:00
parent 5fe2dfcf9d
commit 316af66d3c
3 changed files with 34 additions and 32 deletions

View File

@@ -13,15 +13,17 @@ return function (connection, args)
connection:send('<body>')
connection:send('<h1>Node info</h1>')
majorVer, minorVer, devVer, chipid, flashid, flashsize, flashmode, flashspeed = node.info();
connection:send('<ul>Node info:')
sendAttr(connection, "majorVer" , majorVer)
sendAttr(connection, "devVer" , devVer)
sendAttr(connection, "chipid" , chipid)
sendAttr(connection, "flashid" , flashid)
sendAttr(connection, "flashsize" , flashsize)
sendAttr(connection, "flashmode" , flashmode)
sendAttr(connection, "flashspeed" , flashspeed)
sendAttr(connection, "node.heap()" , node.heap())
sendAttr(connection, "majorVer" , majorVer)
sendAttr(connection, "devVer" , devVer)
sendAttr(connection, "chipid" , chipid)
sendAttr(connection, "flashid" , flashid)
sendAttr(connection, "flashsize" , flashsize)
sendAttr(connection, "flashmode" , flashmode)
sendAttr(connection, "flashspeed" , flashspeed)
sendAttr(connection, "node.heap()" , node.heap())
sendAttr(connection, 'Memory in use (KB)' , collectgarbage("count"))
sendAttr(connection, 'IP address' , wifi.sta.getip())
sendAttr(connection, 'MAC address' , wifi.sta.getmac())
connection:send('</ul>')
connection:send('</body></html>')
end