mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#457 added ind_bkg for front panels
This commit is contained in:
parent
bb2c07963b
commit
2442e7f972
@ -61,12 +61,12 @@ local function init(panel, num_units)
|
||||
local modem = LED{parent=system,label="MODEM",colors=led_grn}
|
||||
|
||||
if not style.colorblind then
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,colors.gray}}
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,style.ind_bkg}}
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
|
||||
nt_lnk.register(ps, "link_state", function (state)
|
||||
local value = 2
|
||||
|
@ -60,12 +60,12 @@ local function init(panel)
|
||||
local modem = LED{parent=system,label="MODEM",colors=ind_grn}
|
||||
|
||||
if not style.colorblind then
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,colors.gray}}
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,style.ind_bkg}}
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(databus.ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
local nt_col = LED{parent=system,label="NT COLLISION",colors=ind_red}
|
||||
|
||||
nt_lnk.register(databus.ps, "link_state", function (state)
|
||||
|
@ -2,6 +2,8 @@
|
||||
-- Graphics Style Options
|
||||
--
|
||||
|
||||
local util = require("scada-common.util")
|
||||
|
||||
local core = require("graphics.core")
|
||||
local themes = require("graphics.themes")
|
||||
|
||||
@ -30,6 +32,8 @@ function style.set_theme(fp, color_mode)
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.colorblind = color_mode ~= themes.COLOR_MODE.STANDARD
|
||||
|
||||
style.ind_bkg = util.trinary(style.colorblind and (color_mode ~= themes.COLOR_MODE.BLUE_IND), colors.black, colors.gray)
|
||||
end
|
||||
|
||||
return style
|
||||
|
@ -53,12 +53,12 @@ local function init(panel, units)
|
||||
local modem = LED{parent=system,label="MODEM",colors=ind_grn}
|
||||
|
||||
if not style.colorblind then
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,colors.gray}}
|
||||
local network = RGBLED{parent=system,label="NETWORK",colors={colors.green,colors.red,colors.orange,colors.yellow,style.ind_bkg}}
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(databus.ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.black,c1=colors.red,c2=colors.green}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=style.ind_bkg,c1=colors.red,c2=colors.green}
|
||||
|
||||
nt_lnk.register(databus.ps, "link_state", function (state)
|
||||
local value = 2
|
||||
|
@ -2,6 +2,8 @@
|
||||
-- Graphics Style Options
|
||||
--
|
||||
|
||||
local util = require("scada-common.util")
|
||||
|
||||
local core = require("graphics.core")
|
||||
local themes = require("graphics.themes")
|
||||
|
||||
@ -29,6 +31,8 @@ function style.set_theme(fp, color_mode)
|
||||
style.fp = themes.get_fp_style(style.theme)
|
||||
|
||||
style.colorblind = color_mode ~= themes.COLOR_MODE.STANDARD
|
||||
|
||||
style.ind_bkg = util.trinary(style.colorblind and (color_mode ~= themes.COLOR_MODE.BLUE_IND), colors.black, colors.gray)
|
||||
end
|
||||
|
||||
return style
|
||||
|
Loading…
Reference in New Issue
Block a user