mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-30 21:12:55 +08:00
6926c66b16
* Add missing globals from luacheck config * Fix luacheck warnings in all lua files * Re-enable luacheck in Travis * Speed up Travis by using preinstalled LuaRocks * Fix more luacheck warnings in httpserver lua module * Fix DCC module and add appropriate definitions to luacheck config. * Change inline comments from ignoring block to only ignore specific line * Add Luacheck for Windows and enable it for both Windows and Linux * Change luacheck exceptions and fix errors from 1st round of polishing * Add retry and timeout params to wget
39 lines
837 B
Lua
39 lines
837 B
Lua
-- luacheck: globals T r disp millis lcg_rnd
|
|
local M, module = {}, ...
|
|
_G[module] = M
|
|
|
|
function M.run()
|
|
-- make this a volatile module:
|
|
package.loaded[module] = nil
|
|
|
|
print("Running component gradient...")
|
|
|
|
disp:setColor(0, 0, 255, 0)
|
|
disp:setColor(1, 255, 0, 0)
|
|
disp:setColor(2, 255, 0, 255)
|
|
disp:setColor(3, 0, 255, 255)
|
|
|
|
disp:drawGradientBox(0, 0, disp:getWidth(), disp:getHeight())
|
|
|
|
disp:setColor(255, 255, 255)
|
|
disp:setPrintPos(2,18)
|
|
disp:setPrintDir(0)
|
|
disp:print("GradientBox")
|
|
|
|
disp:setColor(0, 0, 255, 0)
|
|
disp:drawBox(2, 25, 8, 8)
|
|
|
|
disp:setColor(0, 255, 0, 0)
|
|
disp:drawBox(2+10, 25, 8, 8)
|
|
|
|
disp:setColor(0, 255, 0, 255)
|
|
disp:drawBox(2, 25+10, 8, 8)
|
|
|
|
disp:setColor(0, 0, 255, 255)
|
|
disp:drawBox(2+10, 25+10, 8, 8)
|
|
|
|
print("...done")
|
|
end
|
|
|
|
return M
|