Доработка. Режим Контроль. Больше времени для получения ответа от АФСП
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
[sub_resource type="GDScript" id="GDScript_yhnwg"]
|
||||
script/source = "extends Timer
|
||||
|
||||
func _ready(): wait_time = ProjectSettings.get_setting('application/config/unit_rr_request_period')
|
||||
func _ready(): wait_time = ProjectSettings.get_setting('application/config/unit_bpo_request_period')
|
||||
"
|
||||
|
||||
[node name="pribor_afsp" type="Control"]
|
||||
@@ -29,7 +29,7 @@ projsettings_path_left = "application/config/Адрес АФСП левого б
|
||||
projsettings_path_right = "application/config/Адрес АФСП правого борта"
|
||||
|
||||
[node name="timer" type="Timer" parent="request"]
|
||||
wait_time = 20.0
|
||||
wait_time = 30.0
|
||||
autostart = true
|
||||
script = SubResource("GDScript_yhnwg")
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ projsettings_path_left = "application/config/Адрес АФСП левого б
|
||||
projsettings_path_right = "application/config/Адрес АФСП правого борта"
|
||||
|
||||
[node name="timer" type="Timer" parent="request"]
|
||||
wait_time = 30.0
|
||||
autostart = true
|
||||
script = SubResource("GDScript_yhnwg")
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ class_name pribor_afsp extends 'res://scenes/контроль/прибор.gd'
|
||||
static var json_conv: JSON = JSON.new()
|
||||
static var node_maper = load('res://scenes/контроль/node-maper.gd')
|
||||
|
||||
# SystemName: "gen" DevList - там состояние связи с генератором по кан шине
|
||||
|
||||
func _on_request_completed(result, _response_code, headers, body: PackedByteArray):
|
||||
|
||||
@@ -50,7 +51,7 @@ func _on_request_completed(result, _response_code, headers, body: PackedByteArra
|
||||
var received_afsp_name: StringName = ret_val[0]
|
||||
|
||||
if this_afsp_name != received_afsp_name:
|
||||
push_error('не известное устройство: \"%s\"' % received_afsp_name)
|
||||
push_error('не известное устройство: \"%s\", ожидадось: \"%s\"' % [received_afsp_name, this_afsp_name])
|
||||
return
|
||||
|
||||
if not unit_instance.online:
|
||||
|
||||
@@ -198,13 +198,14 @@ self_size = Vector2i(50, 145)
|
||||
fname = "Яч. связи"
|
||||
|
||||
[node name="request" type="HTTPRequest" parent="."]
|
||||
use_threads = true
|
||||
script = ExtResource("4_crej3")
|
||||
projsettings_path_left = "application/config/Адрес БПО левого борта"
|
||||
projsettings_path_right = "application/config/Адрес БПО правого борта"
|
||||
projsettings_path_wait_time = "application/config/Период опроса состояния БПО, секунды"
|
||||
|
||||
[node name="timer" type="Timer" parent="request"]
|
||||
wait_time = 5.0
|
||||
wait_time = 30.0
|
||||
autostart = true
|
||||
script = SubResource("GDScript_bhc4e")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user