mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
switched to using LEDPair elements for colorblind mode network lights
This commit is contained in:
parent
a00a824a7f
commit
d6175e5cec
@ -22,6 +22,7 @@ local TextBox = require("graphics.elements.textbox")
|
||||
local TabBar = require("graphics.elements.controls.tabbar")
|
||||
|
||||
local LED = require("graphics.elements.indicators.led")
|
||||
local LEDPair = require("graphics.elements.indicators.ledpair")
|
||||
local RGBLED = require("graphics.elements.indicators.ledrgb")
|
||||
|
||||
local LINK_STATE = types.PANEL_LINK_STATE
|
||||
@ -64,8 +65,8 @@ local function init(panel, num_units)
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = RGBLED{parent=system,label="NT LINKED",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_ver = RGBLED{parent=system,label="NT VERSION",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
|
||||
nt_lnk.register(ps, "link_state", function (state)
|
||||
local value = 2
|
||||
|
@ -64,8 +64,8 @@ local function init(panel)
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(databus.ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = RGBLED{parent=system,label="NT LINKED",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_ver = RGBLED{parent=system,label="NT VERSION",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.red_off,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)
|
||||
|
@ -16,6 +16,7 @@ local TextBox = require("graphics.elements.textbox")
|
||||
|
||||
local DataIndicator = require("graphics.elements.indicators.data")
|
||||
local LED = require("graphics.elements.indicators.led")
|
||||
local LEDPair = require("graphics.elements.indicators.ledpair")
|
||||
local RGBLED = require("graphics.elements.indicators.ledrgb")
|
||||
|
||||
local LINK_STATE = types.PANEL_LINK_STATE
|
||||
@ -56,8 +57,8 @@ local function init(panel, units)
|
||||
network.update(types.PANEL_LINK_STATE.DISCONNECTED)
|
||||
network.register(databus.ps, "link_state", network.update)
|
||||
else
|
||||
local nt_lnk = RGBLED{parent=system,label="NT LINKED",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_ver = RGBLED{parent=system,label="NT VERSION",colors={colors.red_off,colors.red,colors.green}}
|
||||
local nt_lnk = LEDPair{parent=system,label="NT LINKED",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
local nt_ver = LEDPair{parent=system,label="NT VERSION",off=colors.red_off,c1=colors.red,c2=colors.green}
|
||||
|
||||
nt_lnk.register(databus.ps, "link_state", function (state)
|
||||
local value = 2
|
||||
|
Loading…
Reference in New Issue
Block a user