remove fs_2

This commit is contained in:
2025-02-06 16:38:45 +03:00
parent d1a8aa7279
commit 529bc8a2d6
6 changed files with 30 additions and 147 deletions

View File

@@ -2,7 +2,7 @@ extends Node2D
signal read_ems_g_start()
signal read_ems_g_finish()
var unit_fs = Fs.FGOS.new()
var unit_fs_1 = Fs.FGOS.new()
var flag_mode = Constants.ADDRESSES[0][3]
var broadcast_packet: PackedByteArray
var node_select1: Node
@@ -74,9 +74,9 @@ func _ready() -> void:
node_select_fs_1.set_node_text(1, 0, 'Литера_2')
node_select_fs_1.set_node_text(0, 1, 'Состояние')
node_select_fs_1.set_node_text(0, 2, 'Частота')
node_select_fs_1.get_node2(1, 2).placeholder_text = '500'
#node_select_fs_1.get_node2(1, 2).placeholder_text = '500'
node_select_fs_1.set_node_text(0, 3, 'Аттенюатор')
node_select_fs_1.get_node2(1, 3).editable = true
#node_select_fs_1.get_node2(1, 3).editable = true
node_select_fs_1.set_node_text(0, 4, 'Генератор')
node_select_fs_1.set_node_text(0, 5, 'fpga')
node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС')
@@ -88,9 +88,10 @@ func _ready() -> void:
node_select_fs_2.set_node_text(1, 0, 'Литера_3')
node_select_fs_2.set_node_text(0, 1, 'Состояние')
node_select_fs_2.set_node_text(0, 2, 'Частота')
node_select_fs_2.get_node2(1, 2).placeholder_text = '500'
#node_select_fs_2.get_node2(1, 2).placeholder_text = '500'
node_select_fs_2.set_node_text(0, 3, 'Аттенюатор')
node_select_fs_2.get_node2(1, 3).editable = true
#node_select_fs_2.get_node2(1, 3).placeholder_text = '38.7'
#node_select_fs_2.get_node2(1, 3).d = true
node_select_fs_2.set_node_text(0, 4, 'Генератор')
node_select_fs_2.set_node_text(0, 5, 'fpga')
node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС')
@@ -134,7 +135,6 @@ func _ready() -> void:
Network.connect('yau_receive', Callable(self, '_on_data_received'))
Network.connect('yau_read_isa', Callable(self, '_on_read_isa'))
Network.connect('data_from_fs_1', Callable(self, '_on_data_fs_1'))
Network.connect('data_from_fs_2', Callable(self, '_on_data_fs_2'))
node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret1'))
node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_1'))
@@ -148,7 +148,6 @@ func _ready() -> void:
node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2'))
node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1'))
node_select_fs_2.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2'))
func draw_control_panel_prd(mode) -> void:
@@ -411,7 +410,6 @@ func on_btn_select(intem_from_sector: int) -> void:
flag_mode = meta[2]
draw_control_panel_prd(flag_mode)
_on_start_fs_1()
_on_start_fs_2()
func _on_zapret1(toggled_on: bool) -> void:
@@ -514,32 +512,21 @@ func set_bits(v, a, m):
func _on_start_fs_1():
unit_fs.start_session()
unit_fs.base_get_current_temp()
func _on_start_fs_2():
unit_fs.start_session()
unit_fs.base_get_current_temp()
unit_fs_1.start_session()
unit_fs_1.base_get_current_temp()
func _on_get_status_1(toggled_btn):
var inverted_state = not toggled_btn
unit_fs.set_gen_state(inverted_state)
unit_fs.get_gen_state()
func _on_get_status_2(toggled_btn):
var inverted_state = not toggled_btn
unit_fs.set_gen_state(inverted_state)
unit_fs.get_gen_state()
unit_fs_1.set_gen_state(inverted_state)
unit_fs_1.get_gen_state()
func _on_set_ferq():
var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000
unit_fs.set_carrier(freq)
unit_fs_1.set_carrier(freq)
func _on_set_att():
var att = float($set_space/write_to_set_att.get_text())
unit_fs.set_att_batch(att)
unit_fs_1.set_att_batch(att)