Доработка. Индикация цветом достоверности данных
This commit is contained in:
@@ -36,6 +36,7 @@ func on_line_changed_sch3(unit_sch3):
|
||||
regs_input.clear()
|
||||
switches_sync = false
|
||||
$margin/vbox/grid1/lbl_freq.text = '<нет данных>'
|
||||
$margin/vbox/grid1/lbl_freq.self_modulate = Color.CADET_BLUE
|
||||
$margin/vbox/grid1/state_freq.texture = textures[STATE_VAL.NONE]
|
||||
$margin/vbox/grid/state.texture = textures[STATE_VAL.NONE]
|
||||
|
||||
@@ -127,6 +128,7 @@ func on_input(base_addr: int, data: Array):
|
||||
regs_input[base_addr + i] = data[i]
|
||||
# Таблица 3.15, Регистр PowerState
|
||||
$margin/vbox/grid1/lbl_freq.text = '%d' % (regs_input[4] & 0x1ff)
|
||||
$margin/vbox/grid1/lbl_freq.self_modulate = Color.WHITE
|
||||
$margin/vbox/grid1/state_freq.texture \
|
||||
= textures[STATE_VAL.GOOD] if regs_input[4] & (1 << 15) \
|
||||
else textures[STATE_VAL.ERROR]
|
||||
|
||||
Reference in New Issue
Block a user