Отладка констант

This commit is contained in:
QAMuser
2024-10-09 11:58:03 +03:00
parent b501a60e5b
commit b7359c5fab
2 changed files with 15 additions and 9 deletions

16
Main.gd
View File

@@ -94,7 +94,15 @@ func poll_receive(sock: Socket) -> bool: ## Приёмник
var rx_data = sock.get_packet()
var addr_receive = sock.get_packet_ip()
var port_receive = sock.get_packet_port()
$BROADCAST.text = 'BROADCAST: ' + str(rx_data)
if rx_data:
$BROADCAST.text = 'BROADCAST: ' + str(rx_data)
var line_yau07_control = node_select.get_node2(0, 0)
line_yau07_control.text = ' ЯУ-07Б НА СВЯЗИ'
line_yau07_control.modulate = Color(0, 1, 0, 1)
else:
var line_yau07_control = node_select.get_node2(0, 0)
line_yau07_control.text = ' НЕТ СВЯЗИ С ЯУ-07'
line_yau07_control.modulate = Color(1, 0, 0, 1)
if (address == addr_receive) and (port == port_receive):
unit.parse(rx_data)
return false
@@ -128,12 +136,10 @@ func on_timer() -> void:
func on_line_changed(_unit) -> void:
print_debug()
if unit.online:
var line_yau07_control = node_select.get_node2(0, 0)
line_yau07_control.text = ' ЯУ-07Б НА СВЯЗИ'
var line_yau07_control = node_select.get_node2(0, 1)
line_yau07_control.modulate = Color(0, 1, 0, 1)
else:
var line_yau07_control = node_select.get_node2(0, 0)
line_yau07_control.text = ' НЕТ СВЯЗИ С ЯУ-07'
var line_yau07_control = node_select.get_node2(0, 1)
line_yau07_control.modulate = Color(1, 0, 0, 1)
var light_interval = node_select.get_node2(1, 2)
light_interval.modulate = Color(0.5, 0.5, 0.5, 1)