Глобальное изменение: Параллеьный контроль. Новая ветка prd-control. Первый коммит инициализации.
This commit is contained in:
@@ -78,7 +78,10 @@ func on_state_mashine() -> void:
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
print_debug('В сцене ПРД-Н!')
|
||||
|
||||
|
||||
func start_control() -> void:
|
||||
initialize_connections()
|
||||
setup_timer()
|
||||
set_default_state()
|
||||
@@ -111,10 +114,11 @@ func initialize_connections() -> void:
|
||||
|
||||
|
||||
func setup_timer() -> void:
|
||||
add_child(mashine_timer)
|
||||
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
|
||||
mashine_timer.wait_time = constants_n.STATE_MASHINE_TIMER
|
||||
mashine_timer.start()
|
||||
pass
|
||||
#add_child(mashine_timer)
|
||||
#mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
|
||||
#mashine_timer.wait_time = constants_n.STATE_MASHINE_TIMER
|
||||
#mashine_timer.start()
|
||||
|
||||
|
||||
func set_default_state() -> void:
|
||||
@@ -140,7 +144,7 @@ func _enter_tree() -> void:
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
#prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
|
||||
|
||||
func on_line_changed(unit_pribor: Object) -> void:
|
||||
@@ -149,14 +153,15 @@ func on_line_changed(unit_pribor: Object) -> void:
|
||||
|
||||
|
||||
func on_mode_changed(in_tree: bool) -> void:
|
||||
if not in_tree:
|
||||
mashine_timer.stop()
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
else:
|
||||
set_default_state()
|
||||
control_prd_n.state = control_prd_n.STATE_MASHINE.INIT
|
||||
mashine_timer.start()
|
||||
print_debug('Выход из сцены')
|
||||
#if not in_tree:
|
||||
#mashine_timer.stop()
|
||||
#signaller.emit_signal('interfer_off_all')
|
||||
#prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
#else:
|
||||
#set_default_state()
|
||||
#control_prd_n.state = control_prd_n.STATE_MASHINE.INIT
|
||||
#mashine_timer.start()
|
||||
|
||||
|
||||
func power_fill(pow_dic: Dictionary, fs_result: Dictionary) -> void:
|
||||
|
||||
Reference in New Issue
Block a user