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
00cacd6d0a
commit
697a3d6f6b
@ -3,7 +3,7 @@
|
||||
--
|
||||
|
||||
local const = require("scada-common.constants")
|
||||
local log = require("scada-common.log")
|
||||
-- local log = require("scada-common.log")
|
||||
local psil = require("scada-common.psil")
|
||||
local types = require("scada-common.types")
|
||||
local util = require("scada-common.util")
|
||||
|
@ -3,7 +3,7 @@
|
||||
--
|
||||
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
local _is_pocket_env = pocket or periphemu
|
||||
local _is_pocket_env = pocket ~= nil or periphemu ~= nil
|
||||
|
||||
require("/initenv").init_env()
|
||||
|
||||
|
@ -36,7 +36,7 @@ return function (data, base_page, title, items, scroll_height)
|
||||
local name_list = ListBox{parent=section_div,x=1,y=3,scroll_height=30,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||
local def_list = ListBox{parent=section_view_div,x=1,y=3,scroll_height=scroll_height,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||
|
||||
local _end = nil
|
||||
local _end
|
||||
|
||||
for i = 1, #items do
|
||||
local item = items[i] ---@type pocket_doc_item
|
||||
|
@ -20,12 +20,11 @@ local PushButton = require("graphics.elements.controls.push_button")
|
||||
local ALIGN = core.ALIGN
|
||||
local cpair = core.cpair
|
||||
|
||||
local label = style.label
|
||||
local lu_col = style.label_unit_pair
|
||||
local text_fg = style.text_fg
|
||||
local mode_states = style.icon_states.mode_states
|
||||
local red_ind_s = style.icon_states.red_ind_s
|
||||
local yel_ind_s = style.icon_states.yel_ind_s
|
||||
local label = style.label
|
||||
local lu_col = style.label_unit_pair
|
||||
local text_fg = style.text_fg
|
||||
local red_ind_s = style.icon_states.red_ind_s
|
||||
local yel_ind_s = style.icon_states.yel_ind_s
|
||||
|
||||
-- create a reactor view in the unit app
|
||||
---@param app pocket_app
|
||||
|
@ -109,8 +109,8 @@ return function (app, u_page, panes, tbn_pane, u_id, t_id, ps, update)
|
||||
local rotation = DataIndicator{parent=tbn_ext_div,x=1,y=10,lu_colors=lu_col,label="",unit="",format="%21.12f",value=0,width=21,fg_bg=text_fg}
|
||||
|
||||
rotation.register(ps, "steam", function ()
|
||||
local status, result = pcall(function () return util.turbine_rotation(db.units[u_id].turbine_data_tbl[t_id]) end)
|
||||
if status then rotation.update(result) end
|
||||
local ok, result = pcall(function () return util.turbine_rotation(db.units[u_id].turbine_data_tbl[t_id]) end)
|
||||
if ok then rotation.update(result) end
|
||||
end)
|
||||
|
||||
return tbn_page.nav_to
|
||||
|
Loading…
Reference in New Issue
Block a user