From 70cad7de5dbb8b31deca7a2d12d96b6bff0ca8a8 Mon Sep 17 00:00:00 2001 From: seregaxvm Date: Wed, 29 Apr 2020 15:27:32 +0300 Subject: [PATCH] fix liquidcrystal luacheck warnings (#3081) Co-authored-by: Matsievskiy S.V --- lua_modules/liquidcrystal/lc-gpio4bit.lua | 12 ++++++------ lua_modules/liquidcrystal/lc-gpio8bit.lua | 12 ++++++------ lua_modules/liquidcrystal/lc-i2c4bit.lua | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lua_modules/liquidcrystal/lc-gpio4bit.lua b/lua_modules/liquidcrystal/lc-gpio4bit.lua index 290a96ee..4a682dbc 100644 --- a/lua_modules/liquidcrystal/lc-gpio4bit.lua +++ b/lua_modules/liquidcrystal/lc-gpio4bit.lua @@ -56,25 +56,25 @@ return function(bus_args) -- Return backend object return { fourbits = true, - command = function (screen, cmd) + command = function (_, cmd) return send4bitGPIO(cmd, false, false, false) end, - busy = function(screen) + busy = function(_) if rw == nil then return false end return bit.isset(send4bitGPIO(0xff, false, true, true), 7) end, - position = function(screen) + position = function(_) if rw == nil then return 0 end return bit.clear(send4bitGPIO(0xff, false, true, true), 7) end, - write = function(screen, value) + write = function(_, value) return send4bitGPIO(value, true, false, false) end, - read = function(screen) + read = function(_) if rw == nil then return nil end return send4bitGPIO(0xff, true, true, true) end, - backlight = function(screen, on) + backlight = function(_, on) if (bl) then gpio.write(bl, on and gpio.HIGH or gpio.LOW) end return on end, diff --git a/lua_modules/liquidcrystal/lc-gpio8bit.lua b/lua_modules/liquidcrystal/lc-gpio8bit.lua index d61a06f9..43b7ffd3 100644 --- a/lua_modules/liquidcrystal/lc-gpio8bit.lua +++ b/lua_modules/liquidcrystal/lc-gpio8bit.lua @@ -53,25 +53,25 @@ return function(bus_args) -- Return backend object return { fourbits = false, - command = function (screen, cmd) + command = function (_, cmd) return send8bitGPIO(cmd, false, false, false) end, - busy = function(screen) + busy = function(_) if rw == nil then return false end return bit.isset(send8bitGPIO(0xff, false, true, true), 7) end, - position = function(screen) + position = function(_) if rw == nil then return 0 end return bit.clear(send8bitGPIO(0xff, false, true, true), 7) end, - write = function(screen, value) + write = function(_, value) return send8bitGPIO(value, true, false, false) end, - read = function(screen) + read = function(_) if rw == nil then return nil end return send8bitGPIO(0xff, true, true, true) end, - backlight = function(screen, on) + backlight = function(_, on) if (bl) then gpio.write(bl, on and gpio.HIGH or gpio.LOW) end return on end, diff --git a/lua_modules/liquidcrystal/lc-i2c4bit.lua b/lua_modules/liquidcrystal/lc-i2c4bit.lua index 2b299481..5036026a 100644 --- a/lua_modules/liquidcrystal/lc-i2c4bit.lua +++ b/lua_modules/liquidcrystal/lc-i2c4bit.lua @@ -73,26 +73,26 @@ return function(bus_args) -- Return backend object return { fourbits = true, - command = function (screen, cmd) + command = function (_, cmd) return send4bitI2C(cmd, false, false, false) end, - busy = function(screen) + busy = function(_) local rv = send4bitI2C(0xff, false, true, true) send4bitI2C(bit.bor(0x80, bit.clear(rv, 7)), false, false, false) return bit.isset(rv, 7) end, - position = function(screen) + position = function(_) local rv = bit.clear(send4bitI2C(0xff, false, true, true), 7) send4bitI2C(bit.bor(0x80, rv), false, false, false) return rv end, - write = function(screen, value) + write = function(_, value) return send4bitI2C(value, true, false, false) end, - read = function(screen) + read = function(_) return send4bitI2C(0xff, true, true, true) end, - backlight = function(screen, on) + backlight = function(_, on) backlight = on local rv = bit.clear(send4bitI2C(0xff, false, true, true), 7) send4bitI2C(bit.bor(0x80, rv), false, false, false)