add optbtn
This commit is contained in:
@@ -39,7 +39,7 @@ func _ready() -> void:
|
||||
node_select_device.set_columns_min_size([100, 100])
|
||||
|
||||
# Контроль
|
||||
var node_control_device = $TabContainer/ControlPanel/control_dev/control_tbl
|
||||
var node_control_device = $TabContainer/ControlPanel/control_tbl
|
||||
for i in Constants.CONTROL_DEVICE.size():
|
||||
CONTROL_TABLE.append([Constants.TableNode])
|
||||
draw_tabl(node_control_device, CONTROL_TABLE, CONTROL_TABLE.size())
|
||||
@@ -57,14 +57,14 @@ func _ready() -> void:
|
||||
## From Network status about yau-07
|
||||
func _on_yau_status(yau_status):
|
||||
if yau_status:
|
||||
$TabContainer/ControlPanel/control_dev/control_tbl.get_node2(0, 0).text = 'ЯУ-07Б НА СВЯЗИ'
|
||||
$TabContainer/ControlPanel/control_dev/control_tbl.get_node2(0, 0).modulate = Color.GREEN
|
||||
$TabContainer/ControlPanel/control_tbl.get_node2(0, 0).text = 'ЯУ-07Б НА СВЯЗИ'
|
||||
$TabContainer/ControlPanel/control_tbl.get_node2(0, 0).modulate = Color.GREEN
|
||||
flag_yau_control = true
|
||||
else:
|
||||
$TabContainer/ControlPanel/control_dev/control_tbl.get_node2(0, 0).text = 'НЕТ СВЯЗИ С ЯУ-07Б'
|
||||
$TabContainer/ControlPanel/control_dev/control_tbl.get_node2(0, 0).modulate = Color.RED
|
||||
$TabContainer/ControlPanel/control_tbl.get_node2(0, 0).text = 'НЕТ СВЯЗИ С ЯУ-07Б'
|
||||
$TabContainer/ControlPanel/control_tbl.get_node2(0, 0).modulate = Color.RED
|
||||
for dev in (Constants.CONTROL_DEVICE.size() - 1):
|
||||
var node_board = $TabContainer/ControlPanel/control_dev/control_tbl.get_node2(0, dev+1)
|
||||
var node_board = $TabContainer/ControlPanel/control_tbl.get_node2(0, dev+1)
|
||||
node_board.modulate = Color.RED
|
||||
flag_yau_control = false
|
||||
|
||||
@@ -95,10 +95,11 @@ func _on_data_received(data_from_yau_07):
|
||||
|
||||
## УГ
|
||||
#node_select1.set_node_text(2, 0, '%d' % dry_contact)
|
||||
var node_control_device = $TabContainer/ControlPanel/control_dev/control_tbl
|
||||
var node_control_device = $TabContainer/ControlPanel/control_tbl
|
||||
for i in 4:
|
||||
var node_board = node_control_device.get_node2(0, i+2)
|
||||
var j = int(status_board & (1 << i) == 0 and flag_yau_control)
|
||||
|
||||
node_board.text = Constants.CONTROL_BOARD[i][j]
|
||||
node_board.modulate = [Color.GREEN, Color.RED][j]
|
||||
|
||||
@@ -109,7 +110,7 @@ func _on_data_received(data_from_yau_07):
|
||||
node_power_supply.modulate = [Color.GREEN, Color.RED][j]
|
||||
|
||||
## EMS G
|
||||
var CONTROL_FRAME = [$TabContainer/ControlPanel/control_dev/SZI_x, $TabContainer/ControlPanel/control_dev/SZI_x2, $TabContainer/ControlPanel/control_dev/SZI_x3, $TabContainer/ControlPanel/control_dev/SZI_x4, $TabContainer/ControlPanel/control_dev/SZI_x5]
|
||||
var CONTROL_FRAME = [$TabContainer/ControlPanel/SZI_x, $TabContainer/ControlPanel/SZI_x2, $TabContainer/ControlPanel/SZI_x3, $TabContainer/ControlPanel/SZI_x4, $TabContainer/ControlPanel/SZI_x5]
|
||||
for i in 5:
|
||||
var node_ems_g = node_control_device.get_node2(0, i + 14)
|
||||
var j: int = 0
|
||||
@@ -222,8 +223,6 @@ func _on_control_button() -> void:
|
||||
$Background/side_panel/select_control.button_pressed = true
|
||||
$Background/side_panel/select_prd.button_pressed = false
|
||||
$Background/side_panel/select_ems_g.button_pressed = false
|
||||
#$TabContainer/ControlPanel/control_dev.visible = toggled_on
|
||||
#$TabContainer/ControlPanel/Controlpanel.visible = toggled_on
|
||||
|
||||
|
||||
func _on_emsg_select() -> void:
|
||||
|
||||
@@ -11,6 +11,7 @@ const TEMP: float = 115.0 / (MAXIMUM_CODE_ADC - MINIMUM_CODE_AD)
|
||||
const TableNode = preload("res://table/node.tscn")
|
||||
const TableList = preload("res://table/node_list.tscn")
|
||||
const Switch = preload("res://table/switch.tscn")
|
||||
const SocketStatus = preload("res://table/socket_status.tscn")
|
||||
const SELECT_DEVICE: Array = [[TableNode, TableList]]
|
||||
const CONTROL_DEVICE: Array = ['ЯЧЕЙКА ЯУ-07Б', 'ФС', 'ЯЧЕЙКА ЭМС-Г', 'ЯЧЕЙКА УГ', 'ЯЧЕЙКА УКП №1', 'ЯЧЕЙКА УКП №2', 'ИП МАА №1', 'ИП МАА №2', 'ИП9-50 №1', 'ИП9-50 №2', 'ИП12-50 №1', '-', '-','ИП5-25', 'Х3:2(СЗИ2 от УФ)', 'Х3:19(СИ2 от ФС)', 'Х3:11(СИ2 в УФ)', 'Х3:14(Модуляция)', 'Х3:27(ФГОЗ)']
|
||||
const ROWS_REGS_DATA: Array = [
|
||||
@@ -100,6 +101,12 @@ const OUT_EMS_G: Array = [
|
||||
'31/:47',
|
||||
'32/:48',
|
||||
'33/:49',]
|
||||
const OUT_x128 = [
|
||||
'Р',
|
||||
'К',
|
||||
'0',
|
||||
'1',]
|
||||
|
||||
enum MODE {
|
||||
PRD_K,
|
||||
PRD_B,
|
||||
|
||||
Reference in New Issue
Block a user