From 440989aed61e6630d9f4cd20fa864b4fd3c7e1a3 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Mon, 14 Oct 2024 12:12:35 -0400 Subject: [PATCH] comments and removed unused variables --- graphics/elements/form/NumberField.lua | 2 +- pocket/iocontrol.lua | 1 - pocket/ui/apps/process.lua | 24 ++++++++++-------------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/graphics/elements/form/NumberField.lua b/graphics/elements/form/NumberField.lua index 88b07e1..03e63e5 100644 --- a/graphics/elements/form/NumberField.lua +++ b/graphics/elements/form/NumberField.lua @@ -248,7 +248,7 @@ return function (args) local NumberField, id = e.complete(true) -- get the numeric value of this field - ---@return number + ---@return number value the value, or 0 if not a valid number function NumberField.get_numeric() return tonumber(e.value) or 0 end diff --git a/pocket/iocontrol.lua b/pocket/iocontrol.lua index 7b4cbd9..e72a573 100644 --- a/pocket/iocontrol.lua +++ b/pocket/iocontrol.lua @@ -6,7 +6,6 @@ local const = require("scada-common.constants") local psil = require("scada-common.psil") local types = require("scada-common.types") local util = require("scada-common.util") -local log = require("scada-common.log") local process = require("pocket.process") diff --git a/pocket/ui/apps/process.lua b/pocket/ui/apps/process.lua index 00c9a52..5b014ce 100644 --- a/pocket/ui/apps/process.lua +++ b/pocket/ui/apps/process.lua @@ -25,31 +25,27 @@ local RadioButton = require("graphics.elements.controls.RadioButton") local NumberField = require("graphics.elements.form.NumberField") -local DataIndicator = require("graphics.elements.indicators.DataIndicator") local IconIndicator = require("graphics.elements.indicators.IconIndicator") -local AUTO_GROUP = types.AUTO_GROUP - -local ALIGN = core.ALIGN -local cpair = core.cpair +local ALIGN = core.ALIGN +local cpair = core.cpair local border = core.border local APP_ID = pocket.APP_ID -local label_fg_bg = style.label -local lu_col = style.label_unit_pair -local text_fg = style.text_fg +local label_fg_bg = style.label +local text_fg = style.text_fg local field_fg_bg = style.field local field_dis_fg_bg = style.field_disable -local red_ind_s = style.icon_states.red_ind_s -local yel_ind_s = style.icon_states.yel_ind_s -local grn_ind_s = style.icon_states.grn_ind_s -local wht_ind_s = style.icon_states.wht_ind_s +local red_ind_s = style.icon_states.red_ind_s +local yel_ind_s = style.icon_states.yel_ind_s +local grn_ind_s = style.icon_states.grn_ind_s +local wht_ind_s = style.icon_states.wht_ind_s -local hzd_fg_bg = style.hzd_fg_bg -local dis_colors = cpair(colors.white, colors.lightGray) +local hzd_fg_bg = style.hzd_fg_bg +local dis_colors = cpair(colors.white, colors.lightGray) -- new process control page view ---@param root Container parent