modul fs 1

This commit is contained in:
2025-02-06 22:27:26 +03:00
parent da73feed4b
commit a2467c3d8b
4 changed files with 99 additions and 57 deletions

View File

@@ -2,6 +2,7 @@ extends Node
# ЯУ-07 Блок
var unit = Yau07.YaU07.new('ЯУ-07Б')
var unit_fs_1 = Fs.FGOS.new()
var soc_unicast: Socket
var soc_brodcast: Socket
var ip_address_yau: String = Constants.ADDRESSES[0][1]
@@ -27,6 +28,7 @@ signal yau_read_isa(_unit_isa_ports)
signal data_send()
signal data_from_fs_1(data:PackedByteArray)
signal data_from_fs_2(data:PackedByteArray)
signal port_opened(port_name: String)
signal port_closed(port_name: String)
signal port_error(error_str: String)
@@ -73,7 +75,8 @@ func poll_receive_fs(client: StreamPeerTCP):
if peer.get_available_bytes() > 0:
var rx_data: PackedByteArray
rx_data.append_array(peer.get_data(peer.get_available_bytes())[1])
emit_signal("data_from_fs_1", rx_data)
#emit_signal("data_from_fs_1", rx_data)
emit_signal("data_from_fs_2", rx_data)
emit_signal("port_opened", ip_fs_1)
if state_fs == Constants.STATE.SEND:
state_fs = Constants.STATE.DONE
@@ -209,3 +212,26 @@ func disconnect_fs(client_for_leave):
client_for_leave.disconnect_from_host()
state_fs = Constants.STATE.IDLE
command_stack = []
func start_work_fs():
unit_fs_1.start_session()
unit_fs_1.base_get_current_temp()
func get_fs_gen_status(state_gen):
unit_fs_1.set_gen_state(state_gen)
unit_fs_1.get_gen_state()
unit_fs_1.base_get_current_temp()
func set_fs_ferq_carrier(freq: int):
unit_fs_1.set_carrier(freq)
unit_fs_1.base_get_current_temp()
unit_fs_1.get_carrier()
func set_fs_attenuation(attenuation: float):
unit_fs_1.set_att_batch(attenuation)
unit_fs_1.get_att_batch()
unit_fs_1.base_get_current_temp()