добавка модуляции
This commit is contained in:
@@ -80,8 +80,10 @@ func _ready() -> void:
|
||||
node_select_fs_1.set_node_text(0, 3, 'Аттенюатор')
|
||||
node_select_fs_1.get_node2(1, 3).placeholder_text = 'в dB'
|
||||
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, 4, 'Модуляция')
|
||||
node_select_fs_1.get_node2(1, 4).add_item('Const')
|
||||
node_select_fs_1.get_node2(1, 4).add_item('MSK')
|
||||
node_select_fs_1.set_node_text(0, 5, 'Генератор ФС')
|
||||
node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС')
|
||||
node_select_fs_1.set_node_text(0, 7, 'Фильтр CAN')
|
||||
node_select_fs_1.get_node2(1, 7).placeholder_text = 'в МГц'
|
||||
@@ -100,8 +102,10 @@ func _ready() -> void:
|
||||
node_select_fs_2.set_node_text(0, 3, 'Аттенюатор ФС')
|
||||
node_select_fs_2.get_node2(1, 3).placeholder_text = 'в dB'
|
||||
node_select_fs_2.get_node2(1, 3).editable = 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, 4, 'Модуляция')
|
||||
node_select_fs_2.get_node2(1, 4).add_item('Const')
|
||||
node_select_fs_2.get_node2(1, 4).add_item('MSK')
|
||||
node_select_fs_2.set_node_text(0, 5, 'Генератор ФС')
|
||||
node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС')
|
||||
node_select_fs_2.set_node_text(0, 7, 'Фильтр CAN')
|
||||
node_select_fs_2.get_node2(1, 7).placeholder_text = 'в МГц'
|
||||
@@ -164,18 +168,20 @@ func _ready() -> void:
|
||||
node_select_yau_07b_2.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_2'))
|
||||
node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2'))
|
||||
## FS 1
|
||||
node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1'))
|
||||
node_select_fs_1.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_1'))
|
||||
node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_1'))
|
||||
node_select_fs_1.get_node2(1, 4).connect('item_selected', Callable(self, '_on_modul_fs_1'))
|
||||
node_select_fs_1.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1'))
|
||||
node_select_fs_1.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro'))
|
||||
node_select_fs_1.get_node2(1, 8).get_child(1, false).connect('toggled', Callable(self, '_on_status_can_macro_1'))
|
||||
## FS 2
|
||||
node_select_fs_2.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2'))
|
||||
node_select_fs_2.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_2'))
|
||||
node_select_fs_2.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_2'))
|
||||
node_select_fs_2.get_node2(1, 4).connect('item_selected', Callable(self, '_on_modul_fs_2'))
|
||||
node_select_fs_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2'))
|
||||
node_select_fs_2.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro_2'))
|
||||
node_select_fs_2.get_node2(1, 8).get_child(1, false).connect('toggled', Callable(self, '_on_status_can_macro_2'))
|
||||
|
||||
|
||||
|
||||
func on_device_selected(selected_index: int) -> void:
|
||||
var get_select_device = $TabContainer/PRD/select_dev.get_node2(1, 0)
|
||||
@@ -264,14 +270,14 @@ func _on_data_fs_1(fs_1_data):
|
||||
Constants.CMD.READ_GEN_STATUS:
|
||||
if GRP == Constants.GROUP.GENERATOR:
|
||||
if fs_1_data.decode_u32(0xC) == 0:
|
||||
node_select_fs_1.set_node_text(2, 4, 'Включен')
|
||||
node_select_fs_1.get_node2(2, 4).modulate = Color.AQUAMARINE
|
||||
node_select_fs_1.set_node_text(2, 5, 'Включен')
|
||||
node_select_fs_1.get_node2(2, 5).modulate = Color.AQUAMARINE
|
||||
else:
|
||||
node_select_fs_1.set_node_text(2, 4, 'Отключен')
|
||||
node_select_fs_1.get_node2(2, 4).modulate = Color.CRIMSON
|
||||
node_select_fs_1.set_node_text(2, 5, 'Отключен')
|
||||
node_select_fs_1.get_node2(2, 5).modulate = Color.CRIMSON
|
||||
Constants.CMD.BASE_GET_CURRENT_TEMP:
|
||||
if GRP == Constants.GROUP.BASE:
|
||||
node_select_fs_1.set_node_text(1, 5, '%.2f' % fs_1_data.decode_float(0xC) + ' °C')
|
||||
node_select_fs_1.set_node_text(2, 0, '%.2f' % fs_1_data.decode_float(0xC) + ' °C')
|
||||
Constants.CMD.BASE_CAN_MACRO_READ:
|
||||
if GRP == Constants.GROUP.BASE:
|
||||
node_select_fs_1.set_node_text(2, 7, str(fs_1_data.decode_u16(0x20)) + ' МГц')
|
||||
@@ -298,7 +304,7 @@ func _on_data_fs_2(fs_2_data):
|
||||
node_select_fs_2.get_node2(2, 4).modulate = Color.CRIMSON
|
||||
Constants.CMD.BASE_GET_CURRENT_TEMP:
|
||||
if GRP == Constants.GROUP.BASE:
|
||||
node_select_fs_2.set_node_text(1, 5, '%.2f' % fs_2_data.decode_float(0xC) + ' °C')
|
||||
node_select_fs_2.set_node_text(2, 0, '%.2f' % fs_2_data.decode_float(0xC) + ' °C')
|
||||
Constants.CMD.BASE_CAN_MACRO_READ:
|
||||
if GRP == Constants.GROUP.BASE:
|
||||
node_select_fs_2.set_node_text(2, 7, str(fs_2_data.decode_u16(0x20)) + ' МГц')
|
||||
@@ -579,6 +585,13 @@ func _on_start_fs_1():
|
||||
Network.start_work_fs()
|
||||
|
||||
|
||||
func _on_modul_fs_1(modulation_select_1) -> void:
|
||||
if modulation_select_1 == 0:
|
||||
Network.set_configure_gen_const_1()
|
||||
elif modulation_select_1 == 1:
|
||||
Network.set_configure_gen_msk_1()
|
||||
|
||||
|
||||
func _on_get_status_1(toggled_btn):
|
||||
var inverted_state = not toggled_btn
|
||||
Network.get_fs_gen_status(inverted_state)
|
||||
@@ -629,3 +642,18 @@ func _on_set_base_can_macro_2(can_freq: String):
|
||||
|
||||
func _on_status_can_macro_2(toggled_btn: bool):
|
||||
Network.status_can_macro_2(toggled_btn)
|
||||
|
||||
|
||||
func _on_modul_fs_2(modulation_select_2) -> void:
|
||||
if modulation_select_2 == 0:
|
||||
Network.set_configure_gen_const_2()
|
||||
elif modulation_select_2 == 1:
|
||||
Network.set_configure_gen_msk_2()
|
||||
|
||||
|
||||
func _on_fs_mod_pressed() -> void:
|
||||
Network.set_configure_gen_msk()
|
||||
|
||||
|
||||
func _on_fs_mod_const() -> void:
|
||||
Network.set_configure_gen_const()
|
||||
|
||||
Reference in New Issue
Block a user