mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
luacheck fixes
This commit is contained in:
parent
1984b63837
commit
56e69e3a29
@ -113,6 +113,8 @@ function coordinator.load_config()
|
|||||||
mon_cfv.assert_eq(#config.UnitDisplays, config.UnitCount)
|
mon_cfv.assert_eq(#config.UnitDisplays, config.UnitCount)
|
||||||
|
|
||||||
if mon_cfv.valid() then
|
if mon_cfv.valid() then
|
||||||
|
local w, h, _
|
||||||
|
|
||||||
mon_cfv.assert(util.table_contains(names, config.MainDisplay))
|
mon_cfv.assert(util.table_contains(names, config.MainDisplay))
|
||||||
|
|
||||||
if not mon_cfv.valid() then return 2, "Main monitor is not connected." end
|
if not mon_cfv.valid() then return 2, "Main monitor is not connected." end
|
||||||
@ -120,7 +122,7 @@ function coordinator.load_config()
|
|||||||
monitors.primary = ppm.get_periph(config.MainDisplay)
|
monitors.primary = ppm.get_periph(config.MainDisplay)
|
||||||
monitors.primary_name = config.MainDisplay
|
monitors.primary_name = config.MainDisplay
|
||||||
|
|
||||||
local w, h = ppm.monitor_block_size(monitors.primary.getSize())
|
w, _ = ppm.monitor_block_size(monitors.primary.getSize())
|
||||||
mon_cfv.assert(w == 8)
|
mon_cfv.assert(w == 8)
|
||||||
|
|
||||||
if not mon_cfv.valid() then return 2, "Main monitor width is incorrect." end
|
if not mon_cfv.valid() then return 2, "Main monitor width is incorrect." end
|
||||||
@ -133,7 +135,7 @@ function coordinator.load_config()
|
|||||||
monitors.flow = ppm.get_periph(config.FlowDisplay)
|
monitors.flow = ppm.get_periph(config.FlowDisplay)
|
||||||
monitors.flow_name = config.FlowDisplay
|
monitors.flow_name = config.FlowDisplay
|
||||||
|
|
||||||
w, h = ppm.monitor_block_size(monitors.flow.getSize())
|
w, _ = ppm.monitor_block_size(monitors.flow.getSize())
|
||||||
mon_cfv.assert(w == 8)
|
mon_cfv.assert(w == 8)
|
||||||
|
|
||||||
if not mon_cfv.valid() then return 2, "Flow monitor width is incorrect." end
|
if not mon_cfv.valid() then return 2, "Flow monitor width is incorrect." end
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
local log = require("scada-common.log")
|
local log = require("scada-common.log")
|
||||||
local util = require("scada-common.util")
|
|
||||||
local ppm = require("scada-common.ppm")
|
|
||||||
|
|
||||||
local iocontrol = require("coordinator.iocontrol")
|
local iocontrol = require("coordinator.iocontrol")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user