luacheck fixes

This commit is contained in:
Mikayla 2024-06-14 16:14:24 +00:00
parent 00cacd6d0a
commit 697a3d6f6b
5 changed files with 10 additions and 11 deletions

View File

@ -3,7 +3,7 @@
-- --
local const = require("scada-common.constants") 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 psil = require("scada-common.psil")
local types = require("scada-common.types") local types = require("scada-common.types")
local util = require("scada-common.util") local util = require("scada-common.util")

View File

@ -3,7 +3,7 @@
-- --
---@diagnostic disable-next-line: undefined-global ---@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() require("/initenv").init_env()

View File

@ -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 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 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 for i = 1, #items do
local item = items[i] ---@type pocket_doc_item local item = items[i] ---@type pocket_doc_item

View File

@ -20,12 +20,11 @@ local PushButton = require("graphics.elements.controls.push_button")
local ALIGN = core.ALIGN local ALIGN = core.ALIGN
local cpair = core.cpair local cpair = core.cpair
local label = style.label local label = style.label
local lu_col = style.label_unit_pair local lu_col = style.label_unit_pair
local text_fg = style.text_fg 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 red_ind_s = style.icon_states.red_ind_s local yel_ind_s = style.icon_states.yel_ind_s
local yel_ind_s = style.icon_states.yel_ind_s
-- create a reactor view in the unit app -- create a reactor view in the unit app
---@param app pocket_app ---@param app pocket_app

View File

@ -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} 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 () rotation.register(ps, "steam", function ()
local status, result = pcall(function () return util.turbine_rotation(db.units[u_id].turbine_data_tbl[t_id]) end) local ok, result = pcall(function () return util.turbine_rotation(db.units[u_id].turbine_data_tbl[t_id]) end)
if status then rotation.update(result) end if ok then rotation.update(result) end
end) end)
return tbn_page.nav_to return tbn_page.nav_to