Compare commits
158 Commits
19c4744a51
...
38529ac0cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38529ac0cc | ||
|
|
6db678b163 | ||
|
|
124b75dbde | ||
|
|
803d2eff4f | ||
|
|
29e5382c1e | ||
|
|
96436596d8 | ||
|
|
b3455947fd | ||
|
|
57fc201212 | ||
|
|
2abe5741eb | ||
|
|
ef063645ee | ||
|
|
4d0ea0f84e | ||
|
|
d7cba379cc | ||
|
|
f41e59b119 | ||
|
|
b919e6498f | ||
|
|
8039e6bcb4 | ||
|
|
4a928abc37 | ||
|
|
6c46acc6b6 | ||
|
|
94084fead0 | ||
|
|
e4dfdeb899 | ||
|
|
f41c0ee75c | ||
|
|
9fd258a745 | ||
|
|
49d7b71072 | ||
|
|
ba4d2458af | ||
|
|
407f9956fa | ||
|
|
33a5dea6a0 | ||
|
|
446f8b6afc | ||
|
|
d00fb92520 | ||
|
|
21a0c0c012 | ||
|
|
6f7bf0a5be | ||
|
|
193f0ab498 | ||
|
|
5c6b6e80c9 | ||
|
|
a2d56a7553 | ||
|
|
3eef38f56a | ||
|
|
159956e02f | ||
|
|
fb7853a5be | ||
|
|
cd34aa9100 | ||
|
|
4079d55aa5 | ||
|
|
7b80852017 | ||
|
|
68ab1b325d | ||
|
|
1cb3985c70 | ||
|
|
cf3b02cec2 | ||
|
|
c5da181fb7 | ||
|
|
528566e949 | ||
|
|
212ce180d1 | ||
|
|
261a994466 | ||
|
|
07b41211c7 | ||
|
|
0fc98c5e98 | ||
|
|
59da91d98c | ||
|
|
959ef1192c | ||
|
|
0b2c101a4b | ||
|
|
731ce8b3dd | ||
|
|
86716437cf | ||
|
|
901d160c50 | ||
|
|
26bb36a333 | ||
|
|
8c4a966654 | ||
|
|
aea48c7d9e | ||
|
|
dac7987585 | ||
|
|
190f06b72c | ||
|
|
c5bae21436 | ||
|
|
e48e8767e5 | ||
|
|
97bbd85622 | ||
|
|
de92de2994 | ||
|
|
df80508592 | ||
|
|
282a3a5218 | ||
|
|
e52f465654 | ||
|
|
8dac0449a3 | ||
|
|
4d1dc7a9c2 | ||
|
|
b27afc854e | ||
|
|
eabc48b95f | ||
|
|
f3be1e39db | ||
|
|
2f9ad52a9c | ||
|
|
398ff23291 | ||
|
|
d14d1724af | ||
|
|
720cba0ae5 | ||
|
|
609e051e2a | ||
|
|
bd43a6bae1 | ||
|
|
570966c862 | ||
|
|
3b3f9f7582 | ||
|
|
8f2b5aa05b | ||
|
|
ed32292bc4 | ||
|
|
d97f9191a3 | ||
|
|
dd7659b113 | ||
|
|
0d0c52856d | ||
|
|
1c8e2aa1d4 | ||
|
|
7bfa6413ba | ||
|
|
645df6d0b7 | ||
|
|
5988330ddb | ||
|
|
1a08b5ae50 | ||
|
|
3e0f667fc5 | ||
|
|
1f6b5d8f21 | ||
|
|
996aee4a17 | ||
|
|
984b1af114 | ||
|
|
42ed766c58 | ||
|
|
8f4134a911 | ||
|
|
15245b4586 | ||
|
|
5e9ef98301 | ||
|
|
9353da816d | ||
|
|
416e93c4e4 | ||
|
|
23acb2703e | ||
|
|
3c0fa8be82 | ||
|
|
ef5cffe093 | ||
|
|
aae9bc6795 | ||
|
|
6bcaf2561c | ||
|
|
ea4e464e9d | ||
|
|
043646a4a8 | ||
|
|
b91d2c6afe | ||
|
|
1bac9dc496 | ||
|
|
484ca3f320 | ||
|
|
36999bf3c1 | ||
|
|
54eb0df9cc | ||
|
|
8a8f9d7649 | ||
|
|
c7fd49eead | ||
|
|
61bf491425 | ||
|
|
27adb42238 | ||
|
|
abfb98db46 | ||
|
|
6950b09879 | ||
|
|
4ad5652737 | ||
|
|
f01b5316a7 | ||
|
|
7320dd47f2 | ||
|
|
d0d9e2630d | ||
|
|
f769d761db | ||
|
|
baff756648 | ||
|
|
42ca66d61d | ||
|
|
abcb5ec40c | ||
|
|
3e7c579a3d | ||
|
|
9eb9873c64 | ||
|
|
7373685e2a | ||
|
|
aedc9c3741 | ||
|
|
ab24add92b | ||
|
|
26fbee31c6 | ||
|
|
2bf5ead89a | ||
|
|
fa8b4146f0 | ||
|
|
486a2fb8b5 | ||
|
|
dd6393753c | ||
|
|
2f37068c61 | ||
|
|
6796d17b30 | ||
|
|
9a5c0122ad | ||
|
|
98c29329d0 | ||
|
|
28ab8f05c1 | ||
|
|
bbfae5e341 | ||
|
|
af4d96ed60 | ||
|
|
81ae47a3d9 | ||
|
|
6d46fb5b4c | ||
|
|
f87cb28e9b | ||
|
|
a074ab1b1e | ||
|
|
5407cb0570 | ||
|
|
8baf727e3f | ||
|
|
e2b0f09fb9 | ||
|
|
aee7e2d5d3 | ||
|
|
216c5f1960 | ||
|
|
6bbd8333f9 | ||
|
|
e372322806 | ||
|
|
309d23ea2c | ||
|
|
fa8d677d37 | ||
|
|
3b1d11af88 | ||
|
|
8fccaa0e66 | ||
|
|
0c85a85d7c | ||
|
|
f4f290849c |
14
.gitea/workflows/test.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Локальный тест
|
||||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: [For testing repo]
|
||||
steps:
|
||||
- name: Тестовый шаг 1
|
||||
run: echo "🎉 Запуск без интернета"
|
||||
- name: Информация о системе
|
||||
run: |
|
||||
uname -a
|
||||
echo "Рабочая папка: $PWD"
|
||||
- name: Список файлов
|
||||
run: ls -la
|
||||
1
.gitignore
vendored
@@ -39,3 +39,4 @@ modbus/serial/__pycache__
|
||||
/scenes/pribor-prd-n/kasseta-fs-nd.tscn.bak
|
||||
|
||||
*.patch
|
||||
проверка.log
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
- В среде **Windows** запуск скрипта [`git-hooks-config.sh`](git-hooks-config.sh) производить из оболочки `git bash`
|
||||
- При необходимости обновить [`settings.json`](settings.json)
|
||||
- Использовать выражения вида `ProjectSettings.set_setting('application/config/%s' % key_name`
|
||||
и `ProjectSettings.get_setting('application/config/%s % key_name)` для доступа к настройкам.
|
||||
и `ProjectSettings.get_setting('application/config/%s % key_name)` для доступа к настройкам.
|
||||
- `key_name` брать из таблицы `res://scenes/настройки/настройки.gd/SETTING_TABLE`
|
||||
- Следовать [общим правилам](http://gitea.srez.local:3000/sasha80/dev-manual).
|
||||
- **Windows**: убедиться, что исполняемый файл не заблокирован в брандмауэре.
|
||||
Обычно блокировка происходит автоматически, а отмена блокировки требует
|
||||
вмешательства пользователя.
|
||||
|
||||
# Ссылки на составные части
|
||||
|
||||
@@ -25,6 +28,7 @@
|
||||
- [ПО 5П28 Пульт П16](http://gitea.srez.local:3000/MaD_CaT/imi-5p28)
|
||||
- [ПО 5П28 АКНГ](http://gitea.srez.local:3000/sasha80/imi-5p28-navi)
|
||||
- [Трасса](http://gitea.srez.local:3000/lepshiy/imi-trassa)
|
||||
- [Информационный ЭМС](http://gitea.srez.local:3000/MaD_CaT/mp550_imi_emstg)
|
||||
|
||||
# Автоматизация тестирования
|
||||
|
||||
|
||||
76
check.sh
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Использование: $0 <папка_для_поиска>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TARGET_DIR="$1"
|
||||
|
||||
if [ ! -d "$TARGET_DIR" ]; then
|
||||
echo "Ошибка: папка '$TARGET_DIR' не существует!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Поиск строк в двойных кавычках в файлах .gd (исключая комментарии)..."
|
||||
echo "Папка: $TARGET_DIR"
|
||||
echo "=========================================="
|
||||
|
||||
FOUND_MATCHES=0
|
||||
|
||||
# Используем Process Substitution вместо пайплайна в цикле
|
||||
while IFS= read -r file; do
|
||||
# Используем awk для поиска строк с кавычками, исключая комментарии
|
||||
# и экранированные кавычки
|
||||
MATCHES=$(awk '
|
||||
BEGIN { line_num = 0 }
|
||||
{
|
||||
line_num++
|
||||
original_line = $0
|
||||
line = $0
|
||||
|
||||
# Ищем первый #, который не находится внутри кавычек
|
||||
in_quote = 0
|
||||
for (i = 1; i <= length(line); i++) {
|
||||
char = substr(line, i, 1)
|
||||
prev_char = substr(line, i-1, 1)
|
||||
|
||||
# Если находим неэкранированную кавычку, меняем состояние
|
||||
if (char == "\"" && prev_char != "\\") {
|
||||
in_quote = !in_quote
|
||||
}
|
||||
|
||||
# Если находим # вне кавычек, обрезаем строку до этого места
|
||||
if (char == "#" && !in_quote) {
|
||||
line = substr(line, 1, i-1)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# Удаляем начальные и конечные пробелы
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "", line)
|
||||
|
||||
if (index(original_line, "\"\"\"") == 0) {
|
||||
# Ищем непустые строки с двойными кавычками
|
||||
if (line ~ /"[^"\\]*"/) {
|
||||
print line_num ": " original_line
|
||||
}
|
||||
}
|
||||
}
|
||||
' "$file")
|
||||
|
||||
if [ -n "$MATCHES" ]; then
|
||||
FOUND_MATCHES=1
|
||||
echo "Файл: $file"
|
||||
echo "$MATCHES" | while IFS= read -r match_line; do
|
||||
echo " Строка $match_line"
|
||||
done
|
||||
echo ""
|
||||
fi
|
||||
done < <(find "$TARGET_DIR" -type f -name "*.gd" -not -path "./addons/*")
|
||||
|
||||
if [ "$FOUND_MATCHES" -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
@@ -9,13 +9,13 @@
|
||||
"address": "127.0.0.1",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -51,16 +51,15 @@
|
||||
"url": "127.0.0.1:2005"
|
||||
},
|
||||
"address": "127.0.0.1",
|
||||
"antennaVariation": "0,0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
3,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -87,7 +86,7 @@
|
||||
"defaultProfileIds": [
|
||||
"1"
|
||||
],
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"forbiddenZones": [
|
||||
{
|
||||
"azimuth": 20,
|
||||
@@ -170,12 +169,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -229,12 +228,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -263,8 +262,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "2147483647",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -279,8 +277,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "2147483647",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -297,7 +294,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -381,12 +378,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -440,12 +437,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -474,8 +471,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "0",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -490,8 +486,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "0",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -508,7 +503,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -592,12 +587,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -651,12 +646,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -685,8 +680,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "4607182418800017408",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -701,8 +695,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "4607182418800017408",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -719,7 +712,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -803,12 +796,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -862,12 +855,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -896,8 +889,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "111818694921568",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -912,8 +904,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "111818694921568",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -930,7 +921,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -1014,12 +1005,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1073,12 +1064,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1107,8 +1098,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "126158551285552",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -1123,8 +1113,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "126158551285552",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -1141,7 +1130,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -1225,12 +1214,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1284,12 +1273,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1318,8 +1307,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "8315457377388211488",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -1334,8 +1322,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "8315457377388211488",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -1352,7 +1339,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -1436,12 +1423,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1495,12 +1482,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1529,8 +1516,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "30680773303284125",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -1545,8 +1531,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "30680773303284125",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -1563,7 +1548,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.0089202\",\"0.0138022 0.0116269\",\"0.011603 0.0136825\",\"0.00900388 0.0157386\",\"0.0061044 0.0167927\",\"0.0031049 0.0177467\",\"5.11347e-6 0.0181494\",\"-0.0030951 0.01775\",\"-0.0061956 0.0167989\",\"-0.00899614 0.015697\",\"-0.011597 0.0136921\",\"-0.0137978 0.0116366\",\"-0.0155986 0.00892859\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00621983\",\"-0.0155986 -0.00892821\",\"-0.0137978 -0.0116362\",\"-0.011597 -0.0136917\",\"-0.00899614 -0.0156966\",\"-0.0061956 -0.0167985\",\"-0.0030951 -0.0177496\",\"5.11326e-6 -0.018149\",\"0.0031049 -0.0177463\",\"0.0061044 -0.0167923\",\"0.00900388 -0.0157382\",\"0.011603 -0.0136821\",\"0.0138022 -0.0116265\",\"0.0156014 -0.00891982\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":0,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6336\",\"60.0787 30.6391\",\"60.0765 30.6432\",\"60.0739 30.6473\",\"60.071 30.6494\",\"60.068 30.6513\",\"60.0649 30.6521\",\"60.0618 30.6513\",\"60.0587 30.6494\",\"60.0559 30.6472\",\"60.0533 30.6432\",\"60.0511 30.6391\",\"60.0493 30.6336\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6033\",\"60.0493 30.5979\",\"60.0511 30.5924\",\"60.0533 30.5883\",\"60.0559 30.5843\",\"60.0587 30.5821\",\"60.0618 30.5802\",\"60.0649 30.5794\",\"60.068 30.5802\",\"60.071 30.5821\",\"60.0739 30.5842\",\"60.0765 30.5883\",\"60.0787 30.5924\",\"60.0805 30.5979\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -1603,6 +1588,7 @@
|
||||
},
|
||||
"PelengatorsTaskParams": [
|
||||
{
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -1635,6 +1621,7 @@
|
||||
},
|
||||
"PelengatorsTaskParams": [
|
||||
{
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -1667,6 +1654,7 @@
|
||||
},
|
||||
"PelengatorsTaskParams": [
|
||||
{
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -1742,17 +1730,16 @@
|
||||
"url": "172.22.246.12:2006"
|
||||
},
|
||||
"address": "172.22.246.12",
|
||||
"antennaVariation": "0,0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
59.91069,
|
||||
30.65539,
|
||||
60.064529,
|
||||
30.615309,
|
||||
0,
|
||||
0,
|
||||
59.91069,
|
||||
30.65539,
|
||||
0,
|
||||
60.064529,
|
||||
30.615309,
|
||||
0,
|
||||
30,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1781,7 +1768,7 @@
|
||||
"enabled": true,
|
||||
"forbiddenZones": [
|
||||
],
|
||||
"functionZone": "{\"default_radius\":5000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":-1,\"radius\":5000,\"total_zone\":[\"59.9557 30.6554\",\"59.955 30.6709\",\"59.9529 30.6862\",\"59.9496 30.7003\",\"59.9451 30.7132\",\"59.9396 30.7242\",\"59.9332 30.7331\",\"59.926 30.7397\",\"59.9185 30.7437\",\"59.9107 30.7451\",\"59.9029 30.7437\",\"59.8953 30.7396\",\"59.8882 30.733\",\"59.8818 30.724\",\"59.8762 30.713\",\"59.8717 30.7001\",\"59.8684 30.686\",\"59.8664 30.6709\",\"59.8657 30.6554\",\"59.8664 30.6399\",\"59.8684 30.6248\",\"59.8717 30.6107\",\"59.8762 30.5978\",\"59.8818 30.5867\",\"59.8882 30.5778\",\"59.8953 30.5712\",\"59.9029 30.5671\",\"59.9107 30.5657\",\"59.9185 30.5671\",\"59.926 30.5711\",\"59.9332 30.5777\",\"59.9396 30.5866\",\"59.9451 30.5976\",\"59.9496 30.6105\",\"59.9529 30.6248\",\"59.955 30.6399\"]}}}",
|
||||
"functionZone": "{\"default_radius\":5000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioReceive\",\"input_id\":-1,\"radius\":5000,\"total_zone\":[\"60.1095 30.6153\",\"60.1088 30.6309\",\"60.1067 30.6463\",\"60.1034 30.6604\",\"60.0989 30.6734\",\"60.0934 30.6844\",\"60.087 30.6934\",\"60.0798 30.7\",\"60.0723 30.704\",\"60.0645 30.7054\",\"60.0567 30.704\",\"60.0491 30.6999\",\"60.042 30.6933\",\"60.0356 30.6842\",\"60.03 30.6732\",\"60.0255 30.6602\",\"60.0222 30.6461\",\"60.0202 30.6309\",\"60.0195 30.6153\",\"60.0202 30.5997\",\"60.0222 30.5846\",\"60.0255 30.5704\",\"60.03 30.5575\",\"60.0356 30.5463\",\"60.042 30.5374\",\"60.0491 30.5307\",\"60.0567 30.5266\",\"60.0645 30.5252\",\"60.0723 30.5266\",\"60.0798 30.5306\",\"60.087 30.5373\",\"60.0934 30.5462\",\"60.0989 30.5572\",\"60.1034 30.5702\",\"60.1067 30.5846\",\"60.1088 30.5997\"]}}}",
|
||||
"groupId": -1,
|
||||
"groupName": "",
|
||||
"name": "АфС-П РТР",
|
||||
@@ -1850,12 +1837,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.615742206573483,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.615742206573483,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1909,12 +1896,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.615742206573483,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.615742206573483,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -1943,8 +1930,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -1959,8 +1945,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -1977,7 +1962,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.00897031\",\"0.0138022 0.0115768\",\"0.011603 0.0137326\",\"0.00900381 0.0155883\",\"0.00610448 0.016943\",\"0.00310487 0.0176965\",\"5.03159e-6 0.017999\",\"-0.00309513 0.0176998\",\"-0.00619552 0.0169493\",\"-0.00899621 0.0155466\",\"-0.011597 0.0137422\",\"-0.0137978 0.0115864\",\"-0.0155986 0.00897875\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00611951\",\"-0.0155986 -0.00897836\",\"-0.0137978 -0.011586\",\"-0.011597 -0.0137419\",\"-0.00899621 -0.0155462\",\"-0.00619552 -0.0169489\",\"-0.00309513 -0.0176995\",\"5.03138e-6 -0.0179986\",\"0.00310487 -0.0176962\",\"0.00610448 -0.0169427\",\"0.00900381 -0.0155879\",\"0.011603 -0.0137323\",\"0.0138022 -0.0115764\",\"0.0156014 -0.00896993\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6337\",\"60.0787 30.639\",\"60.0765 30.6433\",\"60.0739 30.647\",\"60.071 30.6497\",\"60.068 30.6512\",\"60.0649 30.6518\",\"60.0618 30.6512\",\"60.0587 30.6497\",\"60.0559 30.6469\",\"60.0533 30.6433\",\"60.0511 30.639\",\"60.0493 30.6337\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6035\",\"60.0493 30.5978\",\"60.0511 30.5925\",\"60.0533 30.5882\",\"60.0559 30.5846\",\"60.0587 30.5818\",\"60.0618 30.5803\",\"60.0649 30.5797\",\"60.068 30.5803\",\"60.071 30.5818\",\"60.0739 30.5845\",\"60.0765 30.5882\",\"60.0787 30.5925\",\"60.0805 30.5978\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -2061,12 +2046,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.064979661201995,
|
||||
30.615334510803223,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.064979661201995,
|
||||
30.615334510803223,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2120,12 +2105,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.064979661201995,
|
||||
30.615334510803223,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.064979661201995,
|
||||
30.615334510803223,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2154,8 +2139,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -2170,8 +2154,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -2188,7 +2171,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"1.52588e-7 1.91254e-7\",\"0.0156014 -0.00896993\",\"0.0171006 -0.00556204\",\"0.0179002 -0.00190395\",\"0.0179002 0.00190433\",\"0.0171006 0.00556242\",\"0.0156014 0.00897031\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.065 30.6153\",\"60.0806 30.5974\",\"60.0821 30.6042\",\"60.0829 30.6115\",\"60.0829 30.6192\",\"60.0821 30.6265\",\"60.0806 30.6333\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -2272,12 +2255,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.064733381937565,
|
||||
30.61617136001587,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.064733381937565,
|
||||
30.61617136001587,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2331,12 +2314,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.064733381937565,
|
||||
30.61617136001587,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.064733381937565,
|
||||
30.61617136001587,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2365,8 +2348,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -2381,8 +2363,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -2399,7 +2380,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.00897031\",\"0.0138022 0.0115768\",\"0.011603 0.0137326\",\"0.00900381 0.0155883\",\"0.00610448 0.016943\",\"0.00310487 0.0176965\",\"5.03159e-6 0.017999\",\"-0.00309513 0.0176998\",\"-0.00619552 0.0169493\",\"-0.00899621 0.0155466\",\"-0.011597 0.0137422\",\"-0.0137978 0.0115864\",\"-0.0155986 0.00897875\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00611951\",\"-0.0155986 -0.00897836\",\"-0.0137978 -0.011586\",\"-0.011597 -0.0137419\",\"-0.00899621 -0.0155462\",\"-0.00619552 -0.0169489\",\"-0.00309513 -0.0176995\",\"5.03138e-6 -0.0179986\",\"0.00310487 -0.0176962\",\"0.00610448 -0.0169427\",\"0.00900381 -0.0155879\",\"0.011603 -0.0137323\",\"0.0138022 -0.0115764\",\"0.0156014 -0.00896993\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0827 30.6162\",\"60.0824 30.6224\",\"60.0816 30.6284\",\"60.0803 30.6342\",\"60.0785 30.6394\",\"60.0763 30.6437\",\"60.0737 30.6474\",\"60.0708 30.6501\",\"60.0678 30.6516\",\"60.0647 30.6522\",\"60.0616 30.6516\",\"60.0585 30.6501\",\"60.0557 30.6473\",\"60.0531 30.6437\",\"60.0509 30.6394\",\"60.0491 30.6342\",\"60.0478 30.6284\",\"60.047 30.6224\",\"60.0467 30.6162\",\"60.047 30.6099\",\"60.0478 30.6039\",\"60.0491 30.5982\",\"60.0509 30.593\",\"60.0531 30.5886\",\"60.0557 30.585\",\"60.0585 30.5822\",\"60.0616 30.5807\",\"60.0647 30.5801\",\"60.0678 30.5807\",\"60.0708 30.5822\",\"60.0737 30.5849\",\"60.0763 30.5886\",\"60.0785 30.593\",\"60.0803 30.5982\",\"60.0816 30.6039\",\"60.0824 30.6099\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -2483,12 +2464,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2542,12 +2523,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2576,8 +2557,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -2592,8 +2572,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "7308901815584698669",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -2610,7 +2589,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.00897031\",\"0.0138022 0.0115768\",\"0.011603 0.0137326\",\"0.00900381 0.0155883\",\"0.00610448 0.016943\",\"0.00310487 0.0176965\",\"5.03159e-6 0.017999\",\"-0.00309513 0.0176998\",\"-0.00619552 0.0169493\",\"-0.00899621 0.0155466\",\"-0.011597 0.0137422\",\"-0.0137978 0.0115864\",\"-0.0155986 0.00897875\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00611951\",\"-0.0155986 -0.00897836\",\"-0.0137978 -0.011586\",\"-0.011597 -0.0137419\",\"-0.00899621 -0.0155462\",\"-0.00619552 -0.0169489\",\"-0.00309513 -0.0176995\",\"5.03138e-6 -0.0179986\",\"0.00310487 -0.0176962\",\"0.00610448 -0.0169427\",\"0.00900381 -0.0155879\",\"0.011603 -0.0137323\",\"0.0138022 -0.0115764\",\"0.0156014 -0.00896993\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6337\",\"60.0787 30.639\",\"60.0765 30.6433\",\"60.0739 30.647\",\"60.071 30.6497\",\"60.068 30.6512\",\"60.0649 30.6518\",\"60.0618 30.6512\",\"60.0587 30.6497\",\"60.0559 30.6469\",\"60.0533 30.6433\",\"60.0511 30.639\",\"60.0493 30.6337\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6035\",\"60.0493 30.5978\",\"60.0511 30.5925\",\"60.0533 30.5882\",\"60.0559 30.5846\",\"60.0587 30.5818\",\"60.0618 30.5803\",\"60.0649 30.5797\",\"60.068 30.5803\",\"60.071 30.5818\",\"60.0739 30.5845\",\"60.0765 30.5882\",\"60.0787 30.5925\",\"60.0805 30.5978\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -2694,12 +2673,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2753,12 +2732,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2787,8 +2766,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "140359491022592",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -2803,8 +2781,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "140359491022592",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -2821,7 +2798,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.00897031\",\"0.0138022 0.0115768\",\"0.011603 0.0137326\",\"0.00900381 0.0155883\",\"0.00610448 0.016943\",\"0.00310487 0.0176965\",\"5.03159e-6 0.017999\",\"-0.00309513 0.0176998\",\"-0.00619552 0.0169493\",\"-0.00899621 0.0155466\",\"-0.011597 0.0137422\",\"-0.0137978 0.0115864\",\"-0.0155986 0.00897875\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00611951\",\"-0.0155986 -0.00897836\",\"-0.0137978 -0.011586\",\"-0.011597 -0.0137419\",\"-0.00899621 -0.0155462\",\"-0.00619552 -0.0169489\",\"-0.00309513 -0.0176995\",\"5.03138e-6 -0.0179986\",\"0.00310487 -0.0176962\",\"0.00610448 -0.0169427\",\"0.00900381 -0.0155879\",\"0.011603 -0.0137323\",\"0.0138022 -0.0115764\",\"0.0156014 -0.00896993\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6337\",\"60.0787 30.639\",\"60.0765 30.6433\",\"60.0739 30.647\",\"60.071 30.6497\",\"60.068 30.6512\",\"60.0649 30.6518\",\"60.0618 30.6512\",\"60.0587 30.6497\",\"60.0559 30.6469\",\"60.0533 30.6433\",\"60.0511 30.639\",\"60.0493 30.6337\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6035\",\"60.0493 30.5978\",\"60.0511 30.5925\",\"60.0533 30.5882\",\"60.0559 30.5846\",\"60.0587 30.5818\",\"60.0618 30.5803\",\"60.0649 30.5797\",\"60.068 30.5803\",\"60.071 30.5818\",\"60.0739 30.5845\",\"60.0765 30.5882\",\"60.0787 30.5925\",\"60.0805 30.5978\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -2905,12 +2882,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2964,12 +2941,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -2998,8 +2975,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "37",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -3014,8 +2990,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "37",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
@@ -3032,7 +3007,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0180002 1.9115e-7\",\"0.0177003 0.00310696\",\"0.0169007 0.00611367\",\"0.0156014 0.00897031\",\"0.0138022 0.0115768\",\"0.011603 0.0137326\",\"0.00900381 0.0155883\",\"0.00610448 0.016943\",\"0.00310487 0.0176965\",\"5.03159e-6 0.017999\",\"-0.00309513 0.0176998\",\"-0.00619552 0.0169493\",\"-0.00899621 0.0155466\",\"-0.011597 0.0137422\",\"-0.0137978 0.0115864\",\"-0.0155986 0.00897875\",\"-0.0168993 0.00611989\",\"-0.0176997 0.00311028\",\"-0.0179998 1.91357e-7\",\"-0.0176997 -0.0031099\",\"-0.0168993 -0.00611951\",\"-0.0155986 -0.00897836\",\"-0.0137978 -0.011586\",\"-0.011597 -0.0137419\",\"-0.00899621 -0.0155462\",\"-0.00619552 -0.0169489\",\"-0.00309513 -0.0176995\",\"5.03138e-6 -0.0179986\",\"0.00310487 -0.0176962\",\"0.00610448 -0.0169427\",\"0.00900381 -0.0155879\",\"0.011603 -0.0137323\",\"0.0138022 -0.0115764\",\"0.0156014 -0.00896993\",\"0.0169007 -0.00611328\",\"0.0177003 -0.00310658\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.628\",\"60.0805 30.6337\",\"60.0787 30.639\",\"60.0765 30.6433\",\"60.0739 30.647\",\"60.071 30.6497\",\"60.068 30.6512\",\"60.0649 30.6518\",\"60.0618 30.6512\",\"60.0587 30.6497\",\"60.0559 30.6469\",\"60.0533 30.6433\",\"60.0511 30.639\",\"60.0493 30.6337\",\"60.048 30.628\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6035\",\"60.0493 30.5978\",\"60.0511 30.5925\",\"60.0533 30.5882\",\"60.0559 30.5846\",\"60.0587 30.5818\",\"60.0618 30.5803\",\"60.0649 30.5797\",\"60.068 30.5803\",\"60.071 30.5818\",\"60.0739 30.5845\",\"60.0765 30.5882\",\"60.0787 30.5925\",\"60.0805 30.5978\",\"60.0818 30.6035\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -3116,12 +3091,12 @@
|
||||
"address": "192.168.0.93",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -3175,12 +3150,12 @@
|
||||
"antennaVariation": "0,0",
|
||||
"coordinatesData": [
|
||||
5,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60.06490470683785,
|
||||
30.61574220657348,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -3209,8 +3184,7 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "0",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"default_jamming_task_parameters": {
|
||||
"direction": {
|
||||
@@ -3225,13 +3199,12 @@
|
||||
"frequency_step_hz": "200000",
|
||||
"jump_delay_10ns": "0",
|
||||
"start_freqency_hz": "0",
|
||||
"time_lfm_s": 5e-06,
|
||||
"time_step_s": 1
|
||||
"time_lfm_s": 5e-06
|
||||
},
|
||||
"enable": true,
|
||||
"id": 0,
|
||||
"liter_gain": 100,
|
||||
"name": "БРП #13:10.1.2.22:1201:tx.0:390-510:800-1065:1065-1210:1150-1280:1490-2000:2000-3500:3500-6100",
|
||||
"name": "ПРД Н2-2:10.1.2.22:1201:tx.0:390-510:800-1065:1065-1210:1150-1280:1490-2000:2000-3500:3500-6100",
|
||||
"range": {
|
||||
"from": "433000000",
|
||||
"to": "435000000"
|
||||
@@ -3243,7 +3216,7 @@
|
||||
"timeout_sec": 60
|
||||
},
|
||||
"enabled": true,
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"0.0179864 0\",\"0.0177132 0.00312331\",\"0.0169017 0.00615172\",\"0.0155767 0.00899321\",\"0.0137784 0.0115614\",\"0.0115614 0.0137784\",\"0.00899321 0.0155767\",\"0.00615172 0.0169017\",\"0.00312331 0.0177132\",\"1.10135e-18 0.0179864\",\"-0.00312331 0.0177132\",\"-0.00615172 0.0169017\",\"-0.00899321 0.0155767\",\"-0.0115614 0.0137784\",\"-0.0137784 0.0115614\",\"-0.0155767 0.00899321\",\"-0.0169017 0.00615172\",\"-0.0177132 0.00312331\",\"-0.0179864 2.2027e-18\",\"-0.0177132 -0.00312331\",\"-0.0169017 -0.00615172\",\"-0.0155767 -0.00899321\",\"-0.0137784 -0.0115614\",\"-0.0115614 -0.0137784\",\"-0.00899321 -0.0155767\",\"-0.00615172 -0.0169017\",\"-0.00312331 -0.0177132\",\"-3.30405e-18 -0.0179864\",\"0.00312331 -0.0177132\",\"0.00615172 -0.0169017\",\"0.00899321 -0.0155767\",\"0.0115614 -0.0137784\",\"0.0137784 -0.0115614\",\"0.0155767 -0.00899321\",\"0.0169017 -0.00615172\",\"0.0177132 -0.00312331\"]}}}",
|
||||
"functionZone": "{\"default_radius\":2000,\"geometries\":{\"0\":{\"desc\":\"\",\"function_type\":\"RadioTransmit\",\"input_id\":-1,\"radius\":2000,\"total_zone\":[\"60.0829 30.6157\",\"60.0826 30.622\",\"60.0818 30.6281\",\"60.0805 30.6338\",\"60.0787 30.6389\",\"60.0765 30.6434\",\"60.0739 30.647\",\"60.0711 30.6496\",\"60.068 30.6512\",\"60.0649 30.6518\",\"60.0618 30.6512\",\"60.0587 30.6496\",\"60.0559 30.6469\",\"60.0533 30.6433\",\"60.0511 30.6389\",\"60.0493 30.6338\",\"60.048 30.6281\",\"60.0472 30.622\",\"60.0469 30.6157\",\"60.0472 30.6095\",\"60.048 30.6034\",\"60.0493 30.5977\",\"60.0511 30.5926\",\"60.0533 30.5881\",\"60.0559 30.5845\",\"60.0587 30.5819\",\"60.0618 30.5802\",\"60.0649 30.5797\",\"60.068 30.5802\",\"60.0711 30.5819\",\"60.0739 30.5845\",\"60.0765 30.5881\",\"60.0787 30.5926\",\"60.0805 30.5977\",\"60.0818 30.6034\",\"60.0826 30.6095\"]}}}",
|
||||
"groupId": -1,
|
||||
"impl_properties": {
|
||||
"activatingTimeoutSec": 15,
|
||||
@@ -3276,7 +3249,7 @@
|
||||
]
|
||||
},
|
||||
"ignored_perimeters": {
|
||||
"id_generator": 14340,
|
||||
"id_generator": 14471,
|
||||
"perimeters": [
|
||||
]
|
||||
},
|
||||
@@ -3303,6 +3276,7 @@
|
||||
"task": {
|
||||
"executor": "АфС-П РТР",
|
||||
"executor_type": 1,
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -3342,6 +3316,7 @@
|
||||
"task": {
|
||||
"executor": "АфС-П РТР",
|
||||
"executor_type": 1,
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -3381,6 +3356,7 @@
|
||||
"task": {
|
||||
"executor": "АфС-П РТР",
|
||||
"executor_type": 1,
|
||||
"is_paused": false,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "",
|
||||
"field_id": "Авто"
|
||||
@@ -3410,45 +3386,6 @@
|
||||
}
|
||||
],
|
||||
"type_id": "GroupSearchTask"
|
||||
},
|
||||
{
|
||||
"ShowAllSpectrumsInOne": false,
|
||||
"executor": "Эмулятор пеленгатора",
|
||||
"executor_type": 4,
|
||||
"tasks": [
|
||||
{
|
||||
"task": {
|
||||
"executor": "Эмулятор пеленгатора",
|
||||
"executor_type": 1,
|
||||
"pelengator_task_Antenna": {
|
||||
"field_caption": "Антенна 1",
|
||||
"field_id": "1"
|
||||
},
|
||||
"pelengator_task_Attenuator": 10,
|
||||
"pelengator_task_Filter": 10000,
|
||||
"pelengator_task_FilterStep": 1,
|
||||
"pelengator_task_parameters": {
|
||||
"field_autoBaseLine": true,
|
||||
"field_baseline": -80,
|
||||
"field_enabledStreams": [
|
||||
"DirectionVsFreq",
|
||||
"SpectrumDb"
|
||||
],
|
||||
"field_profiles": [
|
||||
"1"
|
||||
],
|
||||
"field_targetSector": "{\"power_range\":{\"max\":0,\"min\":0},\"quality_range\":{\"max\":0,\"min\":0},\"sector\":{\"azimuth_max\":360,\"azimuth_min\":0,\"zenith_max\":110,\"zenith_min\":30}}"
|
||||
},
|
||||
"pelengator_task_show_forbidden_bands": true,
|
||||
"save_snapshots": false,
|
||||
"search_task_band": "1001000000 6000000000",
|
||||
"show_all_signals_on_spectrum": false,
|
||||
"show_target_signals_on_spectrum": true,
|
||||
"type_id": "PelengatorSearchTask"
|
||||
}
|
||||
}
|
||||
],
|
||||
"type_id": "GroupSearchTask"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB |
BIN
data/Окно.png
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djv8fkddcjucs"
|
||||
path="res://.godot/imported/Скруглённый квадрат белый.png-4793c453fe49bfbe7c9affd223331345.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Скруглённый квадрат белый.png"
|
||||
dest_files=["res://.godot/imported/Скруглённый квадрат белый.png-4793c453fe49bfbe7c9affd223331345.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://fuhhvsa5um4m"
|
||||
path="res://.godot/imported/Скруглённый квадрат серый.png-2111d7338e52a03a41f05d6ffbbc3eb6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Скруглённый квадрат серый.png"
|
||||
dest_files=["res://.godot/imported/Скруглённый квадрат серый.png-2111d7338e52a03a41f05d6ffbbc3eb6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://busl8rb38lis"
|
||||
path="res://.godot/imported/Скруглённый прямоуг салатный.png-e10b4e8820d45ab6e79c4fba522af854.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Скруглённый прямоуг салатный.png"
|
||||
dest_files=["res://.godot/imported/Скруглённый прямоуг салатный.png-e10b4e8820d45ab6e79c4fba522af854.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://3siondd3feev"
|
||||
path="res://.godot/imported/Скруглённый прямоугольник белый.png-758adbfc4fc135ed0095e711422b8c0e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Скруглённый прямоугольник белый.png"
|
||||
dest_files=["res://.godot/imported/Скруглённый прямоугольник белый.png-758adbfc4fc135ed0095e711422b8c0e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://7ody4v7qy36g"
|
||||
path="res://.godot/imported/Скруглённый прямоугольник серый.png-318eedc8abeb0fd535304028648863b7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Скруглённый прямоугольник серый.png"
|
||||
dest_files=["res://.godot/imported/Скруглённый прямоугольник серый.png-318eedc8abeb0fd535304028648863b7.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
data/матрица-конфликт.png
Normal file
|
After Width: | Height: | Size: 707 B |
@@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://co5xj5uhjfk84"
|
||||
path="res://.godot/imported/Окно.png-ff4b5eac96df23ad4cd8e06dc32f5bb8.ctex"
|
||||
uid="uid://busl8rb38lis"
|
||||
path="res://.godot/imported/матрица-конфликт.png-e109709def61ac1d626d23088b556664.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Окно.png"
|
||||
dest_files=["res://.godot/imported/Окно.png-ff4b5eac96df23ad4cd8e06dc32f5bb8.ctex"]
|
||||
source_file="res://data/матрица-конфликт.png"
|
||||
dest_files=["res://.godot/imported/матрица-конфликт.png-e109709def61ac1d626d23088b556664.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://csxruavk0s40l"
|
||||
path="res://.godot/imported/Окно частот0.png-79ada2e7504614b9bdf58bce1aff61fb.ctex"
|
||||
uid="uid://djv8fkddcjucs"
|
||||
path="res://.godot/imported/матрица-чисто.png-43b162afe88b693461904505b377fae0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Окно частот0.png"
|
||||
dest_files=["res://.godot/imported/Окно частот0.png-79ada2e7504614b9bdf58bce1aff61fb.ctex"]
|
||||
source_file="res://data/матрица-чисто.png"
|
||||
dest_files=["res://.godot/imported/матрица-чисто.png-43b162afe88b693461904505b377fae0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
# - выполнение фиксации;
|
||||
# - выполнение слияния.
|
||||
|
||||
|
||||
GDSCRIPT_FILE="scripts/commit.gd"
|
||||
LOGFILE="проверка.log"
|
||||
HEAD="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short HEAD) $(git log -1 --format=%cd)"
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
HEAD="Изменённый ${HEAD}"
|
||||
@@ -29,3 +29,6 @@ fi
|
||||
echo "extends Node" > ${GDSCRIPT_FILE}
|
||||
echo "# Файл сгенерирован автоматически! Не изменять вручную!" >> ${GDSCRIPT_FILE}
|
||||
echo "const VCS_HEAD = '${HEAD}'" >> ${GDSCRIPT_FILE}
|
||||
|
||||
echo "${HEAD}" > ${LOGFILE}
|
||||
./check.sh . >> ${LOGFILE}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
## ```
|
||||
## > iptables v1.8.2 (nf_tables)
|
||||
|
||||
|
||||
INI_FILE="/opt/5p28/device.ini" ## Путь к INI-файлу 5п28
|
||||
SECTION_NAME="navigat" ## Название секции INI-файла 5п28
|
||||
IP_PORT_NAME="port" ## Имя поля INI-файла 5п28 в котором хранится номер порта назначения
|
||||
|
||||
@@ -62,39 +62,40 @@ interfer/closed_sectors=Color(0, 0, 0, 1)
|
||||
"config/Кнопка «СВ-И1»"=false
|
||||
"config/Кнопка «СВ-М2»"=false
|
||||
"config/Ограниченный режим"=false
|
||||
"config/Отладка контроля"=false
|
||||
"config/Отладка контроля"=true
|
||||
"config/Период опроса состояния АФСП, секунды"=""
|
||||
"config/Период опроса состояния БПО, секунды"=""
|
||||
"config/Скрыть вкладку ЭМС 2"=true
|
||||
"config/Список своих протоколов"=""
|
||||
"config/Текущая версия ПО УАРЭП"="master 3bff1cd Tue Nov 4 15:33:24 2025 +0300"
|
||||
"config/Цвет кнопки \"Подавление\""="[0.972549021244049,0.0117647061124444,0.423529416322708,1.0]"
|
||||
"config/Цвет схемы"="[0.972549021244049,0.0117647061124444,0.0274509806185961,1.0]"
|
||||
"config/Цвет фона схемы"="[0.0941176488995552,0.149019613862038,1.0,1.0]"
|
||||
"config/Цвет кнопки \"Подавление\""="[0.905882358551025,0.00392156885936856,0.0,1.0]"
|
||||
"config/Цвет схемы"="[0.905954480171204,0.921875,0.8714599609375,1.0]"
|
||||
"config/Цвет фона схемы"="[0.258926391601563,0.274618297815323,0.27734375,1.0]"
|
||||
"config/Шаблон адреса сервера карт"="https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
"config/навигация"=["*", 60000, true, true]
|
||||
"config/уарэп-5п28"=["127.0.0.1", 50777]
|
||||
"config/уарэп-капсрпб"=["127.0.0.1", "127.0.0.1", 42023, 42022, false, true]
|
||||
"config/уарэп-спт25-1"=["/home/user/tty0", 0, 19200, "N", 8, 1]
|
||||
"config/уарэп-спт25-2"=["/home/user/tty1", 0, 19200, "N", 8, 1]
|
||||
"config/уарэп-трасса"=["192.168.11.34", "192.168.11.105", 50200, 10004, false, true]
|
||||
"config/уарэп-щ3"=["/home/user/tty3", 7, 19200, "N", 8, 1, 50000]
|
||||
"config/уарэп-эмс"=["10.1.1.52", 50052, false, false]
|
||||
"config/уарэп-яу07-1в"=["10.1.1.12", 50012, false, false]
|
||||
"config/уарэп-яу07-1к"=["10.1.1.13", 50013, false, false]
|
||||
"config/уарэп-яу07-1н"=["10.1.1.11", 50011, false, false]
|
||||
"config/уарэп-яу07-2в"=["10.1.1.22", 50022, false, false]
|
||||
"config/уарэп-яу07-2к"=["10.1.1.23", 50023, false, false]
|
||||
"config/уарэп-яу07-2н"=["10.1.1.21", 50021, false, false]
|
||||
"config/уарэп-яу07-3в"=["10.1.1.32", 50032, false, false]
|
||||
"config/уарэп-яу07-3к"=["10.1.1.33", 50033, false, false]
|
||||
"config/уарэп-яу07-3н"=["10.1.1.31", 50031, false, false]
|
||||
"config/уарэп-яу07-4в"=["10.1.1.42", 50042, false, false]
|
||||
"config/уарэп-яу07-4к"=["10.1.1.43", 50043, false, false]
|
||||
"config/уарэп-яу07-4н"=["10.1.1.41", 50041, false, false]
|
||||
"config/уарэп-яу07-общий"=["*", 50000, true, true]
|
||||
"config/уарэп-яу07-частный"=["10.1.1.253", 50253, false, true]
|
||||
"config/навигация"=["*", 60000.0, true, true]
|
||||
"config/уарэп-5п28"=["127.0.0.1", 50777.0]
|
||||
"config/уарэп-капсрпб"=["127.0.0.1", "127.0.0.1", 42023.0, 42022.0, false, true]
|
||||
"config/уарэп-спт25-1"=["/home/user/tty0", 0.0, 19200.0, "N", 8.0, 1.0]
|
||||
"config/уарэп-спт25-2"=["/home/user/tty1", 0.0, 19200.0, "N", 8.0, 1.0]
|
||||
"config/уарэп-трасса"=["192.168.11.34", "192.168.11.105", 50200.0, 10004.0, false, true]
|
||||
"config/уарэп-щ3"=["/home/user/tty3", 7.0, 19200.0, "N", 8.0, 1.0, 50000.0]
|
||||
"config/уарэп-эмс"=["10.1.1.52", 50052.0, false, false]
|
||||
"config/уарэп-яу07-1в"=["10.1.1.12", 50012.0, false, false]
|
||||
"config/уарэп-яу07-1к"=["10.1.1.13", 50013.0, false, false]
|
||||
"config/уарэп-яу07-1н"=["10.1.1.11", 50011.0, false, false]
|
||||
"config/уарэп-яу07-2в"=["10.1.1.22", 50022.0, false, false]
|
||||
"config/уарэп-яу07-2к"=["10.1.1.23", 50023.0, false, false]
|
||||
"config/уарэп-яу07-2н"=["10.1.1.21", 50021.0, false, false]
|
||||
"config/уарэп-яу07-3в"=["10.1.1.32", 50032.0, false, false]
|
||||
"config/уарэп-яу07-3к"=["10.1.1.33", 50033.0, false, false]
|
||||
"config/уарэп-яу07-3н"=["10.1.1.31", 50031.0, false, false]
|
||||
"config/уарэп-яу07-4в"=["10.1.1.42", 50042.0, false, false]
|
||||
"config/уарэп-яу07-4к"=["10.1.1.43", 50043.0, false, false]
|
||||
"config/уарэп-яу07-4н"=["10.1.1.41", 50041.0, false, false]
|
||||
"config/уарэп-яу07-общий"=["*", 50000.0, true, true]
|
||||
"config/уарэп-яу07-частный"=["10.1.1.253", 50253.0, false, true]
|
||||
config/="[0.215686276555061,0.976470589637756,1.0,1.0]"
|
||||
"config/Цвет темы программы"=false
|
||||
|
||||
[autoload]
|
||||
|
||||
@@ -121,6 +122,8 @@ astrakb="*res://scripts/astra-kb.gd"
|
||||
prd="*res://scripts/prd.gd"
|
||||
navi="*res://scripts/navigation.gd"
|
||||
trassa="*res://scripts/trassa.gd"
|
||||
yemstg="*res://scripts/yemstg.gd"
|
||||
scouting="*res://scripts/rtr.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
@@ -167,6 +170,7 @@ folder_colors={
|
||||
"res://scenes/bip/": "blue",
|
||||
"res://scenes/button-flat/": "blue",
|
||||
"res://scenes/button-scale/": "blue",
|
||||
"res://scenes/button-six-state/": "blue",
|
||||
"res://scenes/cell/": "blue",
|
||||
"res://scenes/count-all/": "blue",
|
||||
"res://scenes/count-danger/": "blue",
|
||||
@@ -178,6 +182,7 @@ folder_colors={
|
||||
"res://scenes/frame/": "blue",
|
||||
"res://scenes/grid-buttons-ecm/": "blue",
|
||||
"res://scenes/grid-side-panel/": "blue",
|
||||
"res://scenes/hranges/": "blue",
|
||||
"res://scenes/pribor-afsp/": "purple",
|
||||
"res://scenes/pribor-externals/": "purple",
|
||||
"res://scenes/pribor-prd-k/": "purple",
|
||||
@@ -191,8 +196,8 @@ folder_colors={
|
||||
"res://scenes/контроль/": "green",
|
||||
"res://scenes/настройки/": "green",
|
||||
"res://scenes/работа/": "green",
|
||||
"res://scenes/эмс-тг/": "green",
|
||||
"res://scenes/эмс/": "green",
|
||||
"res://scenes/эмс2/": "green",
|
||||
"res://scripts/": "pink",
|
||||
"res://shaders/": "pink",
|
||||
"res://table/": "blue"
|
||||
@@ -263,6 +268,8 @@ common/enable_object_picking=false
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
renderer/rendering_method.mobile="gl_compatibility"
|
||||
shader_compiler/shader_cache/strip_debug=true
|
||||
textures/default_filters/anisotropic_filtering_level=0
|
||||
anti_aliasing/screen_space_roughness_limiter/enabled=false
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://da7w3vkhadfwe"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://da7w3vkhadfwe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://damy6n4u215pu" path="res://scenes/button-flat/nine-patch-button.gd" id="1_ui6sg"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct0ajcwno03h7" path="res://data/кнопка-квадрат-0.png" id="2_0cn5u"]
|
||||
[ext_resource type="Shader" uid="uid://cdmmsf161l6yw" path="res://shaders/strips.gdshader" id="2_5ngiq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cl8h2vaibabyi" path="res://data/кнопка-квадрат-1.png" id="3_tbv1w"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="1"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hhdyc"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("2_5ngiq")
|
||||
shader_parameter/rotation = 0.0
|
||||
shader_parameter/rotation = 0.785398
|
||||
shader_parameter/color = Vector4(1, 1, 1, 0.1)
|
||||
shader_parameter/width = 3.0
|
||||
shader_parameter/speed = 0.0
|
||||
@@ -56,6 +57,9 @@ offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
theme_override_styles/panel = SubResource("1")
|
||||
script = ExtResource("1_ui6sg")
|
||||
texture_state0 = ExtResource("2_0cn5u")
|
||||
texture_state1 = ExtResource("3_tbv1w")
|
||||
strips_rotation = 45.0
|
||||
|
||||
[node name="recommend" type="ReferenceRect" parent="."]
|
||||
visible = false
|
||||
@@ -72,6 +76,7 @@ texture = SubResource("PlaceholderTexture2D_6nup5")
|
||||
centered = false
|
||||
script = SubResource("GDScript_uyl5d")
|
||||
speed = 0.0
|
||||
strips_rotation = 0.785398
|
||||
|
||||
[node name="state" type="NinePatchRect" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -12,35 +12,35 @@ func is_toggle_mode(): return $button.is_toggle_mode()
|
||||
|
||||
var _pressed: = false
|
||||
|
||||
@export var texture_state0: Texture2D = preload('res://data/кнопка-квадрат-0.png'):
|
||||
@export var texture_state0: Texture2D:
|
||||
set(val):
|
||||
texture_state0 = val
|
||||
$state.set_texture(val)
|
||||
|
||||
|
||||
@export var texture_state1: Texture2D = preload('res://data/кнопка-квадрат-1.png'):
|
||||
@export var texture_state1: Texture2D:
|
||||
set(val):
|
||||
texture_state1 = val
|
||||
if is_inside_tree():
|
||||
$state.set_texture(val)
|
||||
|
||||
|
||||
@export var strips_rotation: float = 0.0:
|
||||
set(val):
|
||||
strips_rotation = val
|
||||
$back.strips_rotation = deg_to_rad(val)
|
||||
if is_inside_tree():
|
||||
$back.strips_rotation = deg_to_rad(val)
|
||||
|
||||
|
||||
@export var text: String = '':
|
||||
set(val):
|
||||
text = val
|
||||
$button.set_text(val)
|
||||
if is_inside_tree():
|
||||
$button.set_text(val)
|
||||
|
||||
|
||||
@export var btn_tooltip: String = '':
|
||||
set(val):
|
||||
btn_tooltip = val
|
||||
$button.set_tooltip_text(val)
|
||||
if is_inside_tree():
|
||||
$button.set_tooltip_text(val)
|
||||
|
||||
|
||||
@export var disabled: bool = false:
|
||||
@@ -70,7 +70,9 @@ var _pressed: = false
|
||||
|
||||
@export var font_size: int = 15:
|
||||
set(val):
|
||||
$button.add_theme_font_size_override('theme_override_font_sizes/font_size', val)
|
||||
font_size = val
|
||||
if is_inside_tree():
|
||||
$button.add_theme_font_size_override('theme_override_font_sizes/font_size', val)
|
||||
|
||||
|
||||
func set_pressed(val: bool):
|
||||
@@ -92,7 +94,19 @@ func _enter_tree() -> void:
|
||||
$back.scale = size
|
||||
$back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0))
|
||||
$button.connect('toggled', _on_button_toggled)
|
||||
$button.set_toggle_mode(toggle_mode)
|
||||
$button.add_theme_font_size_override('theme_override_font_sizes/font_size', font_size)
|
||||
pressed = _pressed
|
||||
$button.set_pressed(pressed)
|
||||
$button.set_disabled(disabled)
|
||||
$back.disabled = disabled
|
||||
$state.modulate.a = 0.5 if disabled else 1.0
|
||||
$button.set_tooltip_text(btn_tooltip)
|
||||
$button.set_text(text)
|
||||
|
||||
|
||||
func _on_settings_changed():
|
||||
pass
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
|
||||
77
scenes/button-six-state/six-state.tscn
Normal file
@@ -0,0 +1,77 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cixwl6xi22buo"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="1_ufod8"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_ufod8"]
|
||||
script/source = "@tool
|
||||
extends GridContainer
|
||||
|
||||
@export var text_check: Array[String]
|
||||
@export_file var image_states: Array[String]
|
||||
var txr_states: Array[CompressedTexture2D]
|
||||
|
||||
|
||||
@export var state: int = 0:
|
||||
set(val):
|
||||
state = val % image_states.size()
|
||||
if is_inside_tree():
|
||||
val %= txr_states.size()
|
||||
state = val
|
||||
$done.texture = txr_states[val]
|
||||
|
||||
|
||||
@export var pressed: bool = false:
|
||||
set(val):
|
||||
pressed = val
|
||||
if is_inside_tree():
|
||||
$check.button_pressed = pressed
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
txr_states.clear()
|
||||
for fn in image_states:
|
||||
txr_states.append(load(fn))
|
||||
$done.texture = txr_states[state]
|
||||
$check.button_pressed = pressed
|
||||
|
||||
|
||||
func connect_check(signal_name: StringName, callable: Callable):
|
||||
$check.connect(signal_name, callable)
|
||||
|
||||
|
||||
func disconnect_check(signal_name: StringName, callable: Callable):
|
||||
$check.disconnect(signal_name, callable)
|
||||
|
||||
|
||||
func _on_check_toggled(toggled_on: bool) -> void:
|
||||
$text.text = text_check[int(toggled_on)]
|
||||
"
|
||||
|
||||
[node name="six-state" type="GridContainer"]
|
||||
offset_right = 156.0
|
||||
offset_bottom = 24.0
|
||||
columns = 3
|
||||
script = SubResource("GDScript_ufod8")
|
||||
text_check = Array[String](["Запрещено", "Разрешено"])
|
||||
image_states = Array[String](["uid://c6nve6f8sfyj2", "uid://dnreyfh3cd1k2", "uid://c6booa8753u5t"])
|
||||
|
||||
[node name="done" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_ufod8")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="text" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 6
|
||||
text = "Запрещено"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="check" type="CheckButton" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
action_mode = 0
|
||||
|
||||
[connection signal="toggled" from="check" to="." method="_on_check_toggled"]
|
||||
@@ -4,11 +4,13 @@ extends ScrollContainer
|
||||
## Отображает список помех в таблице.
|
||||
const CellLineEdit = preload('res://table/ячейка-2.tscn') ## Ячейка таблицы.
|
||||
const TableHeader = preload('res://table/header.tscn') ## Ячейка заголовок таблицы.
|
||||
const EmitLed = preload('res://scenes/frame-threats/emit-led.tscn') ## Ячейка символа излучения
|
||||
|
||||
const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader , TableHeader , TableHeader ] ## Описание ряда заголовка.
|
||||
const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit , CellLineEdit , EmitLed ] ## Описание ряда.
|
||||
const TABLE_HEADERS_TEXT = ['№', 'Название', 'Пеленг', 'Состояние' , 'Излучение' ] ## Заголовки таблицы.
|
||||
const TABLE_COLUMN_SIZE = [ 65, 80, 80, 130 , 90 ] ## Ширины колонок.
|
||||
|
||||
const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader , TableHeader ] ## Описание ряда заголовка.
|
||||
const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit , CellLineEdit ] ## Описание ряда.
|
||||
const TABLE_HEADERS_TEXT = ['№', 'Название', 'Пеленг', 'Состояние' ] ## Заголовки таблицы.
|
||||
const TABLE_COLUMN_SIZE = [ 65, 100, 90, 170 ] ## Ширины колонок.
|
||||
|
||||
## Состояние выполнения сеанса помехи
|
||||
const INTERFER_STATE = {
|
||||
@@ -40,15 +42,30 @@ const INTERFER_NAMES = {
|
||||
'elrs': 'ЕЛРС' }
|
||||
|
||||
|
||||
var SIGNALS_CONNECTIONS = [
|
||||
[signaller, 'interfer_new', 'on_interfer_new'],
|
||||
[signaller, 'interfer_off', 'on_interfer_off'],
|
||||
[signaller, 'rto_threat_unsel', 'on_rto_threat_unsel'],
|
||||
[signaller, 'rto_threat_sel', 'on_rto_threat_sel'],
|
||||
[interfer, 'interfer_update', 'on_interfer_update'],
|
||||
[interfer, 'interfer_recommendate', 'on_interfer_recommendate'],
|
||||
[interfer, 'interfer_resized', 'on_interfer_resized'] ]
|
||||
|
||||
|
||||
## Индексы колонок
|
||||
const COLUMN_NUMBER = 0
|
||||
const COLUMN_NAME = 1
|
||||
const COLUMN_AOA = 2
|
||||
const COLUMN_STATE = 3
|
||||
const COLUMN_EMITED = 4
|
||||
const TABLE_TEXT_ROWS = 4
|
||||
|
||||
var course = 0.0 ## Курс корабля
|
||||
var color_emit: Color
|
||||
var signal_conections: Array
|
||||
var ecms: Dictionary ## Словарь с помехами
|
||||
|
||||
func on_rto_threat_unsel(_th_id): $table.clear_rows_selected()
|
||||
func on_rto_threat_unsel(_th_id, _tbl_index): $table.clear_rows_selected()
|
||||
|
||||
|
||||
## Вызывается при нажатии указателем мыши на выбранный ряд.
|
||||
@@ -81,16 +98,20 @@ func on_rto_threat_sel(th_id: int, table_index):
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
var table_index: = Dictionary()
|
||||
signaller.connect('interfer_new', Callable(self, 'on_interfer_new').bind(table_index))
|
||||
signaller.connect('interfer_off', Callable(self, 'on_interfer_off').bind(table_index))
|
||||
signaller.connect('rto_threat_unsel', Callable(self, 'on_rto_threat_unsel'))
|
||||
signaller.connect('rto_threat_sel', Callable(self, 'on_rto_threat_sel').bind(table_index))
|
||||
interfer.connect('interfer_update', Callable(self, 'on_interfer_update').bind(table_index))
|
||||
interfer.connect('interfer_recommendate', Callable(self, 'on_interfer_recommendate'))
|
||||
for item in SIGNALS_CONNECTIONS:
|
||||
item.append(table_index)
|
||||
$table.connect('row_pressed', Callable(self, 'on_row_pressed'))
|
||||
call_deferred('init_table')
|
||||
var unit_nav = network.get_unit_instance('навигация')
|
||||
unit_nav.connect('data_received', on_navi_data_received)
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
signaller.connect('режим_работа', connect_all)
|
||||
signaller.connect('режим_контроль', disconnect_all)
|
||||
signaller.connect('режим_журнал', disconnect_all)
|
||||
signaller.connect('режим_эмс', disconnect_all)
|
||||
signaller.connect('режим_эмс2', disconnect_all)
|
||||
signaller.connect('режим_настройки', disconnect_all)
|
||||
connect_all()
|
||||
|
||||
|
||||
func init_table():
|
||||
@@ -102,9 +123,19 @@ func init_table():
|
||||
|
||||
func on_interfer_update(ecm, table_index):
|
||||
var row = map_th_to_row(ecm)
|
||||
if table_index.has(ecm.ispp):
|
||||
var i_row = table_index[ecm.ispp]
|
||||
$table.set_row_text(i_row, row)
|
||||
if not table_index.has(ecm.ispp): return
|
||||
var i_row = table_index[ecm.ispp]
|
||||
$table.set_row_text(i_row, row)
|
||||
var power: bool = prd.get_fs_power(ecm.nmfs)
|
||||
var emit_node = $table.get_node2(COLUMN_EMITED, i_row)
|
||||
var emit_txr = emit_node.get_node('texture-led')
|
||||
emit_txr.position.x = 40.0
|
||||
ecm.active = power
|
||||
if power:
|
||||
emit_txr.visible = true
|
||||
emit_txr.self_modulate = color_emit
|
||||
else:
|
||||
emit_txr.visible = false
|
||||
|
||||
|
||||
func on_interfer_new(ecm, table_index):
|
||||
@@ -116,7 +147,7 @@ func on_interfer_new(ecm, table_index):
|
||||
var i_row = $table.get_rows_count()
|
||||
$table.add_row(TABLE_ROW)
|
||||
$table.set_row_text(i_row, row)
|
||||
$table.set_row_editable(i_row, false)
|
||||
disable_edit($table, TABLE_TEXT_ROWS, i_row)
|
||||
$table.set_node_user_data(0, i_row, ecm)
|
||||
table_index[ecm.ispp] = i_row
|
||||
$table.clear_rows_selected()
|
||||
@@ -149,7 +180,7 @@ func rehash(table_index: Dictionary):
|
||||
## Преобразует цель в строку таблицы
|
||||
func map_th_to_row(ecm) -> Array:
|
||||
var row: = Array()
|
||||
row.resize(TABLE_ROW.size())
|
||||
row.resize(TABLE_ROW.size() - 1)
|
||||
row[COLUMN_NUMBER] = '%s' % ecm.ispp
|
||||
row[COLUMN_NAME] = ''
|
||||
if INTERFER_NAMES.has(ecm.krp):
|
||||
@@ -164,7 +195,7 @@ func map_th_to_row(ecm) -> Array:
|
||||
return row
|
||||
|
||||
|
||||
func on_interfer_recommendate(ecm):
|
||||
func on_interfer_recommendate(ecm, _tbl_index):
|
||||
var sel_rows: Array
|
||||
$table.get_selected_rows(sel_rows)
|
||||
if not len(sel_rows): return
|
||||
@@ -175,3 +206,48 @@ func on_interfer_recommendate(ecm):
|
||||
|
||||
func on_navi_data_received(data: Dictionary):
|
||||
course = data.get('k', 0.0)
|
||||
|
||||
|
||||
func on_settings_changed():
|
||||
var json_col = ProjectSettings.get_setting('application/config/%s' % 'Цвет кнопки \"Подавление\"', '[1.0, 1.0, 1.0, 1.0]')
|
||||
var arr_col = JSON.parse_string(json_col)
|
||||
color_emit = Color(arr_col[0], arr_col[1], arr_col[2], arr_col[3])
|
||||
|
||||
|
||||
## Отключает возможность редактирования LineEdit в таблице.[br]
|
||||
## [param tbl] - таблица,[br]
|
||||
## [param num_col] - номер колонки,[br]
|
||||
## [param i_row] - номер столбца.[br]
|
||||
func disable_edit(tbl, num_col: int, i_row: int):
|
||||
for col in num_col:
|
||||
var node: LineEdit = tbl.get_node2(col, i_row)
|
||||
node.editable = false
|
||||
|
||||
|
||||
func connect_all() -> void:
|
||||
signal_conections.clear()
|
||||
var table_index = SIGNALS_CONNECTIONS[0][3]
|
||||
for item in SIGNALS_CONNECTIONS:
|
||||
var proc = Callable(self, item[2]).bind(item[3])
|
||||
var rc = item[0].connect(item[1], proc)
|
||||
if rc == Error.OK:
|
||||
signal_conections.append([item[0], item[1], proc])
|
||||
else:
|
||||
var ers = error_string(rc)
|
||||
push_error('%s: %s %s %s' % [ers, item[0], item[1], item[2]])
|
||||
signaller.emit_signal('connect_work_signal')
|
||||
for ecm in ecms.values():
|
||||
on_interfer_new(ecm, table_index)
|
||||
|
||||
|
||||
func disconnect_all() -> void:
|
||||
var table_index = SIGNALS_CONNECTIONS[0][3]
|
||||
for item in signal_conections:
|
||||
item[0].disconnect(item[1], item[2])
|
||||
signal_conections.clear()
|
||||
$table.clear_rows()
|
||||
table_index.clear()
|
||||
|
||||
|
||||
func on_interfer_resized(ecms_dic: Dictionary, _tbl_index) -> void:
|
||||
ecms = ecms_dic
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://d012h4hxf2anf"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b3woliae871je" path="res://data/отметка-неопред.png" id="1_0a4l0"]
|
||||
[ext_resource type="Texture2D" uid="uid://blx6c1o1nogks" path="res://data/связь.png" id="1_0a4l0"]
|
||||
|
||||
[node name="emit-led" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -14,10 +14,11 @@ layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 26.0
|
||||
offset_top = 11.0
|
||||
offset_right = 3.0
|
||||
offset_bottom = -12.0
|
||||
offset_left = 25.0
|
||||
offset_top = 15.0
|
||||
offset_right = 17.0
|
||||
offset_bottom = 7.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(0.3, 0.3)
|
||||
texture_normal = ExtResource("1_0a4l0")
|
||||
|
||||
@@ -5,7 +5,7 @@ class_name scroll_threats extends ScrollContainer
|
||||
|
||||
const CellLineEdit = preload('res://table/ячейка-2.tscn') ## Ячейка таблицы.
|
||||
const TableHeader = preload('res://table/header.tscn') ## Ячейка заголовок таблицы.
|
||||
const EmitLed = preload('res://scenes/frame-threats/emit-led.tscn') ## Ячейка заголовок таблицы.
|
||||
const EmitLed = preload('res://scenes/frame-threats/emit-led.tscn') ## Ячейка символа излучения
|
||||
|
||||
const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader, TableHeader , TableHeader ] ## Описание ряда заголовка.
|
||||
const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit, EmitLed ] ## Описание ряда.
|
||||
@@ -16,6 +16,8 @@ const TABLE_COLUMN_SIZE = [ 65, 70, 110, 140,
|
||||
const TABLE_TEXT_ROWS = 4
|
||||
const EMIT_STATE_COL = 4
|
||||
|
||||
var color_emit: Color
|
||||
|
||||
## Снимает выделение цели.
|
||||
func on_rto_threat_unsel(_th_id): $table.clear_rows_selected()
|
||||
|
||||
@@ -49,6 +51,7 @@ func _ready() -> void:
|
||||
signaller.connect('rto_threat_sel', Callable(self, 'on_rto_threat_sel').bind($table))
|
||||
signaller.connect('rto_threat_unsel', Callable(self, 'on_rto_threat_unsel'))
|
||||
$table.connect('row_pressed', Callable(self, 'on_row_pressed'))
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
call_deferred('init_table')
|
||||
|
||||
|
||||
@@ -74,7 +77,7 @@ func on_threat_update(th, table_index: Dictionary):
|
||||
emit_txr.self_modulate = Color.ORANGE
|
||||
elif th.emit_state == 2:
|
||||
emit_txr.visible = true
|
||||
emit_txr.self_modulate = Color.RED
|
||||
emit_txr.self_modulate = color_emit
|
||||
|
||||
|
||||
|
||||
@@ -128,3 +131,9 @@ func disable_edit(tbl, num_col: int, i_row: int):
|
||||
for col in num_col:
|
||||
var node: LineEdit = tbl.get_node2(col, i_row)
|
||||
node.editable = false
|
||||
|
||||
|
||||
func on_settings_changed():
|
||||
var json_col = ProjectSettings.get_setting('application/config/%s' % 'Цвет кнопки \"Подавление\"', '[1.0, 1.0, 1.0, 1.0]')
|
||||
var arr_col = JSON.parse_string(json_col)
|
||||
color_emit = Color(arr_col[0], arr_col[1], arr_col[2], arr_col[3])
|
||||
|
||||
101
scenes/hranges/panel.gd
Normal file
@@ -0,0 +1,101 @@
|
||||
@tool
|
||||
|
||||
extends PanelContainer
|
||||
|
||||
## Предназначено для отображения диапазонов на горизонтальной шкале
|
||||
|
||||
@export_range(0.0, 1.0) var gap_top: float = 0.05 ## Зазор сверху
|
||||
@export_range(0.0, 1.0) var gap_bottom: float = 0.05 ## Зазор снизу
|
||||
var ranges_save: Dictionary[StringName, Array] ## <имя диапазона>: [диапазон(x - начало, y - конец), цвет]
|
||||
|
||||
|
||||
@export_file var image_file: String:
|
||||
set(val):
|
||||
image_file = val
|
||||
if is_inside_tree():
|
||||
_enter_tree()
|
||||
|
||||
|
||||
@export var back_color: Color:
|
||||
set(val):
|
||||
back_color = val
|
||||
if is_inside_tree():
|
||||
_enter_tree()
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if ResourceLoader.exists(image_file):
|
||||
$grid/image.texture = load(image_file)
|
||||
$grid/canvas.self_modulate = back_color
|
||||
|
||||
|
||||
## Добавляет новый диапазон.
|
||||
func set_range(nm: StringName, x0: float, x1: float, col: Color) -> void:
|
||||
ranges_save[nm] = [Vector2(x0, x1), col]
|
||||
_on_resized()
|
||||
|
||||
|
||||
func set_range_color(nm: StringName, col: Color):
|
||||
if not ranges_save.has(nm):
|
||||
push_error('нет такого диапазона: \"%s\"' % nm)
|
||||
return false
|
||||
ranges_save[nm][1] = col
|
||||
var rng: = get_node_or_null(NodePath(nm))
|
||||
if not rng:
|
||||
push_error('нет такого элемента: \"%s\"' % nm)
|
||||
return false
|
||||
rng.color = col
|
||||
return true
|
||||
|
||||
|
||||
func clear_ranges():
|
||||
var l0 = ranges_save.size()
|
||||
ranges_save.clear()
|
||||
var l1 = ranges_save.size()
|
||||
_on_resized()
|
||||
return l1 < l0
|
||||
|
||||
|
||||
func del_range(nm: StringName) -> bool:
|
||||
var rc = ranges_save.erase(nm)
|
||||
_on_resized()
|
||||
return rc
|
||||
|
||||
|
||||
func _add_range_view(nm: StringName, x0: float, x1: float, col: Color):
|
||||
var rng = Polygon2D.new()
|
||||
var canvas = $grid/canvas
|
||||
var canvas_size = canvas.size
|
||||
var point0 = canvas_size * Vector2(x0, gap_bottom) ## лево низ
|
||||
var point1 = canvas_size * Vector2(x0, 1.0 - gap_top) ## лево верх
|
||||
var point2 = canvas_size * Vector2(x1, 1.0 - gap_top) ## право верх
|
||||
var point3 = canvas_size * Vector2(x1, gap_bottom) ## право низ
|
||||
rng.polygon = [point0, point1, point2, point3]
|
||||
rng.name = nm
|
||||
rng.color = col
|
||||
canvas.add_child(rng)
|
||||
|
||||
|
||||
## Удаляет заданный диапазон.
|
||||
func _del_range_view(nm: StringName) -> void:
|
||||
var canvas: = $grid/canvas
|
||||
var rng: = canvas.get_node(NodePath(nm))
|
||||
canvas.remove_child(rng)
|
||||
rng.queue_free()
|
||||
|
||||
|
||||
func _clear_ranges_view():
|
||||
var canvas: = $grid/canvas
|
||||
var range_views: = canvas.get_children()
|
||||
for rng in range_views:
|
||||
canvas.remove_child(rng)
|
||||
rng.queue_free()
|
||||
|
||||
|
||||
func _on_resized() -> void:
|
||||
_clear_ranges_view()
|
||||
for nm in ranges_save:
|
||||
var range_save = ranges_save[nm]
|
||||
var rng = range_save[0]
|
||||
var col = range_save[1]
|
||||
_add_range_view(nm, rng.x, rng.y, col)
|
||||
1
scenes/hranges/panel.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://jtio1scc72bl
|
||||
38
scenes/hranges/panel.tscn
Normal file
@@ -0,0 +1,38 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://hr55mkcneaer"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jtio1scc72bl" path="res://scenes/hranges/panel.gd" id="1_pg3d7"]
|
||||
[ext_resource type="Texture2D" uid="uid://c73tjrn8gr00o" path="res://data/Передатчик.png" id="2_ajqhv"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ajqhv"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_56wj8"]
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="panel" type="PanelContainer"]
|
||||
offset_right = 400.0
|
||||
offset_bottom = 45.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_ajqhv")
|
||||
script = ExtResource("1_pg3d7")
|
||||
back_color = Color(0.601223, 0.601223, 0.601223, 1)
|
||||
|
||||
[node name="grid" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
columns = 2
|
||||
|
||||
[node name="image" type="TextureRect" parent="grid"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("2_ajqhv")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="canvas" type="PanelContainer" parent="grid"]
|
||||
self_modulate = Color(0.601223, 0.601223, 0.601223, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_56wj8")
|
||||
|
||||
[connection signal="resized" from="." to="." method="_on_resized"]
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://8ll27id5ajq1"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://8ll27id5ajq1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d0jwv5opi3mrl" path="res://scenes/pribor-afsp/pribor-afsp.gd" id="1_151rh"]
|
||||
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="2_4vyhj"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/pribor-afsp/bort-afsp.tscn" id="3_d7iti"]
|
||||
|
||||
[node name="pribor_afsp" type="Control"]
|
||||
@@ -20,13 +19,6 @@ settings_path_to_url = "Адрес АФСП левого борта"
|
||||
settings_path_to_wait_time = "Период опроса состояния АФСП, секунды"
|
||||
metadata/DeviceName = &"Устройство РР левого борта"
|
||||
|
||||
[node name="request" type="HTTPRequest" parent="."]
|
||||
use_threads = true
|
||||
script = ExtResource("2_4vyhj")
|
||||
|
||||
[node name="timer" type="Timer" parent="request"]
|
||||
autostart = true
|
||||
|
||||
[node name="bort" parent="." instance=ExtResource("3_d7iti")]
|
||||
layout_mode = 0
|
||||
offset_left = 24.0
|
||||
@@ -35,7 +27,4 @@ offset_right = 604.0
|
||||
offset_bottom = 1216.78
|
||||
metadata/DeviceName = &"Устройство РР левого борта"
|
||||
|
||||
[connection signal="child_entered_tree" from="request" to="request" method="_on_child_entered_tree"]
|
||||
[connection signal="request_completed" from="request" to="." method="_on_request_completed"]
|
||||
[connection signal="timeout" from="request/timer" to="request" method="_on_request_timer"]
|
||||
[connection signal="pressed" from="bort" to="." method="_on_item_pressed"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://5uv1idl3lqet"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://5uv1idl3lqet"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d0jwv5opi3mrl" path="res://scenes/pribor-afsp/pribor-afsp.gd" id="1_tfses"]
|
||||
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="2_miwrd"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/pribor-afsp/bort-afsp.tscn" id="3_xpxb5"]
|
||||
|
||||
[node name="pribor_afsp" type="Control"]
|
||||
@@ -20,13 +19,6 @@ settings_path_to_url = "Адрес АФСП правого борта"
|
||||
settings_path_to_wait_time = "Период опроса состояния АФСП, секунды"
|
||||
metadata/DeviceName = &"Устройство РР правого борта"
|
||||
|
||||
[node name="request" type="HTTPRequest" parent="."]
|
||||
use_threads = true
|
||||
script = ExtResource("2_miwrd")
|
||||
|
||||
[node name="timer" type="Timer" parent="request"]
|
||||
autostart = true
|
||||
|
||||
[node name="bort" parent="." instance=ExtResource("3_xpxb5")]
|
||||
layout_mode = 0
|
||||
offset_left = 12.0
|
||||
@@ -35,7 +27,4 @@ offset_right = 592.0
|
||||
offset_bottom = 1130.0
|
||||
metadata/DeviceName = &"Устройство РР правого борта"
|
||||
|
||||
[connection signal="child_entered_tree" from="request" to="request" method="_on_child_entered_tree"]
|
||||
[connection signal="request_completed" from="request" to="." method="_on_request_completed"]
|
||||
[connection signal="timeout" from="request/timer" to="request" method="_on_request_timer"]
|
||||
[connection signal="pressed" from="bort" to="." method="_on_item_pressed"]
|
||||
|
||||
@@ -10,91 +10,161 @@ 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')
|
||||
var ctrl_pos = 0
|
||||
var request_url: Node
|
||||
var time_req: Node
|
||||
# SystemName: "gen" DevList - там состояние связи с генератором по кан шине
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
ProjectSettings.connect('settings_changed', on_settings_chaged)
|
||||
on_settings_chaged()
|
||||
request_url = $request
|
||||
time_req = $request/timer
|
||||
# Подключаемся к сигналам в зависимости от борта
|
||||
if this_afsp_name == 'Устройство РР левого борта':
|
||||
scouting.response_received_left.connect(_on_response_received)
|
||||
else:
|
||||
scouting.response_received_right.connect(_on_response_received)
|
||||
|
||||
# При старте отрисовываем последние данные (если есть)
|
||||
_on_press_device()
|
||||
|
||||
|
||||
func on_settings_chaged():
|
||||
$request.request_url = ProjectSettings.get_setting('application/config/%s' % settings_path_to_url)
|
||||
$request/timer.wait_time = float(ProjectSettings.get_setting('application/config/%s' % settings_path_to_wait_time))
|
||||
tools.allways($request.request_url != null)
|
||||
|
||||
|
||||
func _on_request_completed(result, _response_code, headers, body: PackedByteArray):
|
||||
|
||||
var unit_instance: = network.get_unit_instance(unit_name)
|
||||
|
||||
if result != 0:
|
||||
var rs = $request.get_result_string(result)
|
||||
log.error('\"%s\"' % rs)
|
||||
# Обработка полученного ответа от rtr
|
||||
func _on_response_received(response: String, success: bool) -> void:
|
||||
var unit_instance = network.get_unit_instance(unit_name)
|
||||
|
||||
if not success:
|
||||
log.error('Ошибка запроса: %s' % response)
|
||||
if unit_instance.online:
|
||||
unit_instance.online = false
|
||||
unit_instance.emit_signal('line_changed', unit_instance)
|
||||
# При ошибке сбрасываем UI в 0
|
||||
_reset_ui_to_zero()
|
||||
return
|
||||
|
||||
var json_str: String = body.get_string_from_utf8()
|
||||
if not json_str:
|
||||
push_error('не удаётся получить строку utf8 из данных (%s)' % headers)
|
||||
|
||||
# Парсим JSON строку
|
||||
var parse_result = json_conv.parse(response)
|
||||
if parse_result != OK:
|
||||
var err = json_conv.get_error_message()
|
||||
push_error('разбор json прерван - "%s"' % err)
|
||||
if unit_instance.online:
|
||||
unit_instance.online = false
|
||||
unit_instance.emit_signal('line_changed', unit_instance)
|
||||
# При ошибке парсинга сбрасываем UI в 0
|
||||
_reset_ui_to_zero()
|
||||
return
|
||||
|
||||
var rc: = json_conv.parse(json_str)
|
||||
if rc != Error.OK:
|
||||
var err: = json_conv.get_error_message()
|
||||
push_error('разбор json прерван - \"%s\" (%s)' % [err, headers])
|
||||
if unit_instance.online:
|
||||
unit_instance.online = false
|
||||
unit_instance.emit_signal('line_changed', unit_instance)
|
||||
return
|
||||
|
||||
|
||||
# Ищем имя прибора в JSON
|
||||
var pp = []
|
||||
tools.map_solid_to_array(prefix_path, pp)
|
||||
var ret_val = [null, false, 0]
|
||||
var pp_copy = pp.duplicate(true)
|
||||
tools.get_value_by_path(json_conv.data, pp, ret_val)
|
||||
|
||||
if not ret_val[1]:
|
||||
push_error('путь %s не найден (%s)' % [pp_copy, ret_val[2]])
|
||||
# Если путь не найден, сбрасываем UI в 0
|
||||
_reset_ui_to_zero()
|
||||
return
|
||||
|
||||
|
||||
var received_afsp_name: StringName = ret_val[0]
|
||||
|
||||
|
||||
# Проверяем, что ответ от нужного прибора
|
||||
if this_afsp_name != received_afsp_name:
|
||||
# TODO: Сюда попадаем, когда приходит от другого борта
|
||||
#push_error('не известное устройство: \"%s\", ожидадось: \"%s\"' % [received_afsp_name, this_afsp_name])
|
||||
# Ответ от другого борта - игнорируем
|
||||
return
|
||||
|
||||
|
||||
# Обновляем статус online
|
||||
unit_instance.rx_tick = Time.get_ticks_msec()
|
||||
if not unit_instance.online:
|
||||
unit_instance.online = true
|
||||
unit_instance.emit_signal('line_changed', unit_instance)
|
||||
|
||||
# Обновляем UI элементы из JSON
|
||||
_update_ui(json_conv.data)
|
||||
|
||||
|
||||
# Обновление интерфейса из JSON данных
|
||||
func _update_ui(json_data: Dictionary) -> void:
|
||||
# Конвертер
|
||||
for child in $bort.get_node('konverter/grid').get_children():
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value1')
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value2')
|
||||
node_maper.map_error_codes_to_item(json_conv.data, child, 'state', 0)
|
||||
node_maper.map_value_to_item(json_data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_data, child, 'value1')
|
||||
node_maper.map_value_to_item(json_data, child, 'value2')
|
||||
node_maper.map_error_codes_to_item(json_data, child, 'state', 0)
|
||||
|
||||
# Антенна 1
|
||||
for child in $bort.get_node('antenna1/grid').get_children():
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_conv.data, child, 'state', 0)
|
||||
node_maper.map_value_to_item(json_data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_data, child, 'state', 0)
|
||||
|
||||
# Антенна 2
|
||||
for child in $bort.get_node('antenna2/grid').get_children():
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_conv.data, child, 'state', 0)
|
||||
node_maper.map_value_to_item(json_data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_data, child, 'state', 0)
|
||||
|
||||
# Остальные элементы
|
||||
for child in $bort.get_children():
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_conv.data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_conv.data, child, 'state', 0)
|
||||
node_maper.map_value_to_item(json_data, child, 'value0')
|
||||
node_maper.map_value_to_item(json_data, child, 'value1')
|
||||
node_maper.map_error_codes_to_item(json_data, child, 'state', 0)
|
||||
|
||||
|
||||
# Сброс всех UI элементов в 0 (при отсутствии данных)
|
||||
func _reset_ui_to_zero() -> void:
|
||||
# Конвертер
|
||||
for child in $bort.get_node('konverter/grid').get_children():
|
||||
_reset_item_value(child)
|
||||
|
||||
# Антенна 1
|
||||
for child in $bort.get_node('antenna1/grid').get_children():
|
||||
_reset_item_value(child)
|
||||
|
||||
# Антенна 2
|
||||
for child in $bort.get_node('antenna2/grid').get_children():
|
||||
_reset_item_value(child)
|
||||
|
||||
# Остальные элементы
|
||||
for child in $bort.get_children():
|
||||
_reset_item_value(child)
|
||||
|
||||
|
||||
# Сброс конкретного элемента в 0
|
||||
func _reset_item_value(item) -> void:
|
||||
item.set('value0', 0)
|
||||
item.set('value1', 0)
|
||||
item.set('value2', 0)
|
||||
item.set('state', 0)
|
||||
|
||||
|
||||
# Отрисовывание при нажатии на прибор
|
||||
func _on_press_device() -> void:
|
||||
# Проверяем, есть ли сохраненные данные в rtr
|
||||
var has_data = false
|
||||
var last_response = ""
|
||||
|
||||
if this_afsp_name == 'Устройство РР левого борта':
|
||||
has_data = scouting.has_left_success()
|
||||
if has_data:
|
||||
last_response = scouting.get_left_response()
|
||||
else:
|
||||
has_data = scouting.has_right_success()
|
||||
if has_data:
|
||||
last_response = scouting.get_right_response()
|
||||
|
||||
# Если есть данные - парсим и отображаем
|
||||
if has_data and not last_response.is_empty():
|
||||
var parse_result = json_conv.parse(last_response)
|
||||
if parse_result == OK:
|
||||
# Проверяем, что это данные именно от этого прибора
|
||||
var pp = []
|
||||
tools.map_solid_to_array(prefix_path, pp)
|
||||
var ret_val = [null, false, 0]
|
||||
tools.get_value_by_path(json_conv.data, pp, ret_val)
|
||||
|
||||
if ret_val[1] and ret_val[0] == this_afsp_name:
|
||||
_update_ui(json_conv.data)
|
||||
return
|
||||
|
||||
# Если данных нет или они не подходят - сбрасываем в 0
|
||||
_reset_ui_to_zero()
|
||||
|
||||
|
||||
## Вызывается при клике мыши на элементе.
|
||||
|
||||
@@ -10,12 +10,17 @@ class_name pribor_rtr extends 'res://scenes/контроль/прибор.gd'
|
||||
@export var settings_path2_to_url: String = '' ## Должно быть в ProjectSettings
|
||||
@export var settings_path_to_wait_time: String = '' ## Должно быть в ProjectSettings
|
||||
|
||||
signal receive_response_afp_bpo()
|
||||
|
||||
static var json_conv: JSON = JSON.new()
|
||||
static var node_maper = load('res://scenes/контроль/node-maper.gd')
|
||||
static var node_request_1: Node
|
||||
static var node_request_timer_1: Node
|
||||
static var node_request_2: Node
|
||||
static var node_request_timer_2: Node
|
||||
|
||||
|
||||
var ctrl_pos = 110
|
||||
|
||||
|
||||
var bort_to_node_name = {}
|
||||
var bort_to_unit_name = {}
|
||||
|
||||
@@ -23,6 +28,10 @@ var bort_to_unit_name = {}
|
||||
|
||||
func _ready() -> void:
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
node_request_1 = $request1
|
||||
node_request_timer_1 = $request1/timer
|
||||
node_request_2 = $request2
|
||||
node_request_timer_2 = $request2/timer
|
||||
on_settings_changed()
|
||||
find_labels(self)
|
||||
|
||||
@@ -30,17 +39,17 @@ func _ready() -> void:
|
||||
func on_settings_changed():
|
||||
bort_to_node_name.merge({this_bpo1_name: 'grid_bpo_a1', this_bpo2_name: 'grid_bpo_a2'}, true)
|
||||
bort_to_unit_name.merge({this_bpo1_name: unit_name1, this_bpo2_name: unit_name2})
|
||||
$request1.request_url = ProjectSettings.get_setting('application/config/%s' % settings_path1_to_url)
|
||||
$request1/timer.wait_time = float(ProjectSettings.get_setting('application/config/%s' % settings_path_to_wait_time))
|
||||
$request2.request_url = ProjectSettings.get_setting('application/config/%s' % settings_path2_to_url)
|
||||
$request2/timer.wait_time = float(ProjectSettings.get_setting('application/config/%s' % settings_path_to_wait_time))
|
||||
assert($request1.request_url != null)
|
||||
assert($request2.request_url != null)
|
||||
node_request_1.request_url = ProjectSettings.get_setting('application/config/%s' % settings_path1_to_url)
|
||||
node_request_timer_1.wait_time = float(ProjectSettings.get_setting('application/config/%s' % settings_path_to_wait_time))
|
||||
node_request_2.request_url = ProjectSettings.get_setting('application/config/%s' % settings_path2_to_url)
|
||||
node_request_timer_2.wait_time = float(ProjectSettings.get_setting('application/config/%s' % settings_path_to_wait_time))
|
||||
assert(node_request_1.request_url != null)
|
||||
assert(node_request_2.request_url != null)
|
||||
|
||||
|
||||
func _on_request_completed(result, _response_code, headers, body: PackedByteArray):
|
||||
if result != 0:
|
||||
var rs = $request1.get_result_string(result)
|
||||
var rs = node_request_1.get_result_string(result)
|
||||
push_error('\"%s\"' % rs)
|
||||
return
|
||||
|
||||
@@ -97,18 +106,20 @@ func _on_request_completed(result, _response_code, headers, body: PackedByteArra
|
||||
$mod_pit_g1.state = 1
|
||||
break
|
||||
|
||||
emit_signal('receive_response_afp_bpo')
|
||||
|
||||
|
||||
func find_labels(node1: Node):
|
||||
if node1 is Label:
|
||||
if node1.name in ["lbl_rname", "rname"]:
|
||||
if not node1.has_meta("tooltip_set"):
|
||||
if node1.name in ['lbl_rname', 'rname']:
|
||||
if not node1.has_meta('tooltip_set'):
|
||||
ctrl_pos += 1
|
||||
var box_number = ceili(float(ctrl_pos) / 10.0)
|
||||
var position_number = ctrl_pos % 10
|
||||
if position_number == 0:
|
||||
position_number = 10
|
||||
node1.tooltip_text = "Ящик - %d, Позиция - %d" % [box_number, position_number]
|
||||
node1.tooltip_text = 'Ящик - %d, Позиция - %d' % [box_number, position_number]
|
||||
node1.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
node1.set_meta("tooltip_set", true)
|
||||
node1.set_meta('tooltip_set', true)
|
||||
for child in node1.get_children():
|
||||
find_labels(child)
|
||||
|
||||
@@ -58,7 +58,7 @@ offset_right = 205.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A3"
|
||||
metadata/fs = "fs_6"
|
||||
metadata/fs = "fs_7"
|
||||
|
||||
[node name="ref_A5" parent="." groups=["default_reset", "fs_group"] instance=ExtResource("3_kqnvt")]
|
||||
offset_left = 205.0
|
||||
@@ -67,7 +67,7 @@ offset_right = 255.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A2"
|
||||
metadata/fs = "fs_7"
|
||||
metadata/fs = "fs_6"
|
||||
|
||||
[node name="ref_A7" parent="." groups=["default_reset"] instance=ExtResource("3_kqnvt")]
|
||||
offset_left = 255.0
|
||||
|
||||
@@ -41,8 +41,6 @@ func _process(_delta: float) -> void:
|
||||
func _on_start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('default_reset'))
|
||||
set_default_state(get_tree().get_nodes_in_group('power_amplifier'))
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
on_press_device(unit_prd_k.self_name)
|
||||
|
||||
|
||||
static func set_default_state(default_reset_array_node: Array) -> void:
|
||||
@@ -103,6 +101,7 @@ static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifi
|
||||
|
||||
|
||||
func on_press_device(_name_davice: String) -> void:
|
||||
if not is_inside_tree(): return
|
||||
var control_data: Dictionary = unit_prd_k.get_control_results()
|
||||
control_data['nodes_y5'] = get_tree().get_nodes_in_group('y-5')
|
||||
control_data['node_ip_power_arr'] = get_tree().get_nodes_in_group('power_supply')
|
||||
@@ -110,9 +109,9 @@ func on_press_device(_name_davice: String) -> void:
|
||||
control_data['power_amplifier'] = get_tree().get_nodes_in_group('power_amplifier')
|
||||
control_data['default_reset_array_node'] = get_tree().get_nodes_in_group('default_reset')
|
||||
control_data['module_fs_1'] = $kasseta_fs_kd/ref_A2
|
||||
control_data['module_fs_6'] = $kasseta_fs_kd/ref_A4
|
||||
control_data['module_fs_6'] = $kasseta_fs_kd/ref_A7
|
||||
control_data['dou_6'] = $dou6_A7
|
||||
control_data['module_fs_7'] = $kasseta_fs_kd/ref_A7
|
||||
control_data['module_fs_7'] = $kasseta_fs_kd/ref_A4
|
||||
control_data['dou_7'] = $dou7_A8
|
||||
on_control_result(control_data)
|
||||
|
||||
@@ -191,11 +190,11 @@ func find_labels(node1: Node):
|
||||
|
||||
func _on_status_updated(status_text: String) -> void:
|
||||
_update_status_text(status_text)
|
||||
on_press_device(unit_prd_k.self_name)
|
||||
|
||||
|
||||
func _update_status_text(text: String) -> void:
|
||||
$control_result.text = text
|
||||
# Можно добавить смену цвета в зависимости от статуса
|
||||
if 'Ошибка' in text or 'неисправен' in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s неисправен' % [unit_prd_k.self_name])
|
||||
|
||||
@@ -41,8 +41,6 @@ func _on_start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('power_amplifier'))
|
||||
for um in get_tree().get_nodes_in_group('power_amplifier'):
|
||||
um.value0 = [0, 0, 0, 0, 0, 0]
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
on_press_device(unit_prd_n.self_name)
|
||||
|
||||
|
||||
static func set_default_state(default_reset_array_node: Array) -> void:
|
||||
@@ -94,6 +92,7 @@ static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifi
|
||||
|
||||
|
||||
func on_press_device(_device_name: String) -> void:
|
||||
if not is_inside_tree(): return
|
||||
var nodes_y5: Array = get_tree().get_nodes_in_group('y-5')
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
@@ -189,11 +188,11 @@ func find_labels(node1: Node):
|
||||
|
||||
func _on_status_updated(status_text: String) -> void:
|
||||
_update_status_text(status_text)
|
||||
on_press_device(unit_prd_n.self_name)
|
||||
|
||||
|
||||
func _update_status_text(text: String) -> void:
|
||||
$control_result.text = text
|
||||
# Можно добавить смену цвета в зависимости от статуса
|
||||
if 'Ошибка' in text or 'неисправен' in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s неисправен' % [unit_prd_n.self_name])
|
||||
|
||||
@@ -41,8 +41,6 @@ func _on_start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('power_amplifier'))
|
||||
for um in get_tree().get_nodes_in_group('power_amplifier'):
|
||||
um.value0 = [0, 0, 0, 0, 0, 0]
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
on_press_device(unit_prd_v.self_name)
|
||||
|
||||
|
||||
static func set_default_state(default_reset_array_node: Array) -> void:
|
||||
@@ -93,6 +91,7 @@ static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifi
|
||||
|
||||
|
||||
func on_press_device(_device_name: String) -> void:
|
||||
if not is_inside_tree(): return
|
||||
var nodes_y5: Array = get_tree().get_nodes_in_group('y-5')
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
@@ -186,11 +185,11 @@ func find_labels(node1: Node):
|
||||
|
||||
func _on_status_updated(status_text: String) -> void:
|
||||
_update_status_text(status_text)
|
||||
on_press_device(unit_prd_v.self_name)
|
||||
|
||||
|
||||
func _update_status_text(text: String) -> void:
|
||||
$control_result.text = text
|
||||
# Можно добавить смену цвета в зависимости от статуса
|
||||
if 'Ошибка' in text or 'неисправен' in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s неисправен' % [unit_prd_v.self_name])
|
||||
|
||||
@@ -23,3 +23,17 @@ func _enter_tree() -> void:
|
||||
func on_setting_changed():
|
||||
var ext_cu = ProjectSettings.get_setting('application/config/Внешнее управление', false)
|
||||
get_parent().get_node('remote_control').visible = ext_cu
|
||||
apply_colors()
|
||||
|
||||
|
||||
func apply_colors():
|
||||
var is_light: bool = ProjectSettings.get_setting('application/config/Цвет темы программы', false)
|
||||
var style = StyleBoxFlat.new()
|
||||
if is_light:
|
||||
style.bg_color = Color.DARK_GRAY
|
||||
add_theme_stylebox_override('tabbar_background', style)
|
||||
add_theme_stylebox_override('panel', style)
|
||||
else:
|
||||
style.bg_color = Color(0.12, 0.12, 0.12)
|
||||
add_theme_stylebox_override('tabbar_background', style)
|
||||
add_theme_stylebox_override('panel', style)
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://3slb0i3pvowc"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://3slb0i3pvowc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvo6tcreqyuex" path="res://scenes/tabs-switch/tab-switch.gd" id="1_fg0vd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b276iygic5itk" path="res://scenes/работа/работа.tscn" id="2_u7p16"]
|
||||
[ext_resource type="PackedScene" uid="uid://lwmw4egynmd1" path="res://scenes/контроль/контроль.tscn" id="3_txp0s"]
|
||||
[ext_resource type="PackedScene" uid="uid://trt0q8th3bn2" path="res://scenes/журнал/журнал.tscn" id="4_cu5k8"]
|
||||
[ext_resource type="PackedScene" uid="uid://dab6loryocc73" path="res://scenes/эмс/эмс.tscn" id="5_u71bh"]
|
||||
[ext_resource type="PackedScene" uid="uid://musb21x2u0xs" path="res://scenes/эмс2/эмс2.tscn" id="6_41d34"]
|
||||
[ext_resource type="PackedScene" uid="uid://musb21x2u0xs" path="res://scenes/эмс-тг/эмс-тг.tscn" id="6_41d34"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnptm4rlp60dq" path="res://scenes/настройки/настройки.tscn" id="6_i8iv3"]
|
||||
[ext_resource type="Script" path="res://scenes/tabs-switch/lbl_ready.gd" id="8_tidwt"]
|
||||
[ext_resource type="Script" uid="uid://roajn6c6wvc1" path="res://scenes/tabs-switch/тренаж_режим.gd" id="9_41d34"]
|
||||
[ext_resource type="Script" uid="uid://q7k2yihg057j" path="res://scenes/tabs-switch/lbl_ready.gd" id="8_tidwt"]
|
||||
[ext_resource type="Script" uid="uid://roajn6c6wvc1" path="res://scenes/tabs-switch/тренаж-режим.gd" id="9_41d34"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tidwt"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_41d34"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cw2ss"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nmdfd"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vap7n"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vap7n"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o1r22"]
|
||||
|
||||
@@ -33,17 +25,14 @@ bg_color = Color(0, 100, 0, 1)
|
||||
[node name="panel" type="Panel"]
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 1200.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_tidwt")
|
||||
|
||||
[node name="tab_switch" type="TabContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 1200.0
|
||||
tooltip_text = "Переключает режимы работы программы"
|
||||
theme_override_styles/tab_focus = SubResource("StyleBoxEmpty_41d34")
|
||||
theme_override_styles/tab_disabled = SubResource("StyleBoxEmpty_cw2ss")
|
||||
theme_override_styles/tabbar_background = SubResource("StyleBoxEmpty_nmdfd")
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_vap7n")
|
||||
theme_override_styles/tabbar_background = SubResource("StyleBoxFlat_vap7n")
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_vap7n")
|
||||
current_tab = 0
|
||||
script = ExtResource("1_fg0vd")
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
extends CanvasGroup
|
||||
class_name MercatorTileMap
|
||||
|
||||
const VECTOR00: = Vector2(0, 0)
|
||||
const VECTOR11: = Vector2(1, 1)
|
||||
|
||||
## Отображение карт WEB Mercator
|
||||
|
||||
#http://10.1.1.220/osm_tiles/0/0/0.png
|
||||
@@ -26,10 +29,9 @@ const TILE_REQUEST_NAME: = 'tile_request_%d'
|
||||
@export_color_no_alpha() var back_color: = Color.BLACK
|
||||
@export var show_ship_radius: bool = true
|
||||
@export var ship_radius_km: float = 8.0
|
||||
@onready var scale_label: String
|
||||
@onready var coordinates_label: String
|
||||
@onready var threat_mark: PackedScene = load("res://scenes/tilemap/threat.tscn")
|
||||
@onready var ship_mark: PackedScene = load("res://scenes/tilemap/ship_mark.tscn")
|
||||
@onready var threat_mark: PackedScene = load('res://scenes/tilemap/threat.tscn')
|
||||
@onready var ship_mark: PackedScene = load('res://scenes/tilemap/ship-mark.tscn')
|
||||
var ship_id := 9999
|
||||
var ship_instance: Node2D = null
|
||||
const default_size: = 400.0
|
||||
@@ -89,7 +91,7 @@ var _marks: Dictionary = {}
|
||||
var _req_count: = 0
|
||||
var image: = Image.new()
|
||||
var image_load_proc: Callable
|
||||
var now: = 0
|
||||
var now: = 0.0
|
||||
var visible_marks_count: = 0
|
||||
var border1: ImageTexture
|
||||
var border2: ImageTexture
|
||||
@@ -227,9 +229,11 @@ func _input(e) -> void:
|
||||
if e.button_index == MOUSE_BUTTON_WHEEL_DOWN:
|
||||
if (not is_out_border1) and (not is_out_border2):
|
||||
increment_zoom(-zoom_step, lmp)
|
||||
update_scale_label()
|
||||
queue_redraw()
|
||||
elif e.button_index == MOUSE_BUTTON_WHEEL_UP:
|
||||
increment_zoom( zoom_step, lmp)
|
||||
update_scale_label()
|
||||
queue_redraw()
|
||||
if e.button_index == MOUSE_BUTTON_LEFT:
|
||||
_dragging = e.pressed
|
||||
@@ -256,22 +260,12 @@ func _input(e) -> void:
|
||||
signaller.emmit(signaller.map_user_panning)
|
||||
|
||||
|
||||
func multiply_zoom(multiplier: float, pivot: Vector2) -> void:
|
||||
var p1: = screen_to_world(_xyz, pivot)
|
||||
_xyz.z = clampf(_xyz.z * multiplier, min_zoom_level, max_zoom_level)
|
||||
var p2: = screen_to_world(_xyz, pivot)
|
||||
_xyz.x -= p2.x - p1.x
|
||||
_xyz.y -= p2.y - p1.y
|
||||
update_scale_label()
|
||||
|
||||
|
||||
func increment_zoom(increment: float, pivot: Vector2) -> void:
|
||||
var p1: = screen_to_world(_xyz, pivot)
|
||||
_xyz.z = clampf(_xyz.z + increment, min_zoom_level, max_zoom_level)
|
||||
var p2: = screen_to_world(_xyz, pivot)
|
||||
_xyz.x -= p2.x - p1.x
|
||||
_xyz.y -= p2.y - p1.y
|
||||
update_scale_label()
|
||||
|
||||
|
||||
func set_zoom(zoom: float, pivot: Vector2) -> void:
|
||||
@@ -280,14 +274,13 @@ func set_zoom(zoom: float, pivot: Vector2) -> void:
|
||||
var p2: = screen_to_world(_xyz, pivot)
|
||||
_xyz.x -= p2.x - p1.x
|
||||
_xyz.y -= p2.y - p1.y
|
||||
update_scale_label()
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
# Рисование плиток
|
||||
var z: float = min(max_zoom_level, _xyz.z)
|
||||
var t1: = screen_to_tile(Vector2(0, 0), z)
|
||||
var t2: = screen_to_tile($canvas.size, z) + Vector2(1, 1)
|
||||
var t1: = screen_to_tile(VECTOR00, z)
|
||||
var t2: = screen_to_tile($canvas.size, z) + VECTOR11
|
||||
is_out_border1 = true
|
||||
is_out_border2 = true
|
||||
for tx in range(t1.x, t2.x):
|
||||
@@ -373,17 +366,15 @@ func _process(delta) -> void:
|
||||
remove_child(req)
|
||||
req.queue_free()
|
||||
_req_count -= 1
|
||||
push_error('запрос \"%s\" не отправлен' % tile.url) #TODO: For Deugs
|
||||
push_error('запрос \"%s\" не отправлен' % tile.url)
|
||||
if _queue.is_empty():
|
||||
emit_signal('load_completed')
|
||||
|
||||
update_scale_label()
|
||||
|
||||
|
||||
func process_online(result):
|
||||
# ERROR: res://scenes/tilemap/tilemap.gd:396 - Invalid access to property or key 'online' on a base object of type 'Nil'.
|
||||
var unit_instance: = network.get_unit_instance('уарэп-карта')
|
||||
if not unit_instance: return
|
||||
if not unit_instance: return true
|
||||
|
||||
if result != HTTPRequest.RESULT_SUCCESS:
|
||||
if unit_instance.online:
|
||||
@@ -403,9 +394,8 @@ func _response(result, code, _headers: Array, body: PackedByteArray, req, tile:
|
||||
remove_child(req)
|
||||
req.queue_free()
|
||||
|
||||
if process_online(result):
|
||||
if not process_online(result):
|
||||
_queue[tile.i] = tile
|
||||
else:
|
||||
return
|
||||
|
||||
if code == 404:
|
||||
@@ -413,7 +403,7 @@ func _response(result, code, _headers: Array, body: PackedByteArray, req, tile:
|
||||
return
|
||||
|
||||
if Error.OK != image_load_proc.call(body):
|
||||
push_error('не удалось получить изображение (неверный формат?) из \"%s\"' % tile.url)
|
||||
push_error('не удалось получить изображение (неверный формат?) из \"%s\" (%d байт)' % [tile.url, body.size()])
|
||||
return
|
||||
|
||||
tile.texture = ImageTexture.create_from_image(image)
|
||||
@@ -642,7 +632,7 @@ class Tile:
|
||||
var x: int = 0
|
||||
var y: int = 0
|
||||
var z: int = 0
|
||||
var t: int = 0
|
||||
var t: float = 0.0
|
||||
var url: String = ''
|
||||
var texture: Texture2D = null
|
||||
|
||||
@@ -732,7 +722,7 @@ func update_coordinates_label(lon: float, lat: float) -> void:
|
||||
|
||||
|
||||
func update_scale_label() -> void:
|
||||
scale_label = 'Масштаб: ' + str(round(_xyz.z))
|
||||
var scale_label: = 'Масштаб: %f' % round(_xyz.z)
|
||||
signaller.emit_signal('update_scale_map', scale_label)
|
||||
|
||||
|
||||
@@ -756,7 +746,7 @@ func _on_threat_update(th) -> void:
|
||||
|
||||
|
||||
func _on_threat_lost(th) -> void:
|
||||
var target = get_parent().get_node(str(th.id))
|
||||
var target = get_parent().get_node_or_null(str(th.id))
|
||||
if target:
|
||||
target.queue_free()
|
||||
|
||||
@@ -766,6 +756,7 @@ func zoom_in() -> void:
|
||||
return
|
||||
var center: Vector2 = $canvas.size / 2.0
|
||||
increment_zoom(zoom_step, center)
|
||||
update_scale_label()
|
||||
queue_redraw()
|
||||
|
||||
|
||||
@@ -774,23 +765,24 @@ func zoom_out() -> void:
|
||||
return
|
||||
var center: Vector2 = $canvas.size / 2.0
|
||||
increment_zoom(-zoom_step, center)
|
||||
update_scale_label()
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _on_zoom_plus_button_down() -> void:
|
||||
zoom_action = "in"
|
||||
zoom_action = 'in'
|
||||
perform_zoom()
|
||||
zoom_timer.start(0.3)
|
||||
|
||||
|
||||
func _on_zoom_minus_button_down() -> void:
|
||||
zoom_action = "out"
|
||||
zoom_action = 'out'
|
||||
perform_zoom()
|
||||
zoom_timer.start(0.3)
|
||||
|
||||
|
||||
func _on_zoom_button_up() -> void:
|
||||
zoom_action = ""
|
||||
zoom_action = ''
|
||||
zoom_timer.stop()
|
||||
|
||||
|
||||
@@ -800,8 +792,8 @@ func _on_zoom_timeout():
|
||||
|
||||
|
||||
func perform_zoom():
|
||||
if zoom_action != "":
|
||||
if zoom_action == "in":
|
||||
if zoom_action != '':
|
||||
if zoom_action == 'in':
|
||||
zoom_in()
|
||||
else:
|
||||
zoom_out()
|
||||
|
||||
@@ -28,6 +28,7 @@ size = Vector2(400, 400)
|
||||
|
||||
[node name="tilemap" type="CanvasGroup" groups=["gui_items"]]
|
||||
script = ExtResource("1_l64tp")
|
||||
max_zoom_level_server = 11
|
||||
|
||||
[node name="canvas" type="TextureRect" parent="." groups=["gui_items"]]
|
||||
clip_contents = true
|
||||
|
||||
@@ -30,18 +30,14 @@ func _setup_styles() -> void:
|
||||
|
||||
func _setup_signals() -> void:
|
||||
connect('pressed', Callable(self, '_on_pressed'))
|
||||
|
||||
if not signaller:
|
||||
return
|
||||
var signals_to_connect := ['режим_работа', 'режим_журнал', 'режим_эмс', 'режим_настройки", "режим_контроль']
|
||||
var signals_to_connect := ['режим_работа', 'режим_журнал', 'режим_эмс', 'режим_настройки', 'режим_контроль']
|
||||
for signal_name in signals_to_connect:
|
||||
if signaller.has_signal(signal_name):
|
||||
signaller.connect(signal_name, Callable(self, '_on_status_change'))
|
||||
signaller.connect(signal_name, Callable(self, '_on_status_change'))
|
||||
|
||||
|
||||
func _on_pressed():
|
||||
disabled = true
|
||||
text = 'Идет выполнение контроля'
|
||||
text = 'Контроль выполняется ...'
|
||||
flag_control_is_over = false
|
||||
_start_pulse()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
extends PanelContainer
|
||||
|
||||
## Изменяет состояние значка "прибор на связи"
|
||||
## Изменяет состояние значка 'прибор на связи'
|
||||
func set_val(val: bool):
|
||||
$connect_pribor.set_frame(val)
|
||||
if val:
|
||||
$connect_pribor.modulate = Color(0.3, 1.0, 0.3, 1) # зелёный
|
||||
set_tooltip_text("Есть связь")
|
||||
set_tooltip_text('Есть связь')
|
||||
else:
|
||||
$connect_pribor.modulate = modulate # изначальный
|
||||
set_tooltip_text("Нет связи")
|
||||
set_tooltip_text('Нет связи')
|
||||
@@ -21,7 +21,7 @@ const RESULT_STRINGS = {
|
||||
|
||||
@export var request_url: String = ''
|
||||
|
||||
signal sending_request() ## Отправка запроса
|
||||
signal send_http_request() ## Отправка запроса
|
||||
|
||||
|
||||
func get_result_string(result: Result):
|
||||
@@ -29,9 +29,11 @@ func get_result_string(result: Result):
|
||||
|
||||
|
||||
func _on_request_timer():
|
||||
print('_on_request_timer: ', Time.get_ticks_msec())
|
||||
if HTTPClient.Status.STATUS_DISCONNECTED != get_http_client_status():
|
||||
return
|
||||
var rc: = request(request_url)
|
||||
if rc != Error.OK:
|
||||
push_error('%s: \"%s\"' % [error_string(rc), request_url])
|
||||
emit_signal('sending_request')
|
||||
else:
|
||||
emit_signal('send_http_request')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
extends "res://scenes/контроль/кассета.gd"
|
||||
extends 'res://scenes/контроль/кассета.gd'
|
||||
|
||||
enum STATE_VAL {
|
||||
NONE = 0,
|
||||
|
||||
@@ -4,13 +4,16 @@ extends TextureButton
|
||||
@onready var tween: Tween
|
||||
@export var state_colors: Array
|
||||
|
||||
var progress_tween: Tween = null
|
||||
var current_timeout: float = 0.0
|
||||
|
||||
|
||||
func _ready():
|
||||
toggle_mode = true
|
||||
focus_mode = Control.FOCUS_ALL
|
||||
connect('focus_entered', _on_focus_entered)
|
||||
connect('focus_exited', _on_focus_exited)
|
||||
ProjectSettings.connect("settings_changed", Callable(self, "_on_settings_changed"))
|
||||
ProjectSettings.connect('settings_changed', Callable(self, '_on_settings_changed'))
|
||||
_on_settings_changed()
|
||||
|
||||
|
||||
@@ -23,7 +26,62 @@ func update_progress_bar(target_value) -> void:
|
||||
if tween:
|
||||
tween.kill()
|
||||
tween = create_tween()
|
||||
tween.tween_property($control_progress, 'value', target_value, 0.3)
|
||||
tween.tween_property($control_progress, 'value', target_value, 0.3 if target_value > 0 else 0.0)
|
||||
|
||||
|
||||
# Функция для анимации прогресса от 0 до 100 за указанное время
|
||||
func animate_progress_from_zero(time_req: float) -> void:
|
||||
_reset_progress_animation()
|
||||
|
||||
$control_progress.value = 0
|
||||
$control_progress.visible = true
|
||||
|
||||
current_timeout = time_req
|
||||
|
||||
progress_tween = create_tween()
|
||||
progress_tween.set_trans(Tween.TRANS_LINEAR)
|
||||
progress_tween.set_ease(Tween.EASE_IN_OUT)
|
||||
|
||||
progress_tween.tween_method(
|
||||
_update_progress_with_tooltip, # Метод для вызова каждый кадр
|
||||
0.0, # Начальное значение
|
||||
$control_progress.max_value, # Конечное значение
|
||||
time_req # Длительность
|
||||
)
|
||||
progress_tween.finished.connect(_on_progress_animation_finished.bind())
|
||||
|
||||
|
||||
# Метод для обновления прогресса и tooltip во время анимации
|
||||
func _update_progress_with_tooltip(value: float) -> void:
|
||||
# Устанавливаем значение прогресс-бара
|
||||
$control_progress.value = value
|
||||
|
||||
# Вычисляем процент и обновляем tooltip
|
||||
var max_val = $control_progress.get('max_value')
|
||||
var percentage = (value / max_val) * 100.0
|
||||
$control_progress.tooltip_text = 'Процесс контроля %01d%%' % percentage
|
||||
|
||||
|
||||
# Функция для полного сброса анимации
|
||||
func _reset_progress_animation() -> void:
|
||||
if progress_tween:
|
||||
progress_tween.kill()
|
||||
progress_tween = null
|
||||
|
||||
$control_progress.value = 0
|
||||
current_timeout = 0.0
|
||||
|
||||
|
||||
# Функция вызывается при завершении анимации
|
||||
func _on_progress_animation_finished() -> void:
|
||||
$control_progress.visible = false
|
||||
|
||||
|
||||
# Функция для принудительной остановки анимации с сохранением текущего значения
|
||||
func stop_progress_animation() -> void:
|
||||
if progress_tween:
|
||||
progress_tween.stop()
|
||||
progress_tween = null
|
||||
|
||||
|
||||
func _on_toggled(toggled_on):
|
||||
@@ -76,6 +134,8 @@ func _on_settings_changed():
|
||||
set(v):
|
||||
progress_value = v
|
||||
if is_inside_tree():
|
||||
if progress_tween:
|
||||
stop_progress_animation()
|
||||
update_progress_bar(v)
|
||||
var max_val = $control_progress.get('max_value')
|
||||
var percentage = (v / max_val) * 100.0
|
||||
@@ -111,13 +171,10 @@ func _on_settings_changed():
|
||||
|
||||
|
||||
@export var timeout_tween: float:
|
||||
# Создаем твин для анимации с плавным началом и концом
|
||||
set(v):
|
||||
$control_progress.value = 0.0
|
||||
var local_tween = create_tween()
|
||||
local_tween.tween_property($control_progress, "value", v, v)\
|
||||
.set_trans(Tween.TRANS_SINE)\
|
||||
.set_ease(Tween.EASE_IN_OUT)
|
||||
if v <= 0:
|
||||
_reset_progress_animation()
|
||||
$control_progress.visible = false
|
||||
return
|
||||
|
||||
local_tween.tween_callback(func():
|
||||
$control_progress.visible = false)
|
||||
animate_progress_from_zero(v)
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="9_w6m6a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="10_lbx5w"]
|
||||
[ext_resource type="Texture2D" uid="uid://u7h3l0jjrsnp" path="res://data/У-УФ.png" id="11_gjf0t"]
|
||||
[ext_resource type="Script" uid="uid://bncy1x53jp73d" path="res://scenes/контроль/connect_pribor.gd" id="11_u7tym"]
|
||||
[ext_resource type="Script" uid="uid://bncy1x53jp73d" path="res://scenes/контроль/connect-pribor.gd" id="11_u7tym"]
|
||||
[ext_resource type="Texture2D" uid="uid://vdhmga62vjsj" path="res://data/АФСП-РТР.png" id="13_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dm350ta8noa0v" path="res://data/У-РЭП-РПД-К.png" id="16_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3cyog3gy24ft" path="res://data/У-ЭП.png" id="16_gjf0t"]
|
||||
[ext_resource type="Script" uid="uid://xjs7owe2iexn" path="res://scenes/контроль/control_prd.gd" id="18_lbx5w"]
|
||||
[ext_resource type="Script" uid="uid://xjs7owe2iexn" path="res://scenes/контроль/control-prd.gd" id="18_lbx5w"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2vf7en1jj8dv" path="res://data/У-РЭП-РПД-В.png" id="20_l5wui"]
|
||||
[ext_resource type="Script" uid="uid://j16hg3u2uvu5" path="res://scenes/контроль/panel_container.gd" id="21_l5wui"]
|
||||
[ext_resource type="Script" uid="uid://j16hg3u2uvu5" path="res://scenes/контроль/panel-container.gd" id="21_l5wui"]
|
||||
[ext_resource type="Texture2D" uid="uid://cllxcfa130vqu" path="res://data/УА-РЭП.png" id="22_1s34a"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_iqgf5"]
|
||||
@@ -110,7 +110,6 @@ func _ready():
|
||||
uf_control = UFControl.new('уарэп-эмс')
|
||||
signaller.connect('update_uf_serviceability', Callable(self, 'on_update_uf_serviceability').bind(pribor_node))
|
||||
|
||||
|
||||
# Пиктограммы приборов, которые отображают состояние подключения только
|
||||
for pribor_node in get_tree().get_nodes_in_group('pribor_pics'):
|
||||
var unit_name = pribor_node.get_meta('unit_name')
|
||||
@@ -124,6 +123,8 @@ func _ready():
|
||||
signaller.conn(signaller.режим_настройки, on_mode_changed)
|
||||
signaller.conn(signaller.режим_эмс, on_mode_changed)
|
||||
signaller.connect('debag_control_pressed', Callable(self, 'on_debag_button_pressed'))
|
||||
scouting.request_sent_left.connect(_on_request_sent_left.bind($pribor_afsp_1))
|
||||
scouting.response_received_left.connect(_on_response_received.bind($pribor_afsp_1))
|
||||
|
||||
|
||||
func online_change_arr(_u, conn_node, pribor_meta):
|
||||
@@ -167,16 +168,19 @@ func on_pribor_press(pribor_path, header_text, pribor_node):
|
||||
pribor.add_to_group('pribor_items')
|
||||
add_child(pribor)
|
||||
update_pribor_items_visibility()
|
||||
if pribor_node.get_meta('unit_name')[0] == 'уарэп-афсп-левый' or pribor_node.get_meta('unit_name')[0] == 'уарэп-афсп-правый':
|
||||
var req = pribor.request_url
|
||||
req.connect('sending_request', Callable(self, 'on_sending_request').bind(pribor_node, pribor.time_req.wait_time))
|
||||
|
||||
|
||||
# Вызов при отправке запроса на селфтест АФСП
|
||||
func on_sending_request(node: Node, time_req: float) -> void:
|
||||
node.progress_max_value = time_req
|
||||
func _on_request_sent_left(_url: String, node: Node) -> void:
|
||||
node.progress_max_value = 100
|
||||
node.progress_value = 0
|
||||
node.progress_visible = true
|
||||
node.timeout_tween = time_req
|
||||
node.timeout_tween = float(ProjectSettings.get_setting('application/config/%s' % 'Период опроса состояния АФСП, секунды'))
|
||||
|
||||
|
||||
func _on_response_received(_response: String, _success: bool, node: Node):
|
||||
node.progress_value = 100
|
||||
node.progress_visible = false
|
||||
|
||||
|
||||
## Прием сигналов о текущем состояниях приборах
|
||||
@@ -569,7 +573,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(100, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/online_proc = "on_line_changed"
|
||||
metadata/unit_name = ["уарэп-яу07-1н"]
|
||||
|
||||
@@ -656,9 +659,9 @@ frame_progress = 0.72355
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1188.0
|
||||
offset_top = 581.0
|
||||
offset_top = 576.0
|
||||
offset_right = 1285.0
|
||||
offset_bottom = 743.0
|
||||
offset_bottom = 738.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -668,15 +671,14 @@ ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-эмс"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_uf"]
|
||||
layout_mode = 0
|
||||
offset_left = 15.0
|
||||
offset_left = -12.0
|
||||
offset_top = -44.0
|
||||
offset_right = 91.0
|
||||
offset_right = 108.0
|
||||
offset_bottom = -25.0
|
||||
text = "УФ"
|
||||
horizontal_alignment = 1
|
||||
@@ -686,10 +688,10 @@ vertical_alignment = 1
|
||||
visible = false
|
||||
self_modulate = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
layout_mode = 0
|
||||
offset_left = -14.0
|
||||
offset_left = -20.0
|
||||
offset_top = -30.0
|
||||
offset_right = 126.0
|
||||
offset_bottom = 200.0
|
||||
offset_right = 116.0
|
||||
offset_bottom = 179.0
|
||||
texture = ExtResource("4_rasbe")
|
||||
region_rect = Rect2(-3, -3, 89, 89)
|
||||
patch_margin_left = 16
|
||||
@@ -712,10 +714,10 @@ texture = ExtResource("11_gjf0t")
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_uf"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 9.0
|
||||
offset_top = 191.0
|
||||
offset_right = 102.0
|
||||
offset_bottom = 201.0
|
||||
offset_left = 2.0
|
||||
offset_top = 176.0
|
||||
offset_right = 95.0
|
||||
offset_bottom = 186.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
@@ -746,7 +748,7 @@ script = ExtResource("21_l5wui")
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_uf/panel_pribor"]
|
||||
light_mask = 3
|
||||
position = Vector2(11.4285, 12.8571)
|
||||
position = Vector2(4.28552, 12.8571)
|
||||
scale = Vector2(0.6, 0.596)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
@@ -755,9 +757,9 @@ frame_progress = 0.72355
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1058.0
|
||||
offset_top = 588.0
|
||||
offset_top = 580.0
|
||||
offset_right = 1164.0
|
||||
offset_bottom = 744.0
|
||||
offset_bottom = 736.0
|
||||
pivot_offset = Vector2(-10, -65)
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
@@ -767,16 +769,15 @@ texture_normal = ExtResource("3_hhadv")
|
||||
stretch_mode = 0
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = [&"уарэп-бпо-1", &"уарэп-бпо-2"]
|
||||
metadata/online_proc = "online_change_arr"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_rtr"]
|
||||
layout_mode = 0
|
||||
offset_left = 11.0
|
||||
offset_top = -49.0
|
||||
offset_right = 94.0
|
||||
offset_bottom = -30.0
|
||||
offset_left = -10.0
|
||||
offset_top = -48.0
|
||||
offset_right = 110.0
|
||||
offset_bottom = -29.0
|
||||
text = "РТР"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -785,10 +786,10 @@ vertical_alignment = 1
|
||||
visible = false
|
||||
self_modulate = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
layout_mode = 0
|
||||
offset_left = -13.0
|
||||
offset_left = -18.0
|
||||
offset_top = -34.0
|
||||
offset_right = 117.0
|
||||
offset_bottom = 171.0
|
||||
offset_right = 118.0
|
||||
offset_bottom = 175.0
|
||||
texture = ExtResource("4_rasbe")
|
||||
region_rect = Rect2(-3, -3, 89, 89)
|
||||
patch_margin_left = 16
|
||||
@@ -827,6 +828,29 @@ scale = Vector2(0.6, 0.596)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_rtr"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 6.0
|
||||
offset_top = 172.0
|
||||
offset_right = 102.0
|
||||
offset_bottom = 182.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_afsp_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -845,7 +869,6 @@ ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = [&"уарэп-афсп-левый"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -909,7 +932,8 @@ frame_progress = 0.72355
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_afsp_1"]
|
||||
visible = false
|
||||
offset_left = 15.0
|
||||
layout_mode = 0
|
||||
offset_left = -25.0
|
||||
offset_top = 735.0
|
||||
offset_right = 815.0
|
||||
offset_bottom = 775.0
|
||||
@@ -949,7 +973,6 @@ stretch_mode = 0
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = [&"уарэп-афсп-правый"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1013,7 +1036,8 @@ frame_progress = 0.72355
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_afsp_2"]
|
||||
visible = false
|
||||
offset_left = 20.0
|
||||
layout_mode = 0
|
||||
offset_left = -15.0
|
||||
offset_top = 735.0
|
||||
offset_right = 825.0
|
||||
offset_bottom = 775.0
|
||||
@@ -1037,10 +1061,10 @@ tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
[node name="pribor_uyep" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1313.0
|
||||
offset_top = 584.0
|
||||
offset_right = 1394.0
|
||||
offset_bottom = 744.0
|
||||
offset_left = 1317.0
|
||||
offset_top = 575.0
|
||||
offset_right = 1398.0
|
||||
offset_bottom = 735.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1050,16 +1074,15 @@ ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-щ3", "уарэп-спт25-1", "уарэп-спт25-2"]
|
||||
metadata/online_proc = "online_change_arr"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_uyep"]
|
||||
layout_mode = 0
|
||||
offset_left = 26.8566
|
||||
offset_top = -43.3276
|
||||
offset_right = 66.8566
|
||||
offset_bottom = -24.3276
|
||||
offset_left = -13.0
|
||||
offset_top = -43.0
|
||||
offset_right = 99.0
|
||||
offset_bottom = -24.0
|
||||
text = "У-ЭП"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1068,10 +1091,10 @@ vertical_alignment = 1
|
||||
visible = false
|
||||
self_modulate = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
layout_mode = 0
|
||||
offset_left = -13.0
|
||||
offset_left = -21.0
|
||||
offset_top = -29.0
|
||||
offset_right = 117.0
|
||||
offset_bottom = 199.0
|
||||
offset_right = 107.0
|
||||
offset_bottom = 180.0
|
||||
texture = ExtResource("4_rasbe")
|
||||
region_rect = Rect2(-3, -3, 89, 89)
|
||||
patch_margin_left = 16
|
||||
@@ -1105,7 +1128,7 @@ script = ExtResource("21_l5wui")
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_uyep/panel_pribor"]
|
||||
light_mask = 3
|
||||
position = Vector2(11.4285, 12.8571)
|
||||
position = Vector2(-0.00012207, 12.8571)
|
||||
scale = Vector2(0.6, 0.596)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
@@ -1126,7 +1149,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-2в"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1225,7 +1247,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-2н"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1326,7 +1347,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-2к"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1425,7 +1445,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-3в"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1524,7 +1543,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-3н"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1623,7 +1641,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 1, 0, 1), Color(1, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-3к"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1722,7 +1739,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(100, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-1в"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1820,7 +1836,6 @@ stretch_mode = 4
|
||||
flip_h = true
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(100, 0, 0, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-1к"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -1918,7 +1933,6 @@ texture_normal = ExtResource("6_i1yfn")
|
||||
stretch_mode = 4
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(0.65, 0.0715, 0.0715, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-4в"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -2016,7 +2030,6 @@ texture_normal = ExtResource("6_i1yfn")
|
||||
stretch_mode = 4
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(0.65, 0.0715, 0.0715, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-4н"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
@@ -2114,7 +2127,6 @@ texture_normal = ExtResource("6_i1yfn")
|
||||
stretch_mode = 4
|
||||
script = ExtResource("3_4pt7j")
|
||||
state_colors = [Color(1, 1, 1, 1), Color(0, 0.87, 0, 1), Color(0.65, 0.0715, 0.0715, 1)]
|
||||
timeout_tween = null
|
||||
metadata/unit_name = ["уарэп-яу07-4к"]
|
||||
metadata/online_proc = "on_line_changed"
|
||||
|
||||
|
||||
@@ -1,14 +1,42 @@
|
||||
class_name configure extends Panel
|
||||
|
||||
const TableHeader = preload('res://table/header.tscn')
|
||||
const TableToggle = preload('res://table/settings-toggle.tscn')
|
||||
const TableEdit = preload('res://table/ячейка-2.tscn')
|
||||
const TableColorPick = preload('res://table/ячейка-цвет.tscn')
|
||||
@export var TableHeader: PackedScene
|
||||
@export var TableToggle: PackedScene
|
||||
@export var TableEdit: PackedScene
|
||||
@export var TableColorPick: PackedScene
|
||||
|
||||
const ALIGNMENT = [HORIZONTAL_ALIGNMENT_CENTER, HORIZONTAL_ALIGNMENT_CENTER]
|
||||
const HEADER_ROW = [TableHeader, TableHeader]
|
||||
const HEADER_ROW_TEXT = ['Параметр', 'Значение']
|
||||
const SETTING_TABLE = [
|
||||
const HEADER_ROW_TEXT: = ['Параметр', 'Значение']
|
||||
|
||||
var HEADER_ROW: Array
|
||||
|
||||
## TODO: Придумать как избавиться от индексов
|
||||
## Индексы строк таблицы.
|
||||
const EXTERNAL_CU = 16 ## Внешнее целеуказание
|
||||
const TRASSA = 17 ## Строка - Трасса
|
||||
const SUPPRESS = 18 ## Строка - Подавление
|
||||
const KEYBOARD = 19 ## Строка - Виртуальная клавиатура
|
||||
const HIDE_EMS2 = 20 ## Строка - Скрыть вкладку ЭМС 2
|
||||
const DEBAG_CONTROL = 21 ## Строка - Отладка контроля
|
||||
const COMMIT = 22 ## Строка - Версия УАРЭП
|
||||
const GOS_BTN = 52 ## Разрешить работу по своим целям
|
||||
const COLOR_BTN_ACT = 54 ## Цвет кнопки "Подавление"
|
||||
const COLOR_WHITE = 55 ## Цвет фона схемы
|
||||
const COLOR_BLACK = 56 ## Цвет схемы
|
||||
const COLOR_THEME = 57 ## Цвет темы
|
||||
|
||||
var SETTING_TABLE: Array
|
||||
|
||||
var name_to_line_index: = {} ## Для преобразования названия параметра в номер строки
|
||||
var table_color_instance: Node ## Нода цвета кнопки подавления
|
||||
|
||||
func on_checkbutton_pressed(i_row: int):
|
||||
on_row_pressed(i_row)
|
||||
|
||||
|
||||
func _init_scene_arrays():
|
||||
HEADER_ROW = [TableHeader, TableHeader]
|
||||
SETTING_TABLE = [
|
||||
['Ограниченный режим', TableEdit, TableToggle, 'Ограничть возможности по постановке помех'], # 0
|
||||
['Кнопка «ПД-М4»', TableEdit, TableToggle, 'Разрешить отображение кнопки'], # 1
|
||||
['Кнопка «ПД-М2»', TableEdit, TableToggle, 'Разрешить отображение кнопки'], # 2
|
||||
@@ -66,67 +94,53 @@ const SETTING_TABLE = [
|
||||
['Цвет кнопки \"Подавление\"', TableEdit, TableColorPick, 'Цвет кнопки. Введено по требованию ПЗ' ], # 54
|
||||
['Цвет фона схемы', TableEdit, TableColorPick, 'Схема прибора Э2. Изменение цвет фона'], # 55
|
||||
['Цвет схемы', TableEdit, TableColorPick, 'Схема прибора Э2. Изменение цвет схемы '], # 56
|
||||
['Коэффициент ширины полосы излучения', TableEdit, TableEdit, 'Изменение ширины полосы излучения помехи в зависимости от цели'], # 57
|
||||
['Время повторной отправки помехи', TableEdit, TableEdit, 'Изменение времени повторной отправки помехи'] ] # 58
|
||||
|
||||
|
||||
## TODO: Придумать как избавиться от индексов
|
||||
## Индексы строк таблицы.
|
||||
const EXTERNAL_CU = 16 ## Внешнее целеуказание
|
||||
const TRASSA = 17 ## Строка - Трасса
|
||||
const SUPPRESS = 18 ## Строка - Подавление
|
||||
const KEYBOARD = 19 ## Строка - Виртуальная клавиатура
|
||||
const HIDE_EMS2 = 20 ## Строка - Скрыть вкладку ЭМС 2
|
||||
const DEBAG_CONTROL = 21 ## Строка - Отладка контроля
|
||||
const COMMIT = 22 ## Строка - Версия УАРЭП
|
||||
const GOS_BTN = 52 ## Разрешить работу по своим целям
|
||||
const COLOR_BTN_ACT = 54 ## Цвет кнопки "Подавление"
|
||||
const COLOR_WHITE = 55 ## Цвет фона схемы
|
||||
const COLOR_BLACK = 56 ## Цвет схемы
|
||||
|
||||
|
||||
var name_to_line_index: = {} ## Для преобразования названия параметра в номер строки
|
||||
var table_color_instance: Node ## Нода цвета кнопки подавления
|
||||
|
||||
func on_checkbutton_pressed(i_row: int): on_row_pressed(i_row)
|
||||
['Цвет темы программы', TableEdit, TableToggle, 'ВЫКЛ - темная тема, ВКЛ - светлая тема'], # 57
|
||||
['Коэффициент ширины полосы излучения', TableEdit, TableEdit, 'Изменение ширины полосы излучения помехи в зависимости от цели'], # 58
|
||||
['Время повторной отправки помехи', TableEdit, TableEdit, 'Изменение времени повторной отправки помехи'] ] # 59
|
||||
|
||||
|
||||
## Вызывается, когда узел впервые попадает в дерево сцены.
|
||||
func _ready() -> void:
|
||||
setting_tab()
|
||||
if not OS.get_cmdline_args().has('++ограниченный'):
|
||||
return
|
||||
$Label2.text = 'Текущий режим доступа: ограниченный'
|
||||
for node in $GridContainer.get_children().filter(func(b): return b is Button):
|
||||
node.disabled = true
|
||||
if OS.get_cmdline_args().has('++ограниченный'):
|
||||
$Label2.text = 'Текущий режим доступа: ограниченный'
|
||||
for node in $GridContainer.get_children().filter(func(b): return b is Button):
|
||||
node.disabled = true
|
||||
ProjectSettings.emit_signal('settings_changed')
|
||||
|
||||
|
||||
func on_external_cu_btn_pressed(btn) -> void:
|
||||
ProjectSettings.set_setting('application/config/Внешнее управление', btn.button_pressed)
|
||||
ProjectSettings.set_setting('application/config/%s' % 'Внешнее управление', btn.button_pressed)
|
||||
if btn.button_pressed:
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_trassa_btn_pressed(btn) -> void:
|
||||
ProjectSettings.set_setting('application/config/Внешнее указание Трасса', btn.button_pressed)
|
||||
ProjectSettings.set_setting('application/config/%s' % 'Внешнее указание Трасса', btn.button_pressed)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_vk_pressed(btn) -> void:
|
||||
signaller.emit_signal('kb_pressed', btn.button_pressed)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_gos_pressed(btn) -> void:
|
||||
ProjectSettings.set_setting('application/config/Включить работу по своим целям', btn.button_pressed)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_ems2_pressed(btn) -> void:
|
||||
var state = btn.button_pressed
|
||||
signaller.emit_signal('ems2_hide_pressed', state)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_debag_control_pressed(btn) -> void:
|
||||
var state = btn.button_pressed
|
||||
signaller.emit_signal("debag_control_pressed", state)
|
||||
signaller.emit_signal('debag_control_pressed', state)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_row_pressed(i_row: int):
|
||||
@@ -171,6 +185,7 @@ func parse_cmd_line_args(settings_data: Dictionary):
|
||||
|
||||
|
||||
func setting_tab():
|
||||
_init_scene_arrays()
|
||||
$heard_table.set_header(HEADER_ROW)
|
||||
$heard_table.set_header_text(HEADER_ROW_TEXT)
|
||||
$heard_table.set_columns_min_size([600, 950])
|
||||
@@ -199,6 +214,7 @@ func setting_tab():
|
||||
child.connect('pressed', Callable(self, 'on_checkbutton_pressed').bind(i))
|
||||
var val = ProjectSettings.get_setting('application/config/%s' % param_name, true)
|
||||
child.set_pressed(val)
|
||||
child.pressed.connect(_autosave_now)
|
||||
else:
|
||||
if settings_data.has(param_name):
|
||||
var val = settings_data[param_name]
|
||||
@@ -207,6 +223,7 @@ func setting_tab():
|
||||
if edit_node:
|
||||
if edit_node is LineEdit:
|
||||
$scroll_set/table.set_node_control(1, i, true)
|
||||
edit_node.focus_exited.connect(_autosave_now)
|
||||
$scroll_set/table.set_node_editable(1, COMMIT, false)
|
||||
$scroll_set/table.set_columns_min_size([600, 950])
|
||||
$scroll_set/table.set_columns_alignments(ALIGNMENT)
|
||||
@@ -268,6 +285,15 @@ func button_settings():
|
||||
var arr_col_b = JSON.parse_string(json_col_b)
|
||||
color_black.color = Color(arr_col_b[0], arr_col_b[1], arr_col_b[2], arr_col_b[3]) if arr_col_b else Color.WHITE_SMOKE
|
||||
color_black.text = JSON.stringify(arr_col_b)
|
||||
var theme_node = $scroll_set/table.get_node2(1, COLOR_THEME).get_children()[0]
|
||||
theme_node.connect('pressed', on_theme_toggle_pressed.bind(theme_node))
|
||||
on_theme_toggle_pressed(theme_node)
|
||||
|
||||
|
||||
func on_theme_toggle_pressed(btn: CheckButton) -> void:
|
||||
var is_light = btn.button_pressed
|
||||
ProjectSettings.set_setting('application/config/Цвет темы программы', is_light)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func _update_theme_colors():
|
||||
@@ -281,21 +307,24 @@ func on_color_closed_w(color_white: ColorPickerButton):
|
||||
var col_w = [color_white.color.r, color_white.color.g, color_white.color.b, color_white.color.a]
|
||||
color_white.text = JSON.stringify(col_w)
|
||||
ProjectSettings.set_setting('application/config/%s' % 'Цвет фона схемы', color_white.text)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_color_closed_b(color_black: ColorPickerButton):
|
||||
var col_b = [color_black.color.r, color_black.color.g, color_black.color.b, color_black.color.a]
|
||||
color_black.text = JSON.stringify(col_b)
|
||||
ProjectSettings.set_setting('application/config/%s' % 'Цвет схемы', color_black.text)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func on_color_closed(color_btn_act: ColorPickerButton):
|
||||
var col = [color_btn_act.color.r, color_btn_act.color.g, color_btn_act.color.b, color_btn_act.color.a]
|
||||
color_btn_act.text = JSON.stringify(col)
|
||||
ProjectSettings.set_setting('application/config/%s' % 'Цвет кнопки \"Подавление\"', color_btn_act.text)
|
||||
_autosave_now()
|
||||
|
||||
|
||||
func _on_btn_save_settings_pressed():
|
||||
func _autosave_now() -> void:
|
||||
var json_data = {}
|
||||
for i in SETTING_TABLE.size():
|
||||
var parameter = SETTING_TABLE[i][0]
|
||||
|
||||
@@ -2,23 +2,17 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://dabpum5iqxc7y" path="res://scenes/настройки/настройки.gd" id="1_60bya"]
|
||||
[ext_resource type="Script" uid="uid://c5pq0hbrij34d" path="res://table/table.gd" id="2_6sx73"]
|
||||
[ext_resource type="Texture2D" uid="uid://csnts8f155sf7" path="res://data/save1.png" id="3_dbpks"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_pyq6h"]
|
||||
texture = ExtResource("3_dbpks")
|
||||
modulate_color = Color(0.8, 0.533333, 0.27451, 1)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_l5g3r"]
|
||||
texture = ExtResource("3_dbpks")
|
||||
expand_margin_left = 20.0
|
||||
expand_margin_top = 20.0
|
||||
modulate_color = Color(0.8, 0.533333, 0.27451, 1)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tbxk6"]
|
||||
texture = ExtResource("3_dbpks")
|
||||
[ext_resource type="PackedScene" uid="uid://ch14g46swx74h" path="res://table/header.tscn" id="2_l8r7w"]
|
||||
[ext_resource type="PackedScene" uid="uid://5rw652cmnybi" path="res://table/settings-toggle.tscn" id="3_6e5sv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dspa16ufrpanp" path="res://table/ячейка-2.tscn" id="4_i0f0r"]
|
||||
[ext_resource type="PackedScene" uid="uid://cug5xjbfdm7x7" path="res://table/ячейка-цвет.tscn" id="5_h2mq4"]
|
||||
|
||||
[node name="Настройки" type="Panel"]
|
||||
script = ExtResource("1_60bya")
|
||||
TableHeader = ExtResource("2_l8r7w")
|
||||
TableToggle = ExtResource("3_6e5sv")
|
||||
TableEdit = ExtResource("4_i0f0r")
|
||||
TableColorPick = ExtResource("5_h2mq4")
|
||||
|
||||
[node name="heard_table" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -33,26 +27,8 @@ layout_mode = 0
|
||||
offset_left = 16.0
|
||||
offset_top = 44.0
|
||||
offset_right = 1584.0
|
||||
offset_bottom = 988.0
|
||||
offset_bottom = 1144.0
|
||||
|
||||
[node name="table" type="GridContainer" parent="scroll_set"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_6sx73")
|
||||
|
||||
[node name="btn_save" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1523.0
|
||||
offset_top = 1057.0
|
||||
offset_right = 2035.0
|
||||
offset_bottom = 1569.0
|
||||
scale = Vector2(0.1, 0.1)
|
||||
tooltip_text = "Сохранить настройки"
|
||||
focus_mode = 0
|
||||
theme_override_styles/focus = SubResource("StyleBoxTexture_pyq6h")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxTexture_pyq6h")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxTexture_pyq6h")
|
||||
theme_override_styles/hover = SubResource("StyleBoxTexture_pyq6h")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxTexture_l5g3r")
|
||||
theme_override_styles/normal = SubResource("StyleBoxTexture_tbxk6")
|
||||
|
||||
[connection signal="pressed" from="btn_save" to="." method="_on_btn_save_settings_pressed"]
|
||||
|
||||
@@ -135,9 +135,13 @@ func on_user_panning(): $btn_center.button_pressed = false
|
||||
|
||||
|
||||
func on_settings_changed():
|
||||
var json_col = ProjectSettings.get_setting('application/config/%s' % 'Цвет кнопки \"Подавление\"', '[1.0, 1.0, 1.0, 1.0]')
|
||||
var arr_col = JSON.parse_string(json_col)
|
||||
col_btn_act = Color(arr_col[0], arr_col[1], arr_col[2], arr_col[3]) if arr_col else Color.WHITE
|
||||
|
||||
gos_flag = ProjectSettings.get_setting('application/config/Включить работу по своим целям', true)
|
||||
color_emit = ProjectSettings.get_setting('application/interfer/emit_color', Color(0.58, 0.47, 0.51, 1.0))
|
||||
color_ecm = ProjectSettings.get_setting('application/interfer/interfer_color', Color(0.58, 0.47, 0.51, 1.0))
|
||||
color_emit = Color(arr_col[0], arr_col[1], arr_col[2], 1.0)
|
||||
color_ecm = Color(arr_col[0], arr_col[1], arr_col[2], 1.0)
|
||||
color_select = ProjectSettings.get_setting('application/interfer/select_color', Color(1.0, 1.0, 1.0, 1.0))
|
||||
color_closed = ProjectSettings.get_setting('application/interfer/closed_sectors', Color(0.0, 0.0, 0.0, 1.0))
|
||||
min_zoom = ProjectSettings.get_setting('application/config/map_minimum_zoom', 5)
|
||||
@@ -151,10 +155,6 @@ func on_settings_changed():
|
||||
color_closed *= Color(1.0, 1.0, 1.0, 0.0)
|
||||
color_closed_emit *= Color(1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
var json_col = ProjectSettings.get_setting('application/config/%s' % 'Цвет кнопки \"Подавление\"', '[1.0, 1.0, 1.0, 1.0]')
|
||||
var arr_col = JSON.parse_string(json_col)
|
||||
col_btn_act = Color(arr_col[0], arr_col[1], arr_col[2], arr_col[3]) if arr_col else Color.WHITE
|
||||
|
||||
|
||||
## Обработчик сигнала изменения списка целей.
|
||||
func on_threats_resized(ths: Dictionary):
|
||||
@@ -329,7 +329,7 @@ func on_threat_update(th: threats.Threat):
|
||||
func on_interfer_new(ecm):
|
||||
if not interfer.thrs.has(ecm.ispp): return
|
||||
var th_id = interfer.thrs[ecm.ispp]
|
||||
var bip = get_node('%d' % th_id)
|
||||
var bip = get_node_or_null('%d' % th_id)
|
||||
if bip != null:
|
||||
if ecm.krp!= interfer.INTERFER_OFF:
|
||||
bip.set_track_visible(true)
|
||||
@@ -340,7 +340,6 @@ func on_interfer_new(ecm):
|
||||
bip.set_ecm_visible(false)
|
||||
bip.set_track_visible(false)
|
||||
else:
|
||||
interfer.thrs.erase(ecm.ispp)
|
||||
update_fs_colors()
|
||||
|
||||
|
||||
@@ -567,7 +566,7 @@ func set_fs_color(ecms):
|
||||
continue
|
||||
if ecm.krp != interfer.INTERFER_OFF:
|
||||
fs_active[prd.fs_caps_id[ecm.nmfs]] = null
|
||||
if ecm.svk == SVK_EMIT:
|
||||
if ecm.active:
|
||||
fs_emit[prd.fs_caps_id[ecm.nmfs]] = null
|
||||
update_fs_colors()
|
||||
|
||||
@@ -634,12 +633,12 @@ func set_btns_disabled(value: bool, btn):
|
||||
|
||||
func on_interfer_prinuditelno(prenuditelno_sectors):
|
||||
for key in prenuditelno_sectors:
|
||||
var sectors = []
|
||||
var sectors: = []
|
||||
for sector in prenuditelno_sectors[key]:
|
||||
sectors.append(prd.get_fs_param(sector))
|
||||
signaller.emit_signal('interfer_init', key, sectors, interfer.POW_DEFAULT)
|
||||
update_fs_colors()
|
||||
var btns: Array = get_tree().get_nodes_in_group('группа-режим-помехи')
|
||||
var btns: = get_tree().get_nodes_in_group('группа-режим-помехи')
|
||||
for btn in btns:
|
||||
btn.set_pressed(false)
|
||||
set_btns_disabled(true, btn)
|
||||
@@ -663,12 +662,12 @@ func on_btn_activate_toggled(toggled_on: bool) -> void:
|
||||
$btn_activate.self_modulate = Color.WHITE
|
||||
|
||||
|
||||
func on_update_coordinates_label(coordinates_label) -> void:
|
||||
$coordinates_map.text = str(coordinates_label)
|
||||
func on_update_coordinates_label(coordinates_label: String) -> void:
|
||||
$coordinates_map.text = coordinates_label
|
||||
|
||||
|
||||
func on_update_scale_label(scale_label) -> void:
|
||||
$scale_map.text = str(scale_label)
|
||||
func on_update_scale_label(scale_label: String) -> void:
|
||||
$scale_map.text = scale_label
|
||||
|
||||
|
||||
func on_btn_close():
|
||||
@@ -698,10 +697,11 @@ func on_th_aoa_update(ths):
|
||||
|
||||
|
||||
func count_threats(ths):
|
||||
$count_all_pad/count_all.text = '%02d' % ths.size()
|
||||
var c0: int = ths.size() if ths.size() < 100 else 99
|
||||
$count_all_pad/count_all.text = '%02d' % c0
|
||||
var c: int = 0
|
||||
if gos_flag:
|
||||
c = ths.values().filter(func(th: threats.Threat): return th.proto != '').size()
|
||||
else:
|
||||
c = ths.values().filter(func(th: threats.Threat): return ((th.proto != '') and th.proto not in interfer.gos_protocols)).size()
|
||||
c = ths.values().filter(func(th: threats.Threat): return not th.gos).size()
|
||||
$count_danger_pad/count_danger.text = '%02d' % c
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dem3fcec25awh" path="res://scenes/grid-side-panel/grid-side-panel.tscn" id="3_s2j0e"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnkbk53mi7viu" path="res://scenes/grid-buttons-ecm/grid-buttons-ecm.tscn" id="5_2jnbs"]
|
||||
[ext_resource type="PackedScene" uid="uid://dymo732qc2doa" path="res://scenes/count-all/count-all-pad.tscn" id="6_e3re7"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count-danger/count_danger_pad.tscn" id="7_2arls"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwti82byphl68" path="res://scenes/count-danger/count-danger-pad.tscn" id="7_2arls"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat/button-flat.tscn" id="8_k0iv2"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1785x8wf1hdg" path="res://data/power-0.png" id="10_cnr1s"]
|
||||
[ext_resource type="PackedScene" uid="uid://ceknxxfu1loo5" path="res://scenes/tilemap/tilemap.tscn" id="10_gtwyg"]
|
||||
@@ -96,7 +96,6 @@ text = "Обзорная карта"
|
||||
self_modulate = Color(1, 1, 1, 0.415686)
|
||||
position = Vector2(360, 360)
|
||||
min_zoom_level = 3
|
||||
max_zoom_level_server = 11
|
||||
ship_radius_km = 3.0
|
||||
az = 3.0
|
||||
|
||||
|
||||
557
scenes/эмс-тг/эмс-тг.gd
Normal file
@@ -0,0 +1,557 @@
|
||||
@tool
|
||||
extends Panel
|
||||
|
||||
## Выполнение функций информационного ЭМС (ЭМС-ТГ)
|
||||
|
||||
#region Определяемое при использовании
|
||||
## Индекс -> Имя устройства. Нужен для предсказуемого
|
||||
## порядка отображения: верх->вниз или лево->право.
|
||||
## Имя устройства должно быть взято из settings.gd
|
||||
@export var index_to_unit_names: Array[StringName]
|
||||
## Минимальная частота, МГЦ
|
||||
@export var freq_min: float
|
||||
## Максимальная частота, МГЦ
|
||||
@export var freq_max: float
|
||||
## Время достоверности кластера по умолчанию (если не указано в докладе)
|
||||
@export var default_ttl: float
|
||||
## Цвет диапазона если включен (разрешён)
|
||||
@export_color_no_alpha var color_enabled: Color
|
||||
## Цвет диапазона если выключен (запрещён)
|
||||
@export_color_no_alpha var color_disabled: Color
|
||||
## Прозрачность диапазон на шкале (диапазоны могут накладываться, что бы было видно наложения)
|
||||
@export_range(0, 1.0) var color_alpha: float
|
||||
## Цвет нечётных строк шкалы
|
||||
@export_color_no_alpha var color_odd: Color
|
||||
## Цвет чётных строк шкалы
|
||||
@export_color_no_alpha var color_even: Color
|
||||
## Индекс колонки в таблице для управления работой приёмников
|
||||
@export var column_cmd_rx: int
|
||||
## Индекс колонки в таблице для управления работой передатчиков
|
||||
@export var column_cmd_tx: int
|
||||
## Максимальное количество кластеров на одно устройство
|
||||
@export var max_clasters_per_unit: int
|
||||
## Сообщение пользователю
|
||||
@export var msg_select_unit: String
|
||||
## Сообщение пользователю
|
||||
@export var msg_waiting_data: String
|
||||
#endregion
|
||||
|
||||
#region Загружаемые ресурсы
|
||||
@export_file('*.tscn') var table_headers: Array[String]
|
||||
@export_file('*.tscn') var table_cells: Array[String]
|
||||
@export_file('*.png') var image_file_rx: String
|
||||
@export_file('*.png') var image_file_tx: String
|
||||
@export var table_rows_hight: int
|
||||
@export var table_column_widths: Array[int]
|
||||
@export var table_header_widths: Array[int]
|
||||
@export var table_header_text: Array[String]
|
||||
#endregion
|
||||
|
||||
#region Заполняется автоматически при запуске
|
||||
## Имя устройства -> Индекс устройства
|
||||
var name_to_index: Dictionary[StringName, int]
|
||||
## Имя устройства -> Шкала
|
||||
var name_to_scale: Dictionary[StringName, GridContainer]
|
||||
var table_cell_row: Array
|
||||
## Образец параметров кластера
|
||||
var ref_cls: = {'cname': '<имя>', 'ttl': 1.0, 'daa': 360.0, 'dap': 0.0,
|
||||
'cfb': (freq_min + freq_max) / 2.0,
|
||||
'wfb': freq_max - freq_min}
|
||||
#endregion
|
||||
|
||||
#region Заполняется во время работы
|
||||
var yems_info: Dictionary[StringName, Dictionary] ## Доклады
|
||||
var yems_cmd: Dictionary[StringName, Dictionary] ## Команды
|
||||
## Порядок следования кластеров в таблице.
|
||||
## {имя_устройства: {имя_кластера: индекс_в_таблице}}
|
||||
var cnames_table: Dictionary[StringName, Dictionary]
|
||||
## Текущее выбранное оператором устройство на шкале
|
||||
var selected_unit: Dictionary[StringName, bool]
|
||||
## Состояния кластеров в соответствии с докладами и командами
|
||||
#endregion
|
||||
|
||||
|
||||
## Состояние кластера
|
||||
enum ClasterStatus {
|
||||
DELETED, ## Удалён (время ожидания обновления истекло)
|
||||
RUNNING ## Работает (информация обновляется)
|
||||
}
|
||||
|
||||
|
||||
## Режим управления кластером
|
||||
enum ClasterMode {
|
||||
MANUAL, ## Ручной, управляется операторром
|
||||
AUTO, ## Автоматический, управляется программой
|
||||
IGNORE ## Игнорируемый, не управляется
|
||||
}
|
||||
|
||||
|
||||
## Состояние кластера. Значения должны соответствовать
|
||||
## состояниям [b]six-state-button[/b]
|
||||
enum ClasterResult {
|
||||
WAITING = 0, ## Ожидание даннных
|
||||
DONE = 1, ## Выполнено
|
||||
MISSMATCH = 2 ## Несоответствие
|
||||
}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# Инициализировать переменные
|
||||
color_enabled.a = color_alpha
|
||||
color_disabled.a = color_alpha
|
||||
for i in index_to_unit_names.size():
|
||||
var nm: = index_to_unit_names[i]
|
||||
name_to_index[nm] = i
|
||||
yems_info[nm] = {'mcls': []}
|
||||
yems_cmd[nm] = {}
|
||||
cnames_table[nm] = {}
|
||||
selected_unit[nm] = false
|
||||
var btns_scales = get_tree().get_nodes_in_group('кнопки-шкалы')
|
||||
for node in btns_scales:
|
||||
var nm: = node.get_meta('unit_name') as StringName
|
||||
node.connect('toggled', _on_scale_selected.bind(nm))
|
||||
var claster_scales = get_tree().get_nodes_in_group('шкалы-кластеров')
|
||||
for node in claster_scales:
|
||||
var nm: = node.get_meta('unit_name') as StringName
|
||||
name_to_scale[nm] = node
|
||||
|
||||
# Расскрасить чётные-нечётные
|
||||
for node in get_tree().get_nodes_in_group('нечётные'):
|
||||
node.get_node('panel_rx').back_color = color_odd
|
||||
node.get_node('panel_tx').back_color = color_odd
|
||||
for node in get_tree().get_nodes_in_group('чётные'):
|
||||
node.get_node('panel_rx').back_color = color_even
|
||||
node.get_node('panel_tx').back_color = color_even
|
||||
|
||||
# Подключить обработчик для приёма данных
|
||||
for nm in yems_info:
|
||||
var yems_unit = network.get_unit_instance(nm)
|
||||
yems_unit.connect('data_received', on_data_received.bind(nm))
|
||||
|
||||
# Настроить таблицу
|
||||
var header_row: = []
|
||||
for cell_scn in table_headers:
|
||||
header_row.append(load(cell_scn))
|
||||
for cell_scn in table_cells:
|
||||
table_cell_row.append(load(cell_scn))
|
||||
var ctable: = $'таблица/сетка'
|
||||
ctable.set_header(header_row)
|
||||
ctable.set_header_text(table_header_text)
|
||||
ctable.set_header_property(column_cmd_rx, 'image_file', image_file_rx)
|
||||
ctable.set_header_property(column_cmd_tx, 'image_file', image_file_tx)
|
||||
ctable.set_headers_min_size(table_header_widths)
|
||||
ctable.set_columns_min_size(table_column_widths)
|
||||
ctable.set_rows_min_hight(table_rows_hight)
|
||||
ctable.set_header_min_hight(table_rows_hight)
|
||||
ctable.pin_header2()
|
||||
|
||||
# Описатель для отображения импульсного ЭМС:
|
||||
# { идентификатор_входа: { 'node_path': путь_к_узлу, 'pname': название_устройства, 'dcls': { имя_кластера: {параметры_кластера}}}}
|
||||
# Здесь поля txe и rxe - отвечают за конфигурацию:
|
||||
# txe - вход связан с управлением передатчиком
|
||||
# rxe - вход связан с управлением приёмника
|
||||
##TODO: Должна быть возможность для изменения оператором
|
||||
var imp_yems_descr = {
|
||||
0: { 'pname': 'эмс-изделие7', # соответствие названия устройства идентификатору входа
|
||||
'dcls': {'УИЗП1': {'wfb': 300.0, 'cfb': 4000, 'ttl': -1.0, 'txe': false, 'rxe': false}} },
|
||||
1: { 'pname': 'эмс-изделие8', # соответствие названия устройства идентификатору входа
|
||||
'dcls': {'УИЗП2': {'wfb': 200.0, 'cfb': 5000, 'ttl': -1.0, 'txe': false, 'rxe': false}} } }
|
||||
signaller.connect('yems_input_changed', _on_yems_input_changed.bind(imp_yems_descr))
|
||||
for id in imp_yems_descr:
|
||||
var descr = imp_yems_descr[id]
|
||||
var unit_info = yems_info[descr.pname]
|
||||
for cname in descr.dcls:
|
||||
var incls = descr.dcls[cname]
|
||||
var cls = {'cname': cname, 'status': ClasterStatus.RUNNING}
|
||||
cls.merge(incls)
|
||||
unit_info.mcls.append(cls)
|
||||
call_deferred('_on_defer_ready', imp_yems_descr)
|
||||
|
||||
|
||||
func _on_defer_ready(imp_yems_descr: Dictionary):
|
||||
for id in imp_yems_descr:
|
||||
var descr = imp_yems_descr[id]
|
||||
var unit_info = yems_info[descr.pname]
|
||||
on_data_received(unit_info, descr.pname)
|
||||
|
||||
|
||||
## Вызывается при изменении состояния входа ЭМС.[br]
|
||||
## [param id] - идентификатор входа ЭМС[br]
|
||||
## [param state] - новое состояние входа ЭМС[br]
|
||||
## [param imp_yems_sescr] - описатель входов ЭМС[br]
|
||||
func _on_yems_input_changed(id: int, state: int, imp_yems_descr):
|
||||
# Проверить, есть ли в описателе этот вход
|
||||
if not imp_yems_descr.has(id):
|
||||
return
|
||||
var descr = imp_yems_descr[id]
|
||||
# Проверить, есть ли такое устройство
|
||||
if not yems_info.has(descr.pname):
|
||||
return
|
||||
# Получить доклад устройства
|
||||
var unit_info = yems_info[descr.pname]
|
||||
# Вход один, но кластеров может быть несколько,
|
||||
# поэтому нужно пробежать по всем кластерам
|
||||
for cls in unit_info.mcls:
|
||||
var incls = descr.dcls[cls.cname]
|
||||
# Выставить в докладе разрешение работы приёмника
|
||||
# или передатчика соответственно состоянию входа
|
||||
if incls.rxe:
|
||||
cls.rxe = true if state == 1 else false
|
||||
if incls.txe:
|
||||
cls.txe = true if state == 1 else false
|
||||
# Выполнить то же, что и для приёма данных, поэтому:
|
||||
on_data_received(unit_info, descr.pname)
|
||||
|
||||
|
||||
## Вызывается при выборе оператором устройства на шкале
|
||||
## [param val] - состояние кнопки переключателя устройств
|
||||
## [param nm] - имя выбранного устройства
|
||||
func _on_scale_selected(val: bool, nm: StringName):
|
||||
selected_unit[nm] = val
|
||||
if not val:
|
||||
$'таблица/сетка'.clear_rows()
|
||||
cnames_table[nm].clear()
|
||||
$label_msg.text = msg_select_unit
|
||||
$label_msg.show()
|
||||
return
|
||||
var unit_info = yems_info[nm]
|
||||
if not unit_info.mcls: # проверить, есть ли данные
|
||||
$label_msg.text = msg_waiting_data
|
||||
$label_msg.show()
|
||||
return # данных ещё нет, ничего не далать
|
||||
else:
|
||||
$label_msg.hide()
|
||||
var ctable = $'таблица/сетка'
|
||||
var indexes: = cnames_table[nm]
|
||||
update_cvi(nm)
|
||||
var new_indexes = update_indexes(unit_info, indexes)
|
||||
update_table(ctable, new_indexes)
|
||||
map_yems_info_to_table(unit_info, ctable, indexes)
|
||||
connect_cmd_handlers(nm, ctable, new_indexes)
|
||||
|
||||
|
||||
## Обновляет результат выполнения команды оператора
|
||||
## [param nm] - имя устройства
|
||||
func update_cvi(nm: StringName):
|
||||
var unit_info = yems_info[nm]
|
||||
var unit_cmd = yems_cmd[nm]
|
||||
for cls_info in unit_info.mcls:
|
||||
var result_rxe: = ClasterResult.WAITING
|
||||
var result_txe: = ClasterResult.WAITING
|
||||
if unit_cmd.has(cls_info.cname):
|
||||
var cls_cmd = unit_cmd[cls_info.cname]
|
||||
if cls_info.status == ClasterStatus.RUNNING:
|
||||
if cls_cmd.has('rxe'):
|
||||
result_rxe = ClasterResult.DONE \
|
||||
if (cls_info.rxe == cls_cmd.rxe) \
|
||||
else ClasterResult.MISSMATCH
|
||||
else:
|
||||
result_rxe = ClasterResult.DONE
|
||||
if cls_cmd.has('txe'):
|
||||
result_txe = ClasterResult.DONE \
|
||||
if (cls_info.txe == cls_cmd.txe) \
|
||||
else ClasterResult.MISSMATCH
|
||||
else:
|
||||
result_txe = ClasterResult.DONE
|
||||
else:
|
||||
result_rxe = ClasterResult.DONE
|
||||
result_txe = ClasterResult.DONE
|
||||
cls_info['result_rxe'] = result_rxe
|
||||
cls_info['result_txe'] = result_txe
|
||||
|
||||
|
||||
## Подключает обработчики команд к таблице кластеров
|
||||
## [param nm] - имя устройства
|
||||
## [param new_indexes] - новые индексы рядов таблицы
|
||||
## [param cls_table] - таблица для отображения кластеров
|
||||
func connect_cmd_handlers(nm: StringName, ctable: GDTable, new_indexes: Array):
|
||||
for icls in new_indexes:
|
||||
var i_row = icls[0]
|
||||
# Имя устройства и имя кластера
|
||||
var cls = icls[1]
|
||||
# Подключить обработчки разрешения передатчиков
|
||||
var node = ctable.get_node2(column_cmd_tx, i_row)
|
||||
node.connect_check('toggled', _on_user_cmd.bind(nm, cls.cname, 'txe'))
|
||||
# Подключить обработчки разрешения приёмников
|
||||
node = ctable.get_node2(column_cmd_rx, i_row)
|
||||
node.connect_check('toggled', _on_user_cmd.bind(nm, cls.cname, 'rxe'))
|
||||
|
||||
|
||||
## Вызывается при переключении оператором разрешений для кластера
|
||||
func _on_user_cmd(val: bool, nm: StringName, cname: String, param_name: StringName):
|
||||
var unit_cmd = yems_cmd[nm]
|
||||
if cname in unit_cmd:
|
||||
unit_cmd[cname][param_name] = val
|
||||
else:
|
||||
unit_cmd[cname] = {param_name: val}
|
||||
|
||||
|
||||
## Обрабатывает событие [b]data_received[/b]
|
||||
## [param data] - данные принятые от устройства
|
||||
## [param nm] - имя устройства
|
||||
func on_data_received(data: Dictionary, nm: StringName):
|
||||
set_timeouts(nm, data)
|
||||
var unit_info: = yems_info[nm]
|
||||
unit_info_merge(unit_info, data)
|
||||
if not unit_info:
|
||||
# для устройства нет данных
|
||||
return
|
||||
var ctable: GDTable = $'таблица/сетка'
|
||||
var cscale: = name_to_scale[nm] as GridContainer # Шкала устройства
|
||||
var indexes: = cnames_table[nm] # Индексы строк устройства в таблице
|
||||
update_cvi(nm)
|
||||
# Если текущее устройство отображается в таблице,
|
||||
# обновить таблицу новыми данными
|
||||
if selected_unit[nm]:
|
||||
var new_indexes = update_indexes(unit_info, indexes)
|
||||
update_table(ctable, new_indexes)
|
||||
map_yems_info_to_table(unit_info, ctable, indexes)
|
||||
connect_cmd_handlers(nm, ctable, new_indexes)
|
||||
map_yems_info_to_scale(unit_info, cscale)
|
||||
var inters: = find_inters()
|
||||
reset_matrix()
|
||||
map_inters_to_matrix(inters, $'матрица')
|
||||
cmd_to_unit(nm)
|
||||
|
||||
|
||||
## Создаёт новые ряды в таблице
|
||||
func update_table(ctable: GDTable, new_indexes: Array):
|
||||
# Добавить новые ряды. Два прохода нужно потому,
|
||||
# что порядок элементов в словаре не определён.
|
||||
for icls in new_indexes:
|
||||
ctable.add_row(table_cell_row)
|
||||
# Заполнить новые ряды данными
|
||||
for icls in new_indexes:
|
||||
var i_row = icls[0]
|
||||
var cls = icls[1]
|
||||
# Установить высоту ряда (можно пропустить, если нужная высота будет выставлена по умолчанию)
|
||||
ctable.set_row_min_hight(i_row, table_rows_hight)
|
||||
# Установить новый текст
|
||||
ctable.set_node_property(column_cmd_rx, i_row, 'pressed', cls.rxe)
|
||||
ctable.set_node_property(column_cmd_tx, i_row, 'pressed', cls.txe)
|
||||
ctable.set_node_property(column_cmd_rx, i_row, 'state', cls.result_rxe)
|
||||
ctable.set_node_property(column_cmd_tx, i_row, 'state', cls.result_txe)
|
||||
|
||||
|
||||
## Обновляет индексы строк в таблице
|
||||
func update_indexes(unit_info: Dictionary, indexes: Dictionary) -> Array:
|
||||
var new_indexes: = []
|
||||
for cls in unit_info.mcls:
|
||||
# Проверить, есть ли уже такой индекс
|
||||
if indexes.has(cls.cname):
|
||||
continue
|
||||
# Записать индекс нового ряда (связать с именем кластера)
|
||||
var i_row = indexes.size()
|
||||
indexes[cls.cname] = i_row
|
||||
new_indexes.append([i_row, cls])
|
||||
return new_indexes
|
||||
|
||||
|
||||
## Объединяет список кластеров принятых от устройства со списком сохранённым
|
||||
## [param unit_info] - доклад ранее полученный
|
||||
## [param data_rx] - доклад принятый от устройства
|
||||
func unit_info_merge(unit_info: Dictionary, data_rx: Dictionary):
|
||||
var drx: = {}
|
||||
for cls_rx in data_rx.mcls:
|
||||
ref_cls.cname = 'неопр.№%d' % (drx.size() + 1)
|
||||
cls_rx.merge(ref_cls, false) # Объеденить без перезаписи
|
||||
drx[cls_rx.cname] = cls_rx
|
||||
var dinfo: = {}
|
||||
for cls in unit_info.mcls:
|
||||
dinfo[cls.cname] = cls
|
||||
dinfo.merge(drx, true)
|
||||
unit_info.merge(data_rx, true)
|
||||
unit_info.mcls = dinfo.values()
|
||||
|
||||
|
||||
## Отправляет команду в сетевой стек
|
||||
## [param nm] - имя устройства
|
||||
func cmd_to_unit(nm: StringName):
|
||||
var unit_yemstg: = network.get_unit_instance(nm)
|
||||
# Проверить, что сетевой стек отправил предидущую команду
|
||||
if unit_yemstg.cmd_state != unit.Unit.CmdState.DONE:
|
||||
return
|
||||
# Сформировать команду из докладов (данных принятых из сети от устройств)
|
||||
var unit_info_copy = yems_info[nm].duplicate(true)
|
||||
var unit_cmd = yems_cmd[nm]
|
||||
unit_info_copy.mtype = 'cmd'
|
||||
# Выбрать только работающие кластеры (время которых ещё не истекло)
|
||||
var mcls = unit_info_copy.mcls.filter(func(c): return c.status == ClasterStatus.RUNNING)
|
||||
for cls_info in mcls:
|
||||
# Если для этого кластера есть команда оператора ...
|
||||
if unit_cmd.has(cls_info.cname):
|
||||
# ... переписать значениями из команды оператора
|
||||
var cmd_cls = unit_cmd[cls_info.cname]
|
||||
cls_info.rxe = unit_cmd.get('rxe', cls_info.rxe)
|
||||
cls_info.txe = unit_cmd.get('txe', cls_info.txe)
|
||||
# Передать команду сетевому стеку
|
||||
unit_yemstg.cmd.merge(unit_info_copy, true)
|
||||
unit_yemstg.cmd_state = unit.Unit.CmdState.SEND
|
||||
|
||||
|
||||
## Запускает таймер достоверности кластера
|
||||
## [param nm] - имя устройства
|
||||
## [param unit_info] - доклады устройства
|
||||
func set_timeouts(nm: StringName, unit_info: Dictionary):
|
||||
for cls in unit_info.mcls:
|
||||
var timer_name = NodePath('%s_%s' % [nm, cls.cname])
|
||||
var timer = get_node_or_null(timer_name)
|
||||
cls['status'] = ClasterStatus.RUNNING
|
||||
if cls.ttl < 0.0:
|
||||
continue
|
||||
if not timer:
|
||||
timer = Timer.new()
|
||||
timer.name = timer_name
|
||||
timer.one_shot = true
|
||||
timer.connect('timeout', _on_timeout_ttl.bind(nm, cls.cname))
|
||||
add_child(timer)
|
||||
timer.start(cls.ttl)
|
||||
|
||||
|
||||
## Обработчик истечения времени достоверности кластера
|
||||
## [param nm] - имя устройства
|
||||
## [param cname] - имя кластера
|
||||
func _on_timeout_ttl(nm: StringName, cname: StringName):
|
||||
var timer_name = NodePath('%s_%s' % [nm, cname])
|
||||
var timer = get_node_or_null(timer_name)
|
||||
if timer:
|
||||
remove_child(timer)
|
||||
timer.queue_free()
|
||||
var unit_info = yems_info[nm]
|
||||
for cls in unit_info.mcls:
|
||||
if cname == cls.cname:
|
||||
cls.status = ClasterStatus.DELETED
|
||||
cls.result_rxe = ClasterResult.WAITING
|
||||
cls.result_txe = ClasterResult.WAITING
|
||||
var ctable: GDTable = $'таблица/сетка'
|
||||
var indexes: = cnames_table[nm]
|
||||
if indexes:
|
||||
map_yems_info_to_table(unit_info, ctable, indexes)
|
||||
var claster_scale: = name_to_scale[nm] as GridContainer
|
||||
map_yems_info_to_scale(unit_info, claster_scale)
|
||||
reset_matrix()
|
||||
|
||||
|
||||
## Сбрасывает элементы матрицы в исходное состояние
|
||||
func reset_matrix():
|
||||
var nodes = get_tree().get_nodes_in_group('матрица-к')
|
||||
for node in nodes:
|
||||
node.button_pressed = false
|
||||
|
||||
|
||||
## Отображает пересечения на матрице
|
||||
## [param inters] - пересечения
|
||||
## [param matrix] - матрица
|
||||
func map_inters_to_matrix(inters: Array, matrix: GridContainer) -> void:
|
||||
var nodes = matrix.get_children()
|
||||
for item in inters:
|
||||
var tx_unit_name = item[0]
|
||||
var rx_unit_name = item[1]
|
||||
var i_col = 1 + name_to_index[tx_unit_name] # (1 +) - одна колонка для значков приёмников
|
||||
var i_row = 1 + name_to_index[rx_unit_name] # (1 +) - один ряд для значков передатчиков
|
||||
var idx = i_col + i_row * matrix.columns # последовательный индекс в GridContainer
|
||||
var node = nodes[idx] # Искомый элемент
|
||||
node.button_pressed = true
|
||||
|
||||
|
||||
## Отображает кластеры в таблицу
|
||||
## [param unit_info] - доклад от устройства
|
||||
## [param ctable] - таблица
|
||||
## [param indexes] - индексы в таблице
|
||||
func map_yems_info_to_table(unit_info: Dictionary, ctable: GDTable, indexes: Dictionary):
|
||||
# Обойти все кластеры устройства
|
||||
for cls in unit_info.mcls:
|
||||
# Строки для заполнения ряда
|
||||
var status_str: = 'Активен' if cls.status == ClasterStatus.RUNNING else 'Удалён'
|
||||
var row_text: = [cls.cname, status_str, '%.1f' % cls.ttl, '%.1f' % cls.daa, '%.1f' % cls.dap, '%.1f-%.1f' % [cls.cfb - cls.wfb / 2.0, cls.cfb + cls.wfb / 2.0]]
|
||||
# Получить индекс строки кластера в таблице
|
||||
var i_row = indexes[cls.cname]
|
||||
# Установить новый текст
|
||||
ctable.set_row_text(i_row, row_text)
|
||||
# Результат выполнения
|
||||
ctable.set_node_property(column_cmd_rx, i_row, 'state', cls.result_rxe)
|
||||
ctable.set_node_property(column_cmd_tx, i_row, 'state', cls.result_txe)
|
||||
|
||||
|
||||
## Находит пересечения диапазонов всех устройств и кластеров
|
||||
func find_inters() -> Array:
|
||||
var result = []
|
||||
var all_clusters = []
|
||||
# Собираем все кластеры из всех устройств в один массив
|
||||
for nm in yems_info:
|
||||
# nm - имя устройства
|
||||
var unit_data = yems_info[nm]
|
||||
if not unit_data: continue
|
||||
var clasters = unit_data.mcls.filter \
|
||||
(func(c): return c.status == ClasterStatus.RUNNING)
|
||||
for cls in clasters:
|
||||
# cls - один кластер
|
||||
var cfb = float(cls.cfb)
|
||||
var wfb = float(cls.wfb) / 2.0
|
||||
# расчёт границ частотных диапазонов
|
||||
var freq_min1 = cfb - wfb
|
||||
var freq_max1 = cfb + wfb
|
||||
all_clusters.append([nm, cls.cname, freq_min1, freq_max1, cls.txe, cls.rxe])
|
||||
|
||||
for i in all_clusters.size():
|
||||
var cl1 = all_clusters[i]
|
||||
var dev1 = cl1[0]
|
||||
var name1 = cl1[1]
|
||||
var min1 = cl1[2]
|
||||
var max1 = cl1[3]
|
||||
var txe1 = cl1[4]
|
||||
var rxe1 = cl1[5]
|
||||
# Сравниваем текущий кластер со всеми последующими,
|
||||
# чтобы избежать дублей и самопересечений
|
||||
for j in all_clusters.size():
|
||||
var cl2 = all_clusters[j]
|
||||
var dev2 = cl2[0]
|
||||
var name2 = cl2[1]
|
||||
var min2 = cl2[2]
|
||||
var max2 = cl2[3]
|
||||
var txe2 = cl2[4]
|
||||
var rxe2 = cl2[5]
|
||||
# Если нет пары TR(RT) то пропускаем эту комбинацию
|
||||
if not ((txe1 and rxe2) or (rxe1 and txe2)):
|
||||
continue
|
||||
# Проверка на пересечение диапазонов, пересечение
|
||||
# есть если начало одного диапазона меньше конца другого
|
||||
if max1 > min2 and max2 > min1:
|
||||
#Вычисляем точные границы пересечения
|
||||
var inter_start = max(min1, min2)
|
||||
var inter_end = min(max1, max2)
|
||||
# Формируем результат в требуемом формате
|
||||
result.append([dev1, dev2, name1, name2, inter_start, inter_end])
|
||||
return result
|
||||
|
||||
|
||||
## Отображает кластеры на шкале
|
||||
## [param unit_info] - доклад устройства
|
||||
## [param cscale] - шкала кластера
|
||||
func map_yems_info_to_scale(unit_info: Dictionary, cscale: GridContainer):
|
||||
# Обойти все кластеры устройства
|
||||
for cls in unit_info.mcls:
|
||||
# Преобразовать диапазоны частот в диапазоны отображения
|
||||
var c: = remap(cls.cfb, freq_min, freq_max, 0.0, 1.0)
|
||||
var w: = remap(cls.wfb, freq_min * 0.5, freq_max * 0.5, 0.0, 0.5)
|
||||
# Чтобы диапазон всегда был виден, даже если он слишком узкий
|
||||
w = clampf(w, 0.005, 0.5)
|
||||
# Отсечь значения по границам
|
||||
var l: = clampf(c - w, 0.0, 1.0)
|
||||
var h: = clampf(c + w, 0.0, 1.0)
|
||||
# Получить шкалу приёмника
|
||||
var scale_rx: = cscale.get_node('panel_rx')
|
||||
# Получить шкалу передатчика
|
||||
var scale_tx: = cscale.get_node('panel_tx')
|
||||
# Диапазон работает (информация обновляется)
|
||||
if cls.status == ClasterStatus.RUNNING:
|
||||
# Отобразить диапазон приёмника, в соответствии с разрешением
|
||||
var color_rxe: = color_enabled if cls.rxe else color_disabled
|
||||
scale_rx.set_range(cls.cname, l, h, color_rxe)
|
||||
# Отобразить диапазон передатчика, в соответствии с разрешением
|
||||
var color_txe: = color_enabled if cls.txe else color_disabled
|
||||
scale_tx.set_range(cls.cname, l, h, color_txe)
|
||||
# Диапазон удалён (информация не обновляется)
|
||||
elif cls.status == ClasterStatus.DELETED:
|
||||
scale_rx.del_range(cls.cname)
|
||||
scale_tx.del_range(cls.cname)
|
||||
877
scenes/эмс-тг/эмс-тг.tscn
Normal file
@@ -0,0 +1,877 @@
|
||||
[gd_scene load_steps=23 format=3 uid="uid://musb21x2u0xs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvlqgv7aapebl" path="res://scenes/эмс-тг/эмс-тг.gd" id="1_b7tfl"]
|
||||
[ext_resource type="Texture2D" uid="uid://djv8fkddcjucs" path="res://data/матрица-чисто.png" id="2_s28jr"]
|
||||
[ext_resource type="Texture2D" uid="uid://busl8rb38lis" path="res://data/матрица-конфликт.png" id="3_its7t"]
|
||||
[ext_resource type="Script" uid="uid://c5pq0hbrij34d" path="res://table/table.gd" id="4_bhff3"]
|
||||
[ext_resource type="PackedScene" uid="uid://hr55mkcneaer" path="res://scenes/hranges/panel.tscn" id="5_6hay3"]
|
||||
[ext_resource type="Texture2D" uid="uid://docnrxrm2f022" path="res://data/Угловой квадрат3.png" id="6_a0vpj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxrggrvx6l22q" path="res://data/Квадрат марс ОР-63.png" id="7_xr3ub"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3qui21aom1ac" path="res://data/Квадрат марс 454.png" id="8_saoyo"]
|
||||
[ext_resource type="Texture2D" uid="uid://36xjgea2n22q" path="res://data/Квадрат марс ГО.png" id="9_bqil1"]
|
||||
[ext_resource type="Texture2D" uid="uid://by6a12oahbg82" path="res://data/Квадрат марс РЛС1.png" id="10_ggqgc"]
|
||||
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="10_wdb1k"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwgqofj6yae1v" path="res://data/Квадрат марс РЛС2.png" id="11_xothm"]
|
||||
[ext_resource type="Texture2D" uid="uid://dsuiytxdnole7" path="res://data/Квадрат марс с трубкой.png" id="12_4rjt3"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3v1r4r62na8" path="res://data/Квадрат салатный ОР-63.png" id="13_g0j2q"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1kuhj03yigih" path="res://data/Квадрат салатный 454.png" id="14_crrpm"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyb60nh23ys6k" path="res://data/Квадрат салатный ГО.png" id="15_0dspi"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddm55bo28sxcs" path="res://data/Квадрат салатный РЛС1.png" id="16_6042y"]
|
||||
[ext_resource type="Texture2D" uid="uid://dneqjcul4ipub" path="res://data/Квадрат салатный РЛС2.png" id="17_gvsi1"]
|
||||
[ext_resource type="Texture2D" uid="uid://cw8sd7v5f31ww" path="res://data/Квадрат салатный с трубкой.png" id="18_p3gp1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wdb1k"]
|
||||
bg_color = Color(0.314316, 0.314316, 0.314316, 1)
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_niy1n"]
|
||||
|
||||
[sub_resource type="ButtonGroup" id="ButtonGroup_vwsbs"]
|
||||
allow_unpress = true
|
||||
|
||||
[node name="эмс-тг" type="Panel"]
|
||||
offset_top = 35.0
|
||||
offset_bottom = 35.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_wdb1k")
|
||||
script = ExtResource("1_b7tfl")
|
||||
index_to_unit_names = Array[StringName]([&"эмс-ор63", &"эмс-454", &"эмс-го", &"эмс-рлс1", &"эмс-рлс2", &"эмс-ннвс", &"эмс-изделие7", &"эмс-изделие8"])
|
||||
freq_min = 300.0
|
||||
freq_max = 6000.0
|
||||
default_ttl = 2.0
|
||||
color_enabled = Color(0.898039, 0.458824, 0.239216, 0.7)
|
||||
color_disabled = Color(0.601223, 0.601223, 0.601223, 0.7)
|
||||
color_alpha = 0.7
|
||||
color_odd = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
color_even = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
column_cmd_rx = 6
|
||||
column_cmd_tx = 7
|
||||
max_clasters_per_unit = 32
|
||||
msg_select_unit = "Выберите устройство"
|
||||
msg_waiting_data = "Ожидание данных"
|
||||
table_headers = Array[String](["uid://ch14g46swx74h", "uid://ch14g46swx74h", "uid://ch14g46swx74h", "uid://ch14g46swx74h", "uid://ch14g46swx74h", "uid://ch14g46swx74h", "uid://cymcld4mjmlhj", "uid://cymcld4mjmlhj"])
|
||||
table_cells = Array[String](["uid://dwphmxstaxn4v", "uid://dwphmxstaxn4v", "uid://dwphmxstaxn4v", "uid://dwphmxstaxn4v", "uid://dwphmxstaxn4v", "uid://dwphmxstaxn4v", "uid://cixwl6xi22buo", "uid://cixwl6xi22buo"])
|
||||
image_file_rx = "uid://c6etralq2tvxg"
|
||||
image_file_tx = "uid://c73tjrn8gr00o"
|
||||
table_rows_hight = 32
|
||||
table_column_widths = Array[int]([133, 133, 133, 133, 133, 133, 133, 133])
|
||||
table_header_widths = Array[int]([136, 136, 136, 136, 136, 136, 136, 136])
|
||||
table_header_text = Array[String](["Кластер", "Состояние", "Время", "Азимут", "Угол места", "Диапазон", "Приём", "Передача"])
|
||||
|
||||
[node name="таблица" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 20.0
|
||||
offset_top = 765.0
|
||||
offset_right = 1180.0
|
||||
offset_bottom = 1145.0
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_niy1n")
|
||||
draw_focus_border = true
|
||||
vertical_scroll_mode = 2
|
||||
|
||||
[node name="сетка" type="GridContainer" parent="таблица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 8
|
||||
script = ExtResource("4_bhff3")
|
||||
|
||||
[node name="шкала" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 20.0
|
||||
offset_top = 40.0
|
||||
offset_right = 1668.0
|
||||
offset_bottom = 734.0
|
||||
scale = Vector2(0.95, 0.95)
|
||||
columns = 2
|
||||
|
||||
[node name="label0" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "ОР-63"
|
||||
icon = ExtResource("7_xr3ub")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-ор63"
|
||||
|
||||
[node name="sub0" type="GridContainer" parent="шкала" groups=["чётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-ор63"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub0" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub0" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="label1" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "454"
|
||||
icon = ExtResource("8_saoyo")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-454"
|
||||
|
||||
[node name="sub1" type="GridContainer" parent="шкала" groups=["нечётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.294118, 0.294118, 0.294118, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-454"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub1" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub1" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="label2" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "ГО"
|
||||
icon = ExtResource("9_bqil1")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-го"
|
||||
|
||||
[node name="sub2" type="GridContainer" parent="шкала" groups=["чётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-го"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub2" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub2" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="label3" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "РЛС1"
|
||||
icon = ExtResource("10_ggqgc")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-рлс1"
|
||||
|
||||
[node name="sub3" type="GridContainer" parent="шкала" groups=["нечётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.294118, 0.294118, 0.294118, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-рлс1"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub3" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub3" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="label4" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "РЛС2"
|
||||
icon = ExtResource("11_xothm")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-рлс2"
|
||||
|
||||
[node name="sub4" type="GridContainer" parent="шкала" groups=["чётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-рлс2"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub4" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub4" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="label5" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "ННВС"
|
||||
icon = ExtResource("12_4rjt3")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
metadata/unit_name = &"эмс-ннвс"
|
||||
|
||||
[node name="sub5" type="GridContainer" parent="шкала" groups=["нечётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.294118, 0.294118, 0.294118, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-ннвс"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub5" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub5" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="label6" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "Изделие 7"
|
||||
icon = ExtResource("10_wdb1k")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
metadata/unit_name = &"эмс-изделие7"
|
||||
|
||||
[node name="sub6" type="GridContainer" parent="шкала" groups=["чётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-изделие7"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub6" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub6" instance=ExtResource("5_6hay3")]
|
||||
self_modulate = Color(0.830335, 0.830335, 0.830335, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.258824, 0.266667, 0.266667, 1)
|
||||
|
||||
[node name="label7" type="Button" parent="шкала" groups=["кнопки-шкалы"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 5
|
||||
size_flags_vertical = 7
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_group = SubResource("ButtonGroup_vwsbs")
|
||||
text = "Изделие 8"
|
||||
icon = ExtResource("10_wdb1k")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
metadata/unit_name = &"эмс-изделие8"
|
||||
|
||||
[node name="sub7" type="GridContainer" parent="шкала" groups=["нечётные", "шкалы-кластеров"]]
|
||||
self_modulate = Color(0.294118, 0.294118, 0.294118, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
metadata/unit_name = &"эмс-изделие8"
|
||||
|
||||
[node name="panel_rx" parent="шкала/sub7" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c73tjrn8gr00o"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="panel_tx" parent="шкала/sub7" instance=ExtResource("5_6hay3")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
image_file = "uid://c6etralq2tvxg"
|
||||
back_color = Color(0.31863, 0.32773, 0.327729, 1)
|
||||
|
||||
[node name="матрица" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1195.0
|
||||
offset_top = 735.0
|
||||
offset_right = 1585.0
|
||||
offset_bottom = 1145.0
|
||||
columns = 7
|
||||
|
||||
[node name="прм-прд" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("6_a0vpj")
|
||||
|
||||
[node name="прд-0" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("7_xr3ub")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прд-1" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("8_saoyo")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прд-2" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("9_bqil1")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прд-3" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("10_ggqgc")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прд-4" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("11_xothm")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прд-5" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("12_4rjt3")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="прм-0" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("13_g0j2q")
|
||||
metadata/unit_name = &"эмс-ор63"
|
||||
|
||||
[node name="матрица-0-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
action_mode = 0
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-0-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-0-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-0-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-0-4" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-0-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="прм-1" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("14_crrpm")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="матрица-1-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-1-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-1-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-1-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-1-4" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-1-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="прм-2" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("15_0dspi")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="матрица-2-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-2-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-2-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-2-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-2-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-2-4" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="прм-3" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("16_6042y")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="матрица-3-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-3-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-3-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-3-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-3-4" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-3-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="прм-4" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("17_gvsi1")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="матрица-4-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-4-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-4-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-4-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-4-4" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-4-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="прм-5" type="TextureRect" parent="матрица"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("18_p3gp1")
|
||||
metadata/unit_name = &""
|
||||
|
||||
[node name="матрица-5-0" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-5-1" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-5-2" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-5-3" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-5-5" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="матрица-5-6" type="TextureButton" parent="матрица" groups=["матрица-к"]]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
toggle_mode = true
|
||||
button_mask = 0
|
||||
texture_normal = ExtResource("2_s28jr")
|
||||
texture_pressed = ExtResource("3_its7t")
|
||||
stretch_mode = 0
|
||||
|
||||
[node name="label_msg" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 25.0
|
||||
offset_top = 765.0
|
||||
offset_right = 1180.0
|
||||
offset_bottom = 1155.0
|
||||
text = "Выберите устройство"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="label1" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 20.0
|
||||
offset_top = 14.0
|
||||
offset_right = 142.0
|
||||
offset_bottom = 35.0
|
||||
text = "Устройства"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="label3" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 1195.0
|
||||
offset_top = 702.0
|
||||
offset_right = 1585.0
|
||||
offset_bottom = 725.0
|
||||
text = "Индикатор конфликтов"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="label2" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 145.0
|
||||
offset_top = 14.0
|
||||
offset_right = 1585.0
|
||||
offset_bottom = 35.0
|
||||
text = "Рабочие диапазоны"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="label4" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 20.0
|
||||
offset_top = 702.0
|
||||
offset_right = 1190.0
|
||||
offset_bottom = 725.0
|
||||
text = "Кластеры устройства"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -7,7 +7,6 @@ class InDev:
|
||||
var connector: String ## Номер разъёма в приборе.
|
||||
var delay: float ## Задержка фронта импульса.
|
||||
var offset: float ## Смещение фронта импульса.
|
||||
var state: int ## Состояние входа.
|
||||
var freq: int ## Предполагаемая частота на которой работает комплекс.
|
||||
var ports_data: Dictionary ## Словарь состояния портов устройства.
|
||||
var tbl_row_id: int ## Индекс устройства в таблице.
|
||||
@@ -16,6 +15,14 @@ class InDev:
|
||||
var board: String ## Плата в которой находится устройство.
|
||||
var isa_addr: int ## Адрес устройства на шине isa
|
||||
|
||||
|
||||
@export var state: int: ## Состояние входа.
|
||||
set(val):
|
||||
if val != state:
|
||||
state = val
|
||||
signaller.call_deferred('emit_signal', 'yems_input_changed', id, val)
|
||||
|
||||
|
||||
func _init(dev_id : int, params : Array, row_id : int, base_addr: int):
|
||||
id = dev_id
|
||||
dev_name = String(params[0])
|
||||
@@ -74,7 +81,7 @@ class OutDev extends InDev:
|
||||
if btns_state.has(i_dev):
|
||||
btns_state[i_dev] = val
|
||||
var data = 0
|
||||
for i in range(yemsconsts.NUM_INPUT):
|
||||
for i in yemsconsts.NUM_INPUT:
|
||||
data = data | (int(btns_state[i+1]) << i)
|
||||
ports_data[isa_addr + 4] = data & 0xffff
|
||||
ports_data[isa_addr + 6] = (data >> 16) & 0xffff
|
||||
|
||||
@@ -3,21 +3,33 @@
|
||||
extends PanelContainer
|
||||
|
||||
|
||||
@export var texture_state0: Texture2D = preload('res://data/кнопка-эмс-1.png'):
|
||||
set(val): $state.set_texture(val)
|
||||
@export var texture_state0: Texture2D:
|
||||
set(val):
|
||||
texture_state0 = val
|
||||
if is_inside_tree():
|
||||
$state.set_texture(val)
|
||||
|
||||
|
||||
@export var texture_state1: Texture2D = preload('res://data/кнопка-эмс-0.png'):
|
||||
set(val): $state.set_texture(val)
|
||||
@export var texture_state1: Texture2D:
|
||||
set(val):
|
||||
texture_state1 = val
|
||||
if is_inside_tree():
|
||||
$state.set_texture(val)
|
||||
|
||||
|
||||
@export var text: String = '':
|
||||
set(val): $button.set_text(val)
|
||||
set(val):
|
||||
text = val
|
||||
if is_inside_tree():
|
||||
$button.set_text(val)
|
||||
get: return $button.get_text()
|
||||
|
||||
|
||||
@export var pressed: bool = false:
|
||||
set(val): $button.set_pressed(val)
|
||||
set(val):
|
||||
pressed = val
|
||||
if is_inside_tree():
|
||||
$button.set_pressed(val)
|
||||
get: return $button.is_pressed()
|
||||
|
||||
|
||||
@@ -28,6 +40,14 @@ extends PanelContainer
|
||||
get: return $button.is_toggle_mode()
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
var tst = texture_state1 if $button.pressed else texture_state0
|
||||
$state.set_texture(tst)
|
||||
$button.set_text(text)
|
||||
$button.set_pressed(pressed)
|
||||
$button.set_toggle_mode(toggle_mode)
|
||||
|
||||
|
||||
func set_text (val: String): $button.set_text(val)
|
||||
func set_pressed (val: bool): $button.set_pressed(val)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://gh3wqymu7cub"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://gh3wqymu7cub"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dhqqyf2pd1scs" path="res://scenes/эмс/кнопка-эмс.gd" id="1_pmsh3"]
|
||||
[ext_resource type="Texture2D" uid="uid://nfpish471rjj" path="res://data/кнопка-эмс-1.png" id="2_0o537"]
|
||||
[ext_resource type="Texture2D" uid="uid://bvxv33noium2h" path="res://data/кнопка-эмс-0.png" id="3_okiyh"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="1"]
|
||||
|
||||
@@ -16,23 +17,19 @@
|
||||
[sub_resource type="StyleBoxEmpty" id="6"]
|
||||
|
||||
[node name="container" type="PanelContainer"]
|
||||
offset_right = 30.0
|
||||
offset_bottom = 30.0
|
||||
offset_right = 23.0
|
||||
offset_bottom = 19.0
|
||||
theme_override_styles/panel = SubResource("1")
|
||||
script = ExtResource("1_pmsh3")
|
||||
texture_state0 = ExtResource("2_0o537")
|
||||
texture_state1 = ExtResource("3_okiyh")
|
||||
toggle_mode = true
|
||||
|
||||
[node name="state" type="NinePatchRect" parent="."]
|
||||
show_behind_parent = true
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_0o537")
|
||||
region_rect = Rect2(-1.60803, -1.94625, 31.9305, 25.9868)
|
||||
patch_margin_left = 6
|
||||
patch_margin_top = 5
|
||||
patch_margin_right = 7
|
||||
patch_margin_bottom = 5
|
||||
axis_stretch_horizontal = 2
|
||||
axis_stretch_vertical = 2
|
||||
texture = ExtResource("3_okiyh")
|
||||
region_rect = Rect2(3, 2, 22, 18)
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
class_name ems extends Panel
|
||||
|
||||
## Предзагрузка ячеек таблиц.
|
||||
const TableHeader = preload('res://table/header.tscn')
|
||||
const TableLabel = preload('res://table/lable.tscn')
|
||||
const CellYemsButton = preload('res://scenes/эмс/кнопка-эмс.tscn')
|
||||
const CellLineEdit = preload('res://table/ячейка-2.tscn')
|
||||
const CellState = preload('res://scenes/эмс/состояния-эмс.tscn')
|
||||
const CellOptBtn = preload('res://scenes/эмс/кнопка-5.tscn')
|
||||
const CellLEEmpty = preload('res://scenes/эмс/line-edit-empty.tscn')
|
||||
const CellFront = preload('res://scenes/cell/cell-front.tscn')
|
||||
const CellFrontRear = preload('res://scenes/cell/cell-front-rear.tscn')
|
||||
@export var TableHeader: PackedScene
|
||||
@export var TableLabel: PackedScene
|
||||
@export var CellYemsButton: PackedScene
|
||||
@export var CellLineEdit: PackedScene
|
||||
@export var CellState: PackedScene
|
||||
@export var CellOptBtn: PackedScene
|
||||
@export var CellLEEmpty: PackedScene
|
||||
@export var CellFront: PackedScene
|
||||
@export var CellFrontRear: PackedScene
|
||||
|
||||
## Режимы работы выходов.
|
||||
const OUT_MODE: Array = ['Работа', 'Контроль', '0', '1'] #
|
||||
const COLUMN_OPTS_BTN: Array = [5]
|
||||
const TABLE_ENTRY_COLUMNS: Array = [2,3]
|
||||
const OUT_SET_ROW: Array = [CellLineEdit, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty]
|
||||
const IN_SET_ROW: Array = [CellLineEdit, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty]
|
||||
var OUT_SET_ROW: Array
|
||||
var IN_SET_ROW: Array
|
||||
|
||||
var FILES_ROWS_TYPES = [CellLineEdit, CellLineEdit, CellLineEdit ]
|
||||
var FILES_ROWS_TYPES: Array
|
||||
|
||||
var g_boards: Dictionary ## Словарь плат ЭМС.
|
||||
var active_board = null ## Активная плата ЭМС
|
||||
@@ -32,6 +32,9 @@ func _ready() -> void:
|
||||
|
||||
## Инициализация основных элементов экрана ЭМС.
|
||||
func init_boards():
|
||||
OUT_SET_ROW = [CellLineEdit, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty]
|
||||
IN_SET_ROW = [CellLineEdit, CellLEEmpty, CellLEEmpty, CellLEEmpty, CellLEEmpty]
|
||||
FILES_ROWS_TYPES = [CellLineEdit, CellLineEdit, CellLineEdit ]
|
||||
var unit_ems = network.get_unit_instance('уарэп-эмс')
|
||||
|
||||
# Выставление позиций элементов ЭМС на экране
|
||||
@@ -60,17 +63,16 @@ func init_boards():
|
||||
init_tbl_files()
|
||||
$scrl_files/tbl_files.pin_header($scrl_files, self)
|
||||
|
||||
unit_ems.connect('data_received', Callable(self, 'on_data_ems_received'))
|
||||
unit_ems.connect('command_done', Callable(self, 'on_command_done'))
|
||||
unit_ems.connect('line_changed', Callable(self, 'on_line_changed'))
|
||||
unit_ems.connect('data_received', on_data_ems_received)
|
||||
unit_ems.connect('command_done', on_command_done)
|
||||
unit_ems.connect('line_changed', on_line_changed)
|
||||
for board in g_boards.values():
|
||||
board.connect('upd_delay_offset', Callable(self, 'on_upd_delay_offset'))
|
||||
board.connect('upd_o_state', Callable(self, 'on_upd_o_state'))
|
||||
$btn_connect.connect('pressed', Callable(self, 'on_btn_connect'))
|
||||
$btn_disconnect.connect('pressed', Callable(self, 'on_btn_disconnect').bind(unit_ems))
|
||||
$btn_flash_read.button_connect('pressed', Callable(self, 'on_btn_flash_read').bind($btn_flash_read))
|
||||
$btn_flash_write.button_connect('pressed', Callable(self, 'on_btn_flash_write').bind($btn_flash_write))
|
||||
|
||||
board.connect('upd_delay_offset', on_upd_delay_offset)
|
||||
board.connect('upd_o_state', on_upd_o_state)
|
||||
$btn_connect.connect('pressed', on_btn_connect)
|
||||
$btn_disconnect.connect('pressed', on_btn_disconnect.bind(unit_ems))
|
||||
$btn_flash_read.button_connect('pressed', on_btn_flash_read.bind($btn_flash_read))
|
||||
$btn_flash_write.button_connect('pressed', on_btn_flash_write.bind($btn_flash_write))
|
||||
|
||||
|
||||
## Обработчик нажатия кнопки disconnect.
|
||||
@@ -137,7 +139,7 @@ func init_tbl_files():
|
||||
tools.fill_files_table($scrl_files/tbl_files, yemsconsts.files_folder, FILES_ROWS_TYPES)
|
||||
$scrl_files/tbl_files.set_columns_alignments(yemsconsts.FILES_ROWS_ALIGNMENT)
|
||||
$scrl_files/tbl_files.set_columns_min_size(yemsconsts.FILES_COLUMN_WIDTHS)
|
||||
$scrl_files/tbl_files.connect('row_pressed', Callable(self, 'on_pressed_file'))
|
||||
$scrl_files/tbl_files.connect('row_pressed', on_pressed_file)
|
||||
for i_row in $scrl_files/tbl_files.get_rows_count():
|
||||
disable_edit($scrl_files/tbl_files, len(FILES_ROWS_TYPES), i_row)
|
||||
|
||||
@@ -176,8 +178,8 @@ func init_tbl_in():
|
||||
$scrollin/tbl_in.set_node_user_data(i, row_index, [in_dev, board])
|
||||
$scrollin/tbl_in.set_columns_alignments(yams_alligment_in)
|
||||
$scrollin/tbl_in.set_columns_min_size(column_size)
|
||||
$scrollin/tbl_in.connect('row_pressed', Callable(self, 'on_row_pressed_in'))
|
||||
$scrollin/tbl_in.connect('selected_changed', Callable(self, 'on_selected_changed_in'))
|
||||
$scrollin/tbl_in.connect('row_pressed', on_row_pressed_in)
|
||||
$scrollin/tbl_in.connect('selected_changed', on_selected_changed_in)
|
||||
|
||||
# Инициализация таблицы изменения параметров входа и списка выходов связанных с ним
|
||||
header_text[0] = 'Вход'
|
||||
@@ -185,8 +187,8 @@ func init_tbl_in():
|
||||
$scrl_in_set/tbl_in_set.set_header_text(header_text)
|
||||
$scrl_in_set/tbl_in_set.set_columns_alignments(yams_alligment_in)
|
||||
$scrl_in_set/tbl_in_set.set_columns_min_size(column_size)
|
||||
$scrl_in_set/tbl_in_set.connect('row_pressed', Callable(self, 'on_row_pressed_si'))
|
||||
$scrl_in_set/tbl_in_set.connect('selected_changed', Callable(self, 'on_selected_changed_si'))
|
||||
$scrl_in_set/tbl_in_set.connect('row_pressed', on_row_pressed_si)
|
||||
$scrl_in_set/tbl_in_set.connect('selected_changed', on_selected_changed_si)
|
||||
|
||||
|
||||
## Обработчик редактирования Entry в таблице параметров входов/выходов.
|
||||
@@ -299,16 +301,16 @@ func init_tbl_out():
|
||||
cell.editable = false
|
||||
$scrollout/tbl_out.set_columns_min_size([250, 100, 70, 70, 70, 100])
|
||||
$scrollout/tbl_out.set_columns_alignments(yams_alligment_out)
|
||||
$scrollout/tbl_out.connect('row_pressed', Callable(self, 'on_row_pressed_out'))
|
||||
$scrollout/tbl_out.connect('selected_changed', Callable(self, 'on_selected_changed_out'))
|
||||
$scrollout/tbl_out.connect('row_pressed', on_row_pressed_out)
|
||||
$scrollout/tbl_out.connect('selected_changed', on_selected_changed_out)
|
||||
|
||||
# Инициализация таблицы изменения параметров выхода и списка входов связанных с ним
|
||||
header_text[0] = 'Выход'
|
||||
$scrl_out_set/tbl_out_set.set_header([TableHeader, TableHeader, CellFront, CellFrontRear, TableHeader, TableHeader])
|
||||
$scrl_out_set/tbl_out_set.set_header_text(header_text)
|
||||
$scrl_out_set/tbl_out_set.set_columns_min_size([250, 100, 70, 70, 70, 100])
|
||||
$scrl_out_set/tbl_out_set.connect('row_pressed', Callable(self, 'on_row_pressed_so'))
|
||||
$scrl_out_set/tbl_out_set.connect('selected_changed', Callable(self, 'on_selected_changed_so'))
|
||||
$scrl_out_set/tbl_out_set.connect('row_pressed', on_row_pressed_so)
|
||||
$scrl_out_set/tbl_out_set.connect('selected_changed', on_selected_changed_so)
|
||||
|
||||
|
||||
## Обработчик выбора строки в таблице соединений выхода и изменения параметров.
|
||||
@@ -354,7 +356,7 @@ func set_out_dev(dev):
|
||||
var mode = $scrl_out_set/tbl_out_set.get_node2(5, 0)
|
||||
for opt in OUT_MODE:
|
||||
mode.add_item(opt)
|
||||
mode.connect('item_selected', Callable(self, 'on_switch_done').bind(dev))
|
||||
mode.connect('item_selected', on_switch_done.bind(dev))
|
||||
mode.select(dev.mode)
|
||||
|
||||
|
||||
@@ -529,20 +531,20 @@ func on_upd_delay_offset(_board, dev):
|
||||
tbl = $scrollout/tbl_out
|
||||
var le_delay = tbl.get_node2(TABLE_ENTRY_COLUMNS[0], dev.tbl_row_id)
|
||||
var le_offset = tbl.get_node2(TABLE_ENTRY_COLUMNS[1], dev.tbl_row_id)
|
||||
le_delay.set_text(str('%3.1f' % dev.delay))
|
||||
le_offset.set_text(str('%3.1f' % dev.offset))
|
||||
le_delay.set_text('%3.1f' % dev.delay)
|
||||
le_offset.set_text('%3.1f' % dev.offset)
|
||||
if $scrl_in_set/tbl_in_set.get_rows_count():
|
||||
var sel_dev = $scrl_in_set/tbl_in_set.get_node_user_data(0, 0)
|
||||
var l_delay = $scrl_in_set/tbl_in_set.get_node2(2, 0)
|
||||
var l_offset = $scrl_in_set/tbl_in_set.get_node2(3, 0)
|
||||
l_delay.set_text(str('%3.1f' % sel_dev.delay))
|
||||
l_offset.set_text(str('%3.1f' % sel_dev.offset))
|
||||
l_delay.set_text('%3.1f' % sel_dev.delay)
|
||||
l_offset.set_text('%3.1f' % sel_dev.offset)
|
||||
if $scrl_out_set/tbl_out_set.get_rows_count():
|
||||
var sel_dev = $scrl_out_set/tbl_out_set.get_node_user_data(0, 0)
|
||||
var l_delay = $scrl_out_set/tbl_out_set.get_node2(2, 0)
|
||||
var l_offset = $scrl_out_set/tbl_out_set.get_node2(3, 0)
|
||||
l_delay.set_text(str('%3.1f' % sel_dev.delay))
|
||||
l_offset.set_text(str('%3.1f' % sel_dev.offset))
|
||||
l_delay.set_text('%3.1f' % sel_dev.delay)
|
||||
l_offset.set_text('%3.1f' % sel_dev.offset)
|
||||
|
||||
|
||||
## Вызывается по обновлению информации о режиме выходов
|
||||
@@ -659,4 +661,4 @@ func _on_btn_load_pressed() -> void:
|
||||
board.need_write = true
|
||||
log.message(log.INFO, 'Произведено чтение настроек ЭМС из файла: %s, для платы %s' %[fl_name, board.id_board])
|
||||
else:
|
||||
log.message(log.ERROR, 'Ошибка чтение настроек ЭМС из файла: %s' %fl_name)
|
||||
log.message(log.ERROR, 'Ошибка чтение настроек ЭМС из файла: %s' % fl_name)
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://dab6loryocc73"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://dab6loryocc73"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://do1s7qg4bmxqy" path="res://scenes/эмс/эмс.gd" id="1_mk57x"]
|
||||
[ext_resource type="PackedScene" uid="uid://ch14g46swx74h" path="res://table/header.tscn" id="2_1fbmy"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat/button-flat.tscn" id="2_eju8r"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwphmxstaxn4v" path="res://table/lable.tscn" id="3_31xk8"]
|
||||
[ext_resource type="Texture2D" uid="uid://csnts8f155sf7" path="res://data/save1.png" id="3_onafb"]
|
||||
[ext_resource type="Texture2D" uid="uid://o8mam0a060d8" path="res://data/load1.png" id="4_afjfs"]
|
||||
[ext_resource type="PackedScene" uid="uid://dspa16ufrpanp" path="res://table/ячейка-2.tscn" id="4_o3av6"]
|
||||
[ext_resource type="PackedScene" uid="uid://by22sta8tt8dn" path="res://scenes/эмс/состояния-эмс.tscn" id="5_owc4r"]
|
||||
[ext_resource type="Texture2D" uid="uid://bdlbqs88bki8x" path="res://data/connect-a.png" id="5_wk8og"]
|
||||
[ext_resource type="Texture2D" uid="uid://u3tnejvpm8it" path="res://data/disconnect-a.png" id="6_1fbmy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwcol6jg2syof" path="res://scenes/эмс/кнопка-5.tscn" id="6_k0fjr"]
|
||||
[ext_resource type="PackedScene" uid="uid://c480ipkjckkdn" path="res://scenes/эмс/line-edit-empty.tscn" id="7_k0fjr"]
|
||||
[ext_resource type="PackedScene" uid="uid://bccr42bckei41" path="res://scenes/cell/cell-front.tscn" id="8_k30d1"]
|
||||
[ext_resource type="Script" uid="uid://c5pq0hbrij34d" path="res://table/table.gd" id="8_qcl30"]
|
||||
[ext_resource type="PackedScene" uid="uid://b8txs4xi722wt" path="res://scenes/cell/cell-front-rear.tscn" id="9_js36y"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_mu34x"]
|
||||
texture = ExtResource("3_onafb")
|
||||
@@ -64,6 +72,15 @@ texture = ExtResource("6_1fbmy")
|
||||
offset_right = 1598.0
|
||||
offset_bottom = 1201.0
|
||||
script = ExtResource("1_mk57x")
|
||||
TableHeader = ExtResource("2_1fbmy")
|
||||
TableLabel = ExtResource("3_31xk8")
|
||||
CellYemsButton = ExtResource("4_o3av6")
|
||||
CellLineEdit = ExtResource("4_o3av6")
|
||||
CellState = ExtResource("5_owc4r")
|
||||
CellOptBtn = ExtResource("6_k0fjr")
|
||||
CellLEEmpty = ExtResource("7_k0fjr")
|
||||
CellFront = ExtResource("8_k30d1")
|
||||
CellFrontRear = ExtResource("9_js36y")
|
||||
|
||||
[node name="lbl_online" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
extends Panel
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var unit_trassa = network.get_unit_instance('уарэп-трасса')
|
||||
unit_trassa.connect('line_changed', Callable(self, 'on_trassa_line_changed'))
|
||||
signaller.connect('sector_klaster', Callable(self, 'on_sector_klaster').bind(unit_trassa))
|
||||
|
||||
|
||||
func on_trassa_line_changed(unit_trassa):
|
||||
pass
|
||||
|
||||
|
||||
func on_sector_klaster(_data, unit_trassa):
|
||||
pass
|
||||
@@ -1,96 +0,0 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://cyhrdjoylh8tj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://hkcvl2waf63s" path="res://data/вид сверху.png" id="1_4em3i"]
|
||||
[ext_resource type="Texture2D" uid="uid://0w6q4vfst0ry" path="res://data/OP-63.png" id="3_eq8fj"]
|
||||
[ext_resource type="Texture2D" uid="uid://073el51yholj" path="res://data/454.png" id="4_528aa"]
|
||||
[ext_resource type="Texture2D" uid="uid://cckk3jk5r32bh" path="res://data/ГО.png" id="5_qxr47"]
|
||||
[ext_resource type="Texture2D" uid="uid://kyrnn1mqpc08" path="res://data/РЛС1.png" id="6_8sxps"]
|
||||
[ext_resource type="Texture2D" uid="uid://cx0f3wcx76u1k" path="res://data/РЛС2.png" id="7_0bfmy"]
|
||||
[ext_resource type="Texture2D" uid="uid://csxruavk0s40l" path="res://data/Окно частот0.png" id="8_4em3i"]
|
||||
[ext_resource type="Texture2D" uid="uid://duu8q7sv0jwfh" path="res://data/ННВС.png" id="8_aiy4x"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_5u4bk"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_pd85g"]
|
||||
|
||||
[node name="Control" type="Panel"]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color(1, 0.596078, 0.4, 1)
|
||||
position = Vector2(801, 131)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(0.353264, 0.353264)
|
||||
texture = ExtResource("1_4em3i")
|
||||
|
||||
[node name="частоты" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 72.0
|
||||
offset_top = 264.0
|
||||
offset_right = 1621.0
|
||||
offset_bottom = 870.0
|
||||
scale = Vector2(0.95, 0.95)
|
||||
texture = SubResource("CompressedTexture2D_5u4bk")
|
||||
|
||||
[node name="Op-63" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 128.0
|
||||
offset_top = 91.0
|
||||
offset_right = 341.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312207, 0.312207)
|
||||
texture = ExtResource("3_eq8fj")
|
||||
|
||||
[node name="454" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 288.0
|
||||
offset_top = 91.0
|
||||
offset_right = 501.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312, 0.312)
|
||||
texture = ExtResource("4_528aa")
|
||||
|
||||
[node name="Го" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 464.0
|
||||
offset_top = 91.0
|
||||
offset_right = 677.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312, 0.312)
|
||||
texture = ExtResource("5_qxr47")
|
||||
|
||||
[node name="Рлс1" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 728.0
|
||||
offset_top = 91.0
|
||||
offset_right = 941.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312, 0.312)
|
||||
texture = ExtResource("6_8sxps")
|
||||
|
||||
[node name="Рлс2" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 920.0
|
||||
offset_top = 91.0
|
||||
offset_right = 1133.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312, 0.312)
|
||||
texture = ExtResource("7_0bfmy")
|
||||
|
||||
[node name="Ннвс" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1280.0
|
||||
offset_top = 91.0
|
||||
offset_right = 1493.0
|
||||
offset_bottom = 383.0
|
||||
scale = Vector2(0.312, 0.312)
|
||||
texture = ExtResource("8_aiy4x")
|
||||
|
||||
[node name="ТаблицаОбмена" type="Sprite2D" parent="."]
|
||||
position = Vector2(568, 1024)
|
||||
scale = Vector2(0.911215, 0.911215)
|
||||
texture = SubResource("CompressedTexture2D_pd85g")
|
||||
|
||||
[node name="ТаблицаЧастот" type="Sprite2D" parent="."]
|
||||
position = Vector2(794, 569)
|
||||
texture = ExtResource("8_4em3i")
|
||||
@@ -135,6 +135,7 @@ class Interfer:
|
||||
var um: float ## Угол места для помехи.
|
||||
var nmfs: int = 0 ## Номер модуля ФС в нумерации СТЦ
|
||||
var priority: int = 0 ## Приоритет помехи
|
||||
var active: bool = false ## Флаг, что фиксируется мощность на выходном усилителе
|
||||
|
||||
func _to_string() -> String:
|
||||
return 'номер: %d название: %s частота: %0.1f МГц пеленг: %0.1f гр.' % [ispp, ITERFER_MODE[krp][0], params['freq'], kni]
|
||||
@@ -385,6 +386,8 @@ func on_interfer_create(interfer_name, sel_threats, fs_arr, power, u, ecms) -> v
|
||||
var id = item.id
|
||||
param['freq'] = item.freq
|
||||
param['width'] = item.width * width_coef
|
||||
if item.rparams.has('period'):
|
||||
param['period'] = item.rparams['period']
|
||||
if (item.rkrp != '') and item.fflags.rkrp and auto_enabled:
|
||||
var krp = get_krp(item)
|
||||
if krp != '':
|
||||
@@ -615,6 +618,8 @@ func set_rparams(threat: threats.Threat, params: Dictionary):
|
||||
params['width'] = threat.rparams['width'] * width_coef
|
||||
else:
|
||||
params['width'] = threat.width * width_coef
|
||||
if threat.rparams.has('period'):
|
||||
params['period'] = threat.rparams['period']
|
||||
check_width(params)
|
||||
if threat.rparams.has('filename'):
|
||||
params['filename'] = threat.rparams['filename']
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@tool
|
||||
class_name Network extends Node
|
||||
|
||||
const YAU07_PROTO: = {'yau07tx': yau07.YaU07}
|
||||
const YAU07_PROTO: = {'yau07tx': yau07.YaU07, 'iyems-tx': yemstg.YeMSTG}
|
||||
const UDP_PROTO: = {'capsrpb': capsrpb.CapsRpb, 'trassa': trassa.Trassa}
|
||||
const TCP_PROTO: = {'5p28': tcp5p28.TCP5P28}
|
||||
const SERIAL_PROTO: = {'spt25': spt25.SPT25}
|
||||
@@ -110,24 +110,6 @@ class SocketUDP extends PacketPeerUDP:
|
||||
push_error('%s: %s', [error_string(rc), addr])
|
||||
|
||||
|
||||
class SocketTCP extends TCPServer:
|
||||
const RX_TIMEOUT: int = 1000 ## Время сброса счётчика принятия части пакета.
|
||||
var peerstream: = PacketPeerStream.new()
|
||||
var unit_name: StringName ## Уникальное имя устройства
|
||||
var head_len: int = 8 ## Длина заголовка команды.
|
||||
var len_place: int = 4 ## Номер начального байта с длинной блока данных.
|
||||
var type_len: int = 4 ## Количество байт в размере длинны.
|
||||
var rx_tick: int ## Время приёма последнего пакета.
|
||||
var rx_all: bool = true ## Флаг, что пакет принят полностью.
|
||||
var rx_len: int ## Количество принятых байт.
|
||||
var rx_data: PackedByteArray ## Принятые данные.
|
||||
var data_len: int ## Размер ожидаемых данных.
|
||||
|
||||
func send_to(data: PackedByteArray):
|
||||
var peer = peerstream.get_stream_peer()
|
||||
peer.put_data(data)
|
||||
|
||||
|
||||
var poll_sockets: Array[SocketUDP] ## Сокеты для непрерывного опроса наличия новых данных
|
||||
var tcp_sockets: Array[Array] ## Сокеты для TCP-соединений
|
||||
var units: Dictionary[StringName, unit.Unit] ## Экземпляры всех сетевых устройств
|
||||
@@ -164,12 +146,15 @@ func create_socket_udp(unit_name: StringName) -> SocketUDP:
|
||||
var bind = st[3]
|
||||
var sock: = SocketUDP.new()
|
||||
sock.set_broadcast_enabled(broad)
|
||||
var rc: = sock.bind(port, addr)
|
||||
if rc == Error.OK:
|
||||
log.info('\"%s\" привязан к %s:%d' % [unit_name, addr, port])
|
||||
else:
|
||||
var errmsg: = error_string(rc)
|
||||
log.error('привязка \"%s\" к %s:%d не удалась: \"%s\"' % [unit_name, addr, port, errmsg])
|
||||
if broad:
|
||||
log.info('\"%s\" - установлен широковещательный режим' % unit_name)
|
||||
if bind:
|
||||
var rc: = sock.bind(port, addr)
|
||||
if rc == Error.OK:
|
||||
log.info('\"%s\" привязан к %s:%d' % [unit_name, addr, port])
|
||||
else:
|
||||
var errmsg: = error_string(rc)
|
||||
log.error('привязка \"%s\" к %s:%d не удалась: \"%s\"' % [unit_name, addr, port, errmsg])
|
||||
return sock
|
||||
|
||||
|
||||
@@ -187,21 +172,6 @@ func create_socket_caps(unit_name: StringName) -> SocketUDP:
|
||||
return sock
|
||||
|
||||
|
||||
## [param unit_name] - Уникальное имя устройства[br]
|
||||
func create_socket_tcp(unit_name: StringName) -> SocketTCP:
|
||||
var st = settings.UnitProfiles[unit_name][1]
|
||||
var addr = st[0]
|
||||
var port = st[1]
|
||||
var sock: = SocketTCP.new()
|
||||
sock.unit_name = unit_name
|
||||
var rc: = sock.listen(port, addr)
|
||||
if rc == Error.OK:
|
||||
log.message(log.INFO, '\"%s\" слушает на %s:%d' % [unit_name, addr, port])
|
||||
else:
|
||||
log.message(log.ERROR, '\"%s\" %s:%d \"%s\"' % [unit_name, addr, port, error_string(rc)])
|
||||
return sock
|
||||
|
||||
|
||||
## [param unit_name] - Уникальное имя устройства[br]
|
||||
func create_serial(unit_instance: unit.Unit) -> SocketSerial:
|
||||
var st = settings.UnitProfiles[unit_instance.name][1]
|
||||
@@ -230,7 +200,8 @@ func _ready() -> void:
|
||||
var sock_navi: = create_socket_udp('навигация')
|
||||
var sock_caps: = create_socket_caps('уарэп-капсрпб')
|
||||
var sock_trassa: = create_socket_caps('уарэп-трасса')
|
||||
poll_sockets = [sock_unicast, sock_broadcast, sock_caps, sock_navi, sock_trassa]
|
||||
var sock_yems: = create_socket_udp('эмс-ведущий')
|
||||
poll_sockets = [sock_unicast, sock_broadcast, sock_caps, sock_navi, sock_trassa, sock_yems]
|
||||
send_sockets['уарэп-яу07-частный'] = sock_unicast
|
||||
send_sockets['уарэп-яу07-общий'] = sock_broadcast
|
||||
send_sockets['уарэп-капсрпб'] = sock_caps
|
||||
@@ -248,6 +219,14 @@ func _ready() -> void:
|
||||
send_sockets['уарэп-яу07-3в'] = sock_unicast
|
||||
send_sockets['уарэп-яу07-3н'] = sock_unicast
|
||||
send_sockets['уарэп-яу07-3к'] = sock_unicast
|
||||
send_sockets['эмс-ор63'] = sock_yems
|
||||
send_sockets['эмс-454'] = sock_yems
|
||||
send_sockets['эмс-го'] = sock_yems
|
||||
send_sockets['эмс-рлс1'] = sock_yems
|
||||
send_sockets['эмс-рлс2'] = sock_yems
|
||||
send_sockets['эмс-ннвс'] = sock_yems
|
||||
send_sockets['эмс-изделие7'] = sock_yems
|
||||
send_sockets['эмс-изделие8'] = sock_yems
|
||||
|
||||
var bind_serials: = []
|
||||
var bind_modbuses: = []
|
||||
@@ -279,9 +258,11 @@ func _ready() -> void:
|
||||
dst_ports[unit_name] = unit_profile[3]
|
||||
|
||||
if proto in TCP_PROTO:
|
||||
var addr = settings.UnitProfiles[unit_name][1]
|
||||
var unit_tcp = TCP_PROTO[proto].new(unit_name)
|
||||
units[unit_name] = unit_tcp
|
||||
units_tcp[unit_name] = unit_tcp
|
||||
unit_tcp.open(addr[0], addr[1])
|
||||
|
||||
if proto in MODBUS_PROTO:
|
||||
var unit_modbus = MODBUS_PROTO[proto].new(unit_name)
|
||||
@@ -305,7 +286,6 @@ func _ready() -> void:
|
||||
units_nullp[unit_name] = unit_null
|
||||
|
||||
|
||||
tcp_sockets.append([create_socket_tcp('уарэп-5п28'), units_tcp['уарэп-5п28']])
|
||||
for key: StringName in dst_ports:
|
||||
port_to_unit_name[dst_ports[key]] = key
|
||||
if logger_page:
|
||||
@@ -347,55 +327,6 @@ func poll_receive_udp(sock: SocketUDP) -> bool:
|
||||
return false
|
||||
|
||||
|
||||
func poll_receive_tcp(sock: SocketTCP) -> bool:
|
||||
if sock.is_connection_available(): # Проверить, если кто то пытается подключиться
|
||||
var client: = sock.take_connection() # Принять соединение
|
||||
sock.peerstream.set_stream_peer(client) # Привязать поток к новому клиенту
|
||||
log.info('подключен: %s:%d к порту: %d' % [ client.get_connected_host(), client.get_connected_port(), client.get_local_port() ])
|
||||
var peer = sock.peerstream.get_stream_peer()
|
||||
if peer:
|
||||
while true:
|
||||
var peer_len_data: = peer.get_available_bytes()
|
||||
if peer_len_data <= 0:
|
||||
break
|
||||
get_client_data(sock, peer, peer_len_data)
|
||||
if sock.unit_name in units_tcp and sock.rx_all:
|
||||
units_tcp[sock.unit_name].parse(sock.rx_data, tick)
|
||||
return false
|
||||
|
||||
|
||||
func get_client_data(sock: SocketTCP, peer: StreamPeer, peer_len_data: int) -> void:
|
||||
if tick - sock.rx_tick > sock.RX_TIMEOUT:
|
||||
sock.rx_all = true
|
||||
sock.rx_tick = tick
|
||||
if sock.rx_all:
|
||||
if peer_len_data >= sock.head_len:
|
||||
sock.rx_all = false
|
||||
sock.rx_len = sock.head_len
|
||||
var head = peer.get_data(sock.head_len)
|
||||
sock.data_len = head[1].decode_u32(sock.len_place)
|
||||
var len_data_in_buf = peer.get_available_bytes()
|
||||
if len_data_in_buf > 0:
|
||||
sock.rx_data = head[1]
|
||||
var len_rx = len_data_in_buf
|
||||
if len_data_in_buf >= sock.data_len:
|
||||
len_rx = sock.data_len
|
||||
get_tcp_data(sock, peer, len_rx)
|
||||
else:
|
||||
var len_rx = (sock.head_len + sock.data_len) - sock.rx_len
|
||||
if peer_len_data < len_rx:
|
||||
len_rx = peer_len_data
|
||||
get_tcp_data(sock, peer, len_rx)
|
||||
|
||||
|
||||
func get_tcp_data(sock: SocketTCP, peer: StreamPeer, len_rx: int):
|
||||
var temp_data = peer.get_data(len_rx)[1]
|
||||
sock.rx_data.append_array(temp_data)
|
||||
sock.rx_len += len_rx
|
||||
if sock.rx_len == sock.head_len + sock.data_len:
|
||||
sock.rx_all = true
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Engine.is_editor_hint(): return
|
||||
tick = Time.get_ticks_msec()
|
||||
@@ -421,15 +352,10 @@ func _process(_delta: float) -> void:
|
||||
for unit_name: StringName in units_modbus:
|
||||
var unit_modbus: = units_modbus[unit_name]
|
||||
unit_modbus.process(tick)
|
||||
for sock_unit: Array in tcp_sockets:
|
||||
var sock = sock_unit[0]
|
||||
var unit_tcp = sock_unit[1]
|
||||
if Error.OK == unit_tcp.process(tick):
|
||||
sock.send_to(unit_tcp.tx_data)
|
||||
poll_receive_tcp(sock)
|
||||
poll_sockets.any(poll_receive_udp)
|
||||
|
||||
|
||||
## Возвращает экземпляр уже созданного устройства
|
||||
## [param unit_name] - Уникальное имя устройства[br]
|
||||
func get_unit_instance(unit_name: StringName) -> unit.Unit:
|
||||
return units.get(unit_name, null)
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
class_name PRDConfigManager
|
||||
extends RefCounted
|
||||
|
||||
## Менеджер конфигурации для системы контроля ПРД
|
||||
## Загружает и управляет настройками из JSON-конфигурации
|
||||
## Менеджер конфигурации для системы контроля ПРД.
|
||||
## Загружает и управляет настройками из JSON-конфигурации.
|
||||
|
||||
#region CONSTANTS
|
||||
const CONFIG_PATH = "user://config/setting_prd_control.json"
|
||||
const DEFAULT_CONFIG_PATH = "res://config/setting_prd_control.json"
|
||||
const CONFIG_VERSION = "1.0.0" # Версия конфигурации - увеличивать при изменениях
|
||||
const CONFIG_PATH = 'user://config/setting-prd-control.json'
|
||||
const DEFAULT_CONFIG_PATH = 'res://config/setting-prd-control.json'
|
||||
const CONFIG_VERSION = '1.0.0' # Версия конфигурации - увеличивать при изменениях
|
||||
#endregion
|
||||
|
||||
#region PRIVATE_VARIABLES
|
||||
var _config_data: Dictionary # Все данные конфигурации
|
||||
var _device_constants: Dictionary # Константы устройств
|
||||
var _base_configs: Dictionary # Базовые конфигурации
|
||||
var _device_configs: Dictionary # Конфигурации устройств
|
||||
var _data_indices: Dictionary # Индексы данных
|
||||
var _fs_keys: Dictionary # Ключи ФС (функциональных систем)
|
||||
var _temperature_constants: Dictionary # Константы температуры
|
||||
var _ems_input_bits_config: Dictionary # Конфигурация битов ввода ЭМС
|
||||
var _fs_rules: Array # Правила ФС
|
||||
var _config_data: Dictionary ## Все данные конфигурации
|
||||
var _device_constants: Dictionary ## Константы устройств
|
||||
var _base_configs: Dictionary ## Базовые конфигурации
|
||||
var _device_configs: Dictionary ## Конфигурации устройств
|
||||
var _data_indices: Dictionary ## Индексы данных
|
||||
var _fs_keys: Dictionary ## Ключи ФС (функциональных систем)
|
||||
var _temperature_constants: Dictionary ## Константы температуры
|
||||
var _ems_input_bits_config: Dictionary ## Конфигурация битов ввода ЭМС
|
||||
var _fs_rules: Array ## Правила ФС
|
||||
|
||||
var _is_loaded: bool = false # Флаг успешной загрузки
|
||||
var _current_version: String = "" # Текущая версия загруженной конфигурации
|
||||
var _is_loaded: bool = false ## Флаг успешной загрузки
|
||||
var _current_version: String ## Текущая версия загруженной конфигурации
|
||||
#endregion
|
||||
|
||||
#region INITIALIZATION
|
||||
func _init() -> void:
|
||||
"""Инициализация менеджера конфигурации"""
|
||||
'''Инициализация менеджера конфигурации'''
|
||||
_load_configuration()
|
||||
#endregion
|
||||
|
||||
@@ -101,27 +101,27 @@ func _load_configuration() -> void:
|
||||
var parse_result = json.parse(json_text)
|
||||
if parse_result == OK:
|
||||
_config_data = json.data
|
||||
_current_version = _config_data.get("config_version", "0.0.0")
|
||||
_current_version = _config_data.get('config_version', '0.0.0')
|
||||
_parse_config_data()
|
||||
_is_loaded = true
|
||||
else:
|
||||
push_error("Ошибка разбора JSON конфигурации: " + json.get_error_message())
|
||||
push_error('Ошибка разбора JSON конфигурации: ' + json.get_error_message())
|
||||
_is_loaded = false
|
||||
else:
|
||||
push_error("Ошибка загрузки файла конфигурации: " + CONFIG_PATH)
|
||||
push_error('Ошибка загрузки файла конфигурации: ' + CONFIG_PATH)
|
||||
_is_loaded = false
|
||||
|
||||
|
||||
## Парсит данные конфигурации по секциям
|
||||
func _parse_config_data() -> void:
|
||||
_device_constants = _convert_numbers(_config_data.get("device_constants", {}))
|
||||
_base_configs = _convert_numbers(_config_data.get("base_configs", {}))
|
||||
_device_configs = _convert_numbers(_config_data.get("device_configs", {}))
|
||||
_data_indices = _convert_numbers(_config_data.get("data_indices", {}))
|
||||
_fs_keys = _convert_numbers(_config_data.get("fs_keys", {}))
|
||||
_temperature_constants = _convert_numbers(_config_data.get("temperature_constants", {}))
|
||||
_ems_input_bits_config = _convert_numbers(_config_data.get("ems_input_bits_config", {}))
|
||||
_fs_rules = _convert_numbers(_config_data.get("fs_rules", []))
|
||||
_device_constants = _convert_numbers(_config_data.get('device_constants', {}))
|
||||
_base_configs = _convert_numbers(_config_data.get('base_configs', {}))
|
||||
_device_configs = _convert_numbers(_config_data.get('device_configs', {}))
|
||||
_data_indices = _convert_numbers(_config_data.get('data_indices', {}))
|
||||
_fs_keys = _convert_numbers(_config_data.get('fs_keys', {}))
|
||||
_temperature_constants = _convert_numbers(_config_data.get('temperature_constants', {}))
|
||||
_ems_input_bits_config = _convert_numbers(_config_data.get('ems_input_bits_config', {}))
|
||||
_fs_rules = _convert_numbers(_config_data.get('fs_rules', []))
|
||||
|
||||
|
||||
## Конвертирует числовые значения в правильные типы (float -> int если возможно)
|
||||
@@ -149,12 +149,12 @@ static func _convert_numbers(value):
|
||||
## Создает папку и копирует дефолтный файл если нужно
|
||||
func _ensure_config_exists() -> bool:
|
||||
# Создаем папку конфигурации если не существует
|
||||
DirAccess.make_dir_recursive_absolute("user://config")
|
||||
DirAccess.make_dir_recursive_absolute('user://config')
|
||||
|
||||
# Проверяем, нужно ли обновить конфигурацию
|
||||
if _should_update_config():
|
||||
return _update_config()
|
||||
|
||||
|
||||
# Если файл уже существует - все ок
|
||||
if FileAccess.file_exists(CONFIG_PATH):
|
||||
return true
|
||||
@@ -172,40 +172,40 @@ func _should_update_config() -> bool:
|
||||
# Если файла конфигурации нет - нужно создать
|
||||
if not FileAccess.file_exists(CONFIG_PATH):
|
||||
return true
|
||||
|
||||
|
||||
# Проверяем версию существующей конфигурации
|
||||
var config_file = FileAccess.open(CONFIG_PATH, FileAccess.READ)
|
||||
if config_file:
|
||||
var json_text = config_file.get_as_text()
|
||||
config_file.close()
|
||||
|
||||
|
||||
var json = JSON.new()
|
||||
if json.parse(json_text) == OK:
|
||||
var existing_version = json.data.get("config_version", "0.0.0")
|
||||
var existing_version = json.data.get('config_version', '0.0.0')
|
||||
# Сравниваем версии
|
||||
return _compare_versions(existing_version, CONFIG_VERSION) < 0
|
||||
else:
|
||||
# Если ошибка парсинга - нужно обновить
|
||||
return true
|
||||
|
||||
|
||||
return false
|
||||
|
||||
|
||||
## Сравнивает две версии (semantic versioning)
|
||||
## Возвращает -1 если version1 < version2, 0 если равны, 1 если version1 > version2
|
||||
static func _compare_versions(version1: String, version2: String) -> int:
|
||||
var v1_parts = version1.split(".")
|
||||
var v2_parts = version2.split(".")
|
||||
|
||||
var v1_parts = version1.split('.')
|
||||
var v2_parts = version2.split('.')
|
||||
|
||||
for i in range(max(v1_parts.size(), v2_parts.size())):
|
||||
var v1_part = int(v1_parts[i]) if i < v1_parts.size() else 0
|
||||
var v2_part = int(v2_parts[i]) if i < v2_parts.size() else 0
|
||||
|
||||
|
||||
if v1_part < v2_part:
|
||||
return -1
|
||||
elif v1_part > v2_part:
|
||||
return 1
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -213,10 +213,9 @@ static func _compare_versions(version1: String, version2: String) -> int:
|
||||
func _update_config() -> bool:
|
||||
# Создаем резервную копию старой конфигурации
|
||||
if FileAccess.file_exists(CONFIG_PATH):
|
||||
var backup_path = CONFIG_PATH + ".backup_v" + _current_version
|
||||
var backup_path = CONFIG_PATH + '.backup_v' + _current_version
|
||||
DirAccess.copy_absolute(CONFIG_PATH, backup_path)
|
||||
print("Создана резервная копия: ", backup_path)
|
||||
|
||||
|
||||
# Копируем актуальную конфигурацию
|
||||
return _copy_default_config()
|
||||
|
||||
@@ -224,13 +223,13 @@ func _update_config() -> bool:
|
||||
## Копирует дефолтную конфигурацию в user директорию
|
||||
func _copy_default_config() -> bool:
|
||||
if not FileAccess.file_exists(DEFAULT_CONFIG_PATH):
|
||||
push_error("Дефолтный файл конфигурации не найден: " + DEFAULT_CONFIG_PATH)
|
||||
push_error('Файл конфигурации не найден: ' + DEFAULT_CONFIG_PATH)
|
||||
return false
|
||||
|
||||
var src := FileAccess.open(DEFAULT_CONFIG_PATH, FileAccess.READ)
|
||||
var dst := FileAccess.open(CONFIG_PATH, FileAccess.WRITE)
|
||||
if src == null or dst == null:
|
||||
push_error("Ошибка копирования конфигурации")
|
||||
push_error('Ошибка копирования конфигурации')
|
||||
return false
|
||||
|
||||
dst.store_string(src.get_as_text())
|
||||
|
||||
@@ -3,6 +3,7 @@ extends Node
|
||||
enum PrdState {WORK, CONTROL}
|
||||
|
||||
const TIME_YAU07_SEND = 50
|
||||
const MIN_UM_POWER = 200 ## минимальная мощность с усилителя, что бы отобразить значёк излучения
|
||||
|
||||
## Границы секторов блоков ФС по частоте в режиме РТО.
|
||||
const FS_BAND_RTO: Dictionary = {
|
||||
@@ -86,10 +87,10 @@ const FS_PRD: Dictionary = {
|
||||
26: ['уарэп-яу07-3к', 37],
|
||||
27: ['уарэп-яу07-2к', 27], }
|
||||
|
||||
var fs_dict: Dictionary ## Словарь с модулями ФС
|
||||
var prd_dict: Dictionary ## Словарь с приборами ПРД
|
||||
var course = 0.0 ## Курс корабля
|
||||
var fs_caps_id: Dictionary ## Словарь соответствия номеров ФС от КАПС РПБ внутрипрограммной нумерации
|
||||
var fs_dict: Dictionary ## Словарь с модулями ФС
|
||||
var prd_dict: Dictionary ## Словарь с приборами ПРД
|
||||
var course = 0.0 ## Курс корабля
|
||||
var fs_caps_id: Dictionary ## Словарь соответствия номеров ФС от КАПС РПБ внутрипрограммной нумерации
|
||||
|
||||
|
||||
class Fs:
|
||||
@@ -124,14 +125,17 @@ class Fs:
|
||||
var ready: bool = false ## Готовность сектора к излучению
|
||||
var caps_online: bool = false ## Состояние связи с КАПС РПБ
|
||||
var yau_07_online: bool = false ## Состояние связи ЯУ-07
|
||||
var lit: int ## Литера ФС
|
||||
var power: bool = false ## Признак излучения усилителей
|
||||
|
||||
signal update_modulation(index)
|
||||
|
||||
func _init(i, p_name):
|
||||
prd_name = p_name
|
||||
index = i
|
||||
if UM_PORTS.has(index/4):
|
||||
um_port = UM_PORTS[index/4]
|
||||
lit = index/4
|
||||
if UM_PORTS.has(lit):
|
||||
um_port = UM_PORTS[lit]
|
||||
|
||||
func set_modulation(val):
|
||||
modulation = val
|
||||
@@ -158,6 +162,14 @@ class Fs:
|
||||
func set_ready():
|
||||
ready = isg and caps_online and yau_07_online
|
||||
|
||||
func set_power(power_arr: Array):
|
||||
power = false
|
||||
for val in power_arr:
|
||||
if val > MIN_UM_POWER:
|
||||
power = true
|
||||
break
|
||||
|
||||
|
||||
class PRD:
|
||||
enum STATE_DEVICE {
|
||||
NONE,
|
||||
@@ -268,6 +280,7 @@ class PRD:
|
||||
# Определение состояния обслуживания
|
||||
if unit_control:
|
||||
if unit_control.flags.control_is_over:
|
||||
serviceability = 0 # Перед результатом контроля необходимо сбросить значение
|
||||
serviceability = _set_serviceability_from_control_results(unit_control)
|
||||
else:
|
||||
serviceability = _set_serviceability_from_online_status(check_dic)
|
||||
@@ -502,3 +515,13 @@ func on_yau07_line_changed(unit_yau07, prd_pribor):
|
||||
fs.yau_07_online = unit_yau07.online
|
||||
fs.set_ready()
|
||||
signaller.emit_signal('fs_update_state', fs_dict)
|
||||
|
||||
|
||||
func get_fs_power(nmfs: int):
|
||||
if not fs_caps_id.has(nmfs): return false
|
||||
var fs_index: int = fs_caps_id[nmfs]
|
||||
var prd_obj: PRD = prd_dict[FS_PRD[fs_index][0]]
|
||||
var fs: Fs = prd_obj.fs_dic[fs_index]
|
||||
var power_arr: Array = prd_obj.unit_control.power_um_ukp(prd_obj.unit_yau07.status, fs.lit + 1, [], true)
|
||||
fs.set_power(power_arr)
|
||||
return fs.power
|
||||
|
||||
@@ -310,7 +310,7 @@ func on_data_received(unit_pribor: Object) -> void:
|
||||
if interes == 'RAY_CTRL':
|
||||
count_packets_power += 1
|
||||
elif interes != '':
|
||||
tek_litera[_get_ray_key(state)] = power_um_ukp(status, current_litera, tek_litera[_get_ray_key(state)])
|
||||
tek_litera[_get_ray_key(state)] = power_um_ukp(status, current_litera, tek_litera[_get_ray_key(state)], false)
|
||||
power_for_litera[current_litera] = tek_litera
|
||||
count_packets_power += 1
|
||||
|
||||
@@ -432,6 +432,7 @@ static func take_ecm_id(ecm_dic: Dictionary, device_name: String, current_lit: i
|
||||
## Обработка состояния FS_WORK - проверка работы ФС
|
||||
func _handle_fs_work_state() -> void:
|
||||
_set_status('Проверка связи сервиса КАПС РПБ')
|
||||
if not ecms.has(current_ecm_key): push_error('Нет текущей ecm: %s' % current_ecm_key); return
|
||||
_set_status('Ожидание выполнения помехи состояние %s литеры %s' % [ecms[current_ecm_key].svk, current_litera])
|
||||
if current_ecm_key > 0 and ecms[current_ecm_key].svk == 1:
|
||||
if not flags.si_fs_input:
|
||||
@@ -883,11 +884,15 @@ func on_mode_changed(in_tree: bool) -> void:
|
||||
|
||||
# Вызывается при смене связи я ячейков ЯУ-07Б
|
||||
func on_line_changed_yau07(_status: Object)->void:
|
||||
_set_status('Ожидание запуска контроля')
|
||||
flags.control_is_over = false
|
||||
flags.no_trust_yau07 = false
|
||||
flags.only_fs = false
|
||||
restore_default_states()
|
||||
block_kasseta_y5_config.yau07 = _status.online
|
||||
if _status.online:
|
||||
_set_status('Ожидание запуска контроля')
|
||||
else:
|
||||
_set_status('Ячейка ЯУ-07Б: Нет связи')
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1158,50 +1163,52 @@ static func _should_apply_rule(fs_num: int, rule: Dictionary, results: Dictionar
|
||||
|
||||
|
||||
## Получение мощности при выполнении контроля
|
||||
static func power_um_ukp(status: PackedByteArray, litera: int, pwr_result: Array) -> Array:
|
||||
static func power_um_ukp(status: PackedByteArray, litera: int, pwr_result: Array, mode_work: bool) -> Array:
|
||||
const Constants: Dictionary = {'POWER_UKP_1' : 31, 'POWER_UKP_2': 63}
|
||||
var power_values: Array = []
|
||||
var base_offset = 0
|
||||
var iteration: int = 6
|
||||
var ug_valid: bool = (status[0] >> 2) & 1
|
||||
|
||||
if not len(status): return power_values
|
||||
var ukp1_valid: bool = (status[0] >> 2) & 1
|
||||
var ukp2_valid: bool = (status[0] >> 3) & 1
|
||||
match litera:
|
||||
1:
|
||||
var value = status.decode_u16(Constants.POWER_UKP_1 + 2 * 7)
|
||||
if ug_valid:
|
||||
if ukp1_valid:
|
||||
power_values = [value]
|
||||
2:
|
||||
base_offset = Constants.POWER_UKP_1
|
||||
if ug_valid:
|
||||
if ukp1_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
3:
|
||||
base_offset = Constants.POWER_UKP_2
|
||||
if ug_valid:
|
||||
if ukp2_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
4:
|
||||
base_offset = Constants.POWER_UKP_1
|
||||
if ug_valid:
|
||||
if ukp1_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
5:
|
||||
base_offset = Constants.POWER_UKP_2
|
||||
if ug_valid:
|
||||
if ukp2_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
6:
|
||||
base_offset = Constants.POWER_UKP_1
|
||||
if ug_valid:
|
||||
if ukp1_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
7:
|
||||
base_offset = Constants.POWER_UKP_2
|
||||
if ug_valid:
|
||||
if ukp2_valid:
|
||||
for i in iteration:
|
||||
power_values.append(status.decode_u16(base_offset + 2 * i))
|
||||
|
||||
power_values = update_max_power_values(power_values, pwr_result)
|
||||
if not mode_work:
|
||||
power_values = update_max_power_values(power_values, pwr_result)
|
||||
return power_values
|
||||
|
||||
|
||||
@@ -1356,7 +1363,7 @@ func restore_default_states() -> void:
|
||||
ems_6666_timer.stop()
|
||||
machine_timer.stop()
|
||||
|
||||
_set_status('Состояния сброшены к значениям по умолчанию')
|
||||
#'Состояния сброшены к значениям по умолчанию'
|
||||
|
||||
|
||||
## Получение текущих состояний для отладки
|
||||
|
||||
252
scripts/rtr.gd
Normal file
@@ -0,0 +1,252 @@
|
||||
class_name rtr
|
||||
extends Node
|
||||
|
||||
#region Перечисления
|
||||
enum State { IDLE, REQUESTING_LEFT, REQUESTING_RIGHT, WAITING_TIMEOUT }
|
||||
#endregion
|
||||
|
||||
#region Сигналы
|
||||
# Сигналы отправки запроса
|
||||
signal request_sent_left(url: String) # Отправлен запрос к левому борту
|
||||
signal request_sent_right(url: String) # Отправлен запрос к правому борту
|
||||
|
||||
# Сигналы получения ответа
|
||||
signal response_received_left(response: String, success: bool) # Получен ответ от левого борта
|
||||
signal response_received_right(response: String, success: bool) # Получен ответ от правого борта
|
||||
#endregion
|
||||
|
||||
#region Константы
|
||||
# Словарь с текстовым описанием кодов результатов HTTP запросов
|
||||
const RESULT_STRINGS = {
|
||||
HTTPRequest.Result.RESULT_SUCCESS: 'Запрос успешен',
|
||||
HTTPRequest.Result.RESULT_CHUNKED_BODY_SIZE_MISMATCH: 'Несоответствие размеров частей сообщения',
|
||||
HTTPRequest.Result.RESULT_CANT_CONNECT: 'Запрос не выполнен при подключении',
|
||||
HTTPRequest.Result.RESULT_CANT_RESOLVE: 'Запрос не выполнен при разрешении',
|
||||
HTTPRequest.Result.RESULT_CONNECTION_ERROR: 'Запрос не выполнен из-за ошибки соединения',
|
||||
HTTPRequest.Result.RESULT_TLS_HANDSHAKE_ERROR: 'Запрос не выполнен на TLS рукопожатии',
|
||||
HTTPRequest.Result.RESULT_NO_RESPONSE: 'Запрос не имеет ответа (пока)',
|
||||
HTTPRequest.Result.RESULT_BODY_SIZE_LIMIT_EXCEEDED: 'Запрос превысил максимальный размер',
|
||||
HTTPRequest.Result.RESULT_BODY_DECOMPRESS_FAILED: 'Не удалось распаковать сообщение',
|
||||
HTTPRequest.Result.RESULT_REQUEST_FAILED: 'Запрос не удался',
|
||||
HTTPRequest.Result.RESULT_DOWNLOAD_FILE_CANT_OPEN: 'Невозможно открыть файл загрузки',
|
||||
HTTPRequest.Result.RESULT_DOWNLOAD_FILE_WRITE_ERROR: 'Невозможно записать в файл загрузки',
|
||||
HTTPRequest.Result.RESULT_REDIRECT_LIMIT_REACHED: 'Достигнут лимит перенаправлений',
|
||||
HTTPRequest.Result.RESULT_TIMEOUT: 'Время истекло'
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Переменные
|
||||
var http_request: HTTPRequest # HTTP клиент для выполнения запросов
|
||||
var addresses: Dictionary # Словарь с URL адресами устройств
|
||||
var current_state: State = State.IDLE # Текущее состояние машины состояний
|
||||
var current_url: String = '' # Текущий URL для запроса
|
||||
var timeout_timer: Timer # Таймер ожидания ответа (30 секунд)
|
||||
|
||||
# Результаты запросов
|
||||
var last_response_left: String = '' # Последний успешный ответ левого борта
|
||||
var last_response_right: String = '' # Последний успешный ответ правого борта
|
||||
var last_error_left: String = '' # Последняя ошибка левого борта
|
||||
var last_error_right: String = '' # Последняя ошибка правого борта
|
||||
|
||||
var timeout: float
|
||||
#endregion
|
||||
|
||||
#region Инициализация
|
||||
func _ready() -> void:
|
||||
# Создаем и настраиваем HTTP клиент
|
||||
http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(_on_request_completed)
|
||||
|
||||
# Создаем и настраиваем таймер для обработки таймаутов
|
||||
|
||||
timeout_timer = Timer.new()
|
||||
add_child(timeout_timer)
|
||||
timeout_timer.timeout.connect(_on_timeout)
|
||||
timeout_timer.one_shot = true # Таймер срабатывает только один раз
|
||||
|
||||
# Подписываемся на сигнал запуска управления устройством
|
||||
signaller.conn(signaller.start_contol_device, Callable(self, '_on_start_contol_device'))
|
||||
#endregion
|
||||
|
||||
#region Публичные методы
|
||||
# Возвращает текстовое описание кода результата HTTP запроса
|
||||
func get_result_string(result: int) -> String:
|
||||
return RESULT_STRINGS.get(result, '<неизвестный код результата HTTPRequest - %d>' % result)
|
||||
|
||||
# Геттеры для получения результатов запросов
|
||||
func get_left_response() -> String:
|
||||
return last_response_left
|
||||
|
||||
func get_right_response() -> String:
|
||||
return last_response_right
|
||||
|
||||
func get_left_error() -> String:
|
||||
return last_error_left
|
||||
|
||||
func get_right_error() -> String:
|
||||
return last_error_right
|
||||
|
||||
# Проверка успешности запросов
|
||||
func has_left_success() -> bool:
|
||||
return not last_response_left.is_empty()
|
||||
|
||||
func has_right_success() -> bool:
|
||||
return not last_response_right.is_empty()
|
||||
#endregion
|
||||
|
||||
#region Обработчики сигналов
|
||||
# Сигнал от signaller - начало управления устройством
|
||||
func _on_start_contol_device() -> void:
|
||||
# Если уже выполняется запрос - игнорируем
|
||||
if current_state != State.IDLE:
|
||||
return
|
||||
|
||||
# Сбрасываем предыдущие результаты
|
||||
last_response_left = ''
|
||||
last_response_right = ''
|
||||
last_error_left = ''
|
||||
last_error_right = ''
|
||||
|
||||
# Загружаем URL адреса из ProjectSettings
|
||||
addresses['Адрес АФСП левого борта'] = ProjectSettings.get_setting('application/config/%s' % 'Адрес АФСП левого борта')
|
||||
addresses['Адрес АФСП правого борта'] = ProjectSettings.get_setting('application/config/%s' % 'Адрес АФСП правого борта')
|
||||
timeout = float(ProjectSettings.get_setting('application/config/%s' % 'Период опроса состояния АФСП, секунды'))
|
||||
# Начинаем с запроса к левому борту
|
||||
_request_next(State.REQUESTING_LEFT)
|
||||
|
||||
# Сигнал от HTTPRequest - получен ответ на запрос
|
||||
func _on_request_completed(result: int, response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
|
||||
# Если таймаут уже сработал - игнорируем ответ
|
||||
if current_state == State.WAITING_TIMEOUT:
|
||||
return
|
||||
|
||||
# Останавливаем таймер ожидания
|
||||
timeout_timer.stop()
|
||||
|
||||
# Проверяем успешность ответа
|
||||
if response_code == 200:
|
||||
var response_text = body.get_string_from_utf8()
|
||||
_save_response(response_text)
|
||||
|
||||
# Испускаем сигнал успешного получения ответа
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('response_received_left', response_text, true)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('response_received_right', response_text, true)
|
||||
|
||||
_on_request_finished()
|
||||
else:
|
||||
var error_msg = 'HTTP ошибка %d: %s' % [response_code, get_result_string(result)]
|
||||
_save_error(error_msg)
|
||||
|
||||
# Испускаем сигнал с ошибкой
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('response_received_left', error_msg, false)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('response_received_right', error_msg, false)
|
||||
|
||||
_on_request_finished()
|
||||
|
||||
# Сигнал от таймера - истекло время ожидания ответа
|
||||
func _on_timeout() -> void:
|
||||
current_state = State.WAITING_TIMEOUT
|
||||
http_request.cancel_request() # Отменяем текущий запрос
|
||||
var timeout_msg = 'Таймаут %.1f секунд - %s' % [timeout, get_result_string(HTTPRequest.Result.RESULT_TIMEOUT)]
|
||||
_save_error(timeout_msg)
|
||||
|
||||
# Испускаем сигнал с ошибкой таймаута
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('response_received_left', timeout_msg, false)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('response_received_right', timeout_msg, false)
|
||||
|
||||
_on_request_finished()
|
||||
#endregion
|
||||
|
||||
#region Управление запросами
|
||||
# Переход к следующему запросу в очереди
|
||||
func _request_next(next_state: State) -> void:
|
||||
current_state = next_state
|
||||
|
||||
# Определяем URL для текущего состояния
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
current_url = addresses.get('Адрес АФСП левого борта', '')
|
||||
State.REQUESTING_RIGHT:
|
||||
current_url = addresses.get('Адрес АФСП правого борта', '')
|
||||
State.IDLE:
|
||||
return
|
||||
|
||||
# Проверяем, задан ли URL
|
||||
if current_url.is_empty():
|
||||
print('URL не задан для ', current_state)
|
||||
var error_msg = 'URL не задан'
|
||||
_save_error(error_msg)
|
||||
|
||||
# Испускаем сигнал с ошибкой
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('response_received_left', error_msg, false)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('response_received_right', error_msg, false)
|
||||
|
||||
_on_request_finished()
|
||||
return
|
||||
|
||||
# Испускаем сигнал отправки запроса
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('request_sent_left', current_url)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('request_sent_right', current_url)
|
||||
|
||||
# Запускаем таймер и отправляем запрос
|
||||
timeout_timer.start(timeout)
|
||||
var error = http_request.request(current_url)
|
||||
if error != OK:
|
||||
print('Ошибка запроса: ', error_string(error))
|
||||
var error_msg = 'Ошибка запроса: ' + error_string(error)
|
||||
_save_error(error_msg)
|
||||
|
||||
# Испускаем сигнал с ошибкой
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
emit_signal('response_received_left', error_msg, false)
|
||||
State.REQUESTING_RIGHT:
|
||||
emit_signal('response_received_right', error_msg, false)
|
||||
|
||||
_on_request_finished()
|
||||
|
||||
# Обработка завершения текущего запроса (успех/ошибка/таймаут)
|
||||
func _on_request_finished() -> void:
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
# После левого борта переходим к правому
|
||||
_request_next(State.REQUESTING_RIGHT)
|
||||
State.REQUESTING_RIGHT, State.WAITING_TIMEOUT:
|
||||
# После правого борта или таймаута возвращаемся в IDLE
|
||||
current_state = State.IDLE
|
||||
print('Цикл запросов завершен')
|
||||
#endregion
|
||||
|
||||
#region Сохранение результатов
|
||||
# Сохраняет успешный ответ от устройства
|
||||
func _save_response(response: String) -> void:
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
last_response_left = response
|
||||
State.REQUESTING_RIGHT:
|
||||
last_response_right = response
|
||||
|
||||
# Сохраняет ошибку от устройства
|
||||
func _save_error(error: String) -> void:
|
||||
match current_state:
|
||||
State.REQUESTING_LEFT:
|
||||
last_error_left = error
|
||||
State.REQUESTING_RIGHT:
|
||||
last_error_right = error
|
||||
#endregion
|
||||
1
scripts/rtr.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ctqcvjqjb1av3
|
||||
@@ -6,7 +6,8 @@ class_name uarep_settings extends Node
|
||||
var settings_program: Dictionary
|
||||
|
||||
var UnitProfiles: Dictionary[StringName, Array] = { \
|
||||
# < Название: Протокол, Адрес, <Порт>|[, Порт], Широковещательное, Привязывать, Комментарий >
|
||||
# < Название: [Протокол, [Параметры], Комментарий] >
|
||||
# < Название: Протокол, [Адрес, <Порт>|[, Порт], Широковещательное, Привязывать], Комментарий >
|
||||
'уарэп-яу07-частный': ['yau07rx', ['10.1.1.2', 50002, false, true], 'IP-адрес для приёма частных сообщений от ЯУ-07'],
|
||||
'уарэп-яу07-общий': ['yau07rx', ['*', 50000, true, true], 'IP-адрес для приёма широковещательных сообщений от ЯУ-07'],
|
||||
'уарэп-капсрпб': ['capsrpb', ['127.0.0.1', '127.0.0.1', 42023, 42022, false, true], 'IP-адрес для обмена сообщениями со службой \"МП550\" (СТЦ)'],
|
||||
@@ -26,6 +27,17 @@ var UnitProfiles: Dictionary[StringName, Array] = { \
|
||||
'уарэп-яу07-3к': ['yau07tx', ['10.1.1.33', 50033, false, false], 'IP-адрес прибора ПРД-К3'],
|
||||
'навигация': ['navi', ['*', 60000, true, true ], 'IP-адрес на котором принимают сообщения от навигации'],
|
||||
|
||||
# < Название: [протокол, [адрес, порт, широковещательное, привязывать], комментарий >
|
||||
'эмс-ведущий': ['iyems-rx', ['192.168.11.105', 61000, false, true], 'IP-адрес для приёма докладов от информационных ЭМС устройств'],
|
||||
'эмс-ор63': ['iyems-tx', ['192.168.11.200', 61001, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-454': ['iyems-tx', ['192.168.11.200', 61002, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-го': ['iyems-tx', ['192.168.11.200', 61003, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-рлс1': ['iyems-tx', ['192.168.11.200', 61004, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-рлс2': ['iyems-tx', ['192.168.11.200', 61005, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-ннвс': ['iyems-tx', ['192.168.11.200', 61006, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-изделие7': ['iyems-tx', ['127.0.0.1', 61007, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
'эмс-изделие8': ['iyems-tx', ['127.0.0.1', 61008, false, false], 'IP-адрес для передачи команд информационному ЭМС устройству'],
|
||||
|
||||
# < Название: Протокол, < Адрес, Порт получения >, Комментарий >
|
||||
'уарэп-5п28': ['5p28', ['127.0.0.1', 50000], 'IP-адрес комплекса 5П-28'],
|
||||
|
||||
@@ -55,7 +67,7 @@ const WIDTH_MIN: = 5.0
|
||||
const DUR_MAX: = 1000000.0
|
||||
const PERIOD_MAX: = 1000000.0
|
||||
const UM_MIN: = -5.0
|
||||
const UM_MAX: = 55.0
|
||||
const UM_MAX: = 100.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -11,6 +11,12 @@ func conn(sgnl: Signal, clbl: Callable): connect(sgnl.get_name(), clbl)
|
||||
func emmit(sgnl: Signal): emit_signal(sgnl.get_name())
|
||||
|
||||
|
||||
## Вызывается при изменении состояния входа ЭМС
|
||||
## [param id] - идентификатор входа ЭМС
|
||||
## [param state] - новое состояние входа ЭМС
|
||||
signal yems_input_changed(id: int, state: int)
|
||||
|
||||
|
||||
## Вызывается при обнаружение ошибки последовательного порта
|
||||
signal serial_error()
|
||||
|
||||
@@ -197,7 +203,7 @@ signal emit_changed(state)
|
||||
|
||||
## Вызывается при изменении детализации карты.[br]
|
||||
## [param new_scale] - обновленное значение масштаба ([b]true[/b]
|
||||
signal update_scale_map(new_scale)
|
||||
signal update_scale_map(new_scale: String)
|
||||
|
||||
|
||||
## Вызывается при изменении текущих координат.[br]
|
||||
|
||||
@@ -3,7 +3,6 @@ class_name tcp5_p28 extends Node
|
||||
## Реализация "Протокол информационного сопряжения.
|
||||
## СПО АСУ изделия МП-550 с СПО 5П-28
|
||||
|
||||
const ONLINE_TIMEOUT = 5000 ## Время ожидания пакета от 5П-28, мс.
|
||||
const BUFFER_SIZE = 2048 ## Размер приёмного буфера для датаграмм.
|
||||
|
||||
## Тип модуляции для запаковки в пакет для 5П-28.
|
||||
@@ -56,27 +55,176 @@ class TCP5P28 extends unit.Unit:
|
||||
'уарэп-яу07-4в': [8, 7],
|
||||
'уарэп-яу07-4к': [16, 15] }
|
||||
|
||||
signal data_sended()
|
||||
signal disconnected(rc: Array)
|
||||
signal connected(rc: Array)
|
||||
signal get_threats(unit: TCP5P28) ## Сигнал запрос целей.
|
||||
signal get_interfers(unit: TCP5P28) ## Запрос состояния выполнения целеуказания.
|
||||
|
||||
var tx_stack: Array ## Массив пакетов для отправки.
|
||||
var uarep_state: int = 1 ## Флаги состояния прибора, 0 бит, состояние ПО
|
||||
var uarep_line: int = 3 ## Состояние линии связи с прибором
|
||||
var ext_cu: bool = false
|
||||
var tx_queue: Array ## Очередь пакетов для отправки
|
||||
var tx_mutex: Mutex ## Мютекс для очереди передачи
|
||||
var thread: Thread ## Рабочий поток
|
||||
var tctl_mutex: Mutex ## Мютекс для управления потоком
|
||||
var tctl_run: bool ## Управление потоком
|
||||
|
||||
enum STREAM_STATE {
|
||||
IDLE,
|
||||
CONNECT,
|
||||
WAIT,
|
||||
RX_START,
|
||||
RX_DONE,
|
||||
TX_START,
|
||||
TX_DONE,
|
||||
ERROR
|
||||
}
|
||||
|
||||
|
||||
func _init(nm) -> void:
|
||||
super._init(nm)
|
||||
ext_cu = ProjectSettings.get_setting('application/config/Внешнее управление', false)
|
||||
ProjectSettings.connect('settings_changed', on_setting_changed)
|
||||
tx_mutex = Mutex.new()
|
||||
tctl_mutex = Mutex.new()
|
||||
connect('data_received', on_data_received)
|
||||
connect('data_sended', on_data_sended)
|
||||
connect('connected', on_connected)
|
||||
connect('disconnected', on_disconnected)
|
||||
init_state()
|
||||
|
||||
func on_connected(rc: Array):
|
||||
log.info('Клиент 5П-28 подключен: %s:%s' % [ rc[0], rc[1]] )
|
||||
|
||||
func on_data_sended(): pass
|
||||
|
||||
func on_data_received(data: PackedByteArray):
|
||||
var tick: = Time.get_ticks_msec()
|
||||
parse(data, tick)
|
||||
|
||||
func on_disconnected(rc: Array):
|
||||
log.info('Клиент 5П-28 отключен: %s:%s' % [ rc[0], rc[1]] )
|
||||
if online:
|
||||
online = false
|
||||
emit_signal('line_changed', self)
|
||||
tx_mutex.lock()
|
||||
tx_queue.clear()
|
||||
tx_mutex.unlock()
|
||||
|
||||
func init_state():
|
||||
for key in PR_STATE.keys():
|
||||
var unit_pribor = network.get_unit_instance(key)
|
||||
unit_pribor.connect('line_changed', Callable(self, 'pribor_line_changed').bind(key))
|
||||
|
||||
func open(host: String, port: int):
|
||||
tctl_run = true
|
||||
thread = Thread.new()
|
||||
thread.start(thread_proc.bind(host, port))
|
||||
|
||||
func close():
|
||||
tctl_mutex.lock()
|
||||
tctl_run = false
|
||||
tctl_mutex.unlock()
|
||||
|
||||
func thread_proc(host: String, port: int):
|
||||
var sock = TCPServer.new()
|
||||
var stream: = StreamPeerTCP.new()
|
||||
var fsm: = STREAM_STATE.CONNECT
|
||||
var rx_buff: PackedByteArray
|
||||
var rx_bytes: int = 0
|
||||
var head_len: int = 8 ## Длина заголовка команды.
|
||||
var len_place: int = 4 ## Номер начального байта с длинной блока данных.
|
||||
var status: = StreamPeerTCP.Status.STATUS_NONE
|
||||
var rc: = sock.listen(port, host)
|
||||
var cl_host: String
|
||||
var cl_port: int
|
||||
while true:
|
||||
stream.poll()
|
||||
var new_status = stream.get_status()
|
||||
if status != new_status:
|
||||
status = new_status
|
||||
match status:
|
||||
stream.STATUS_NONE:
|
||||
call_deferred('emit_signal', 'disconnected', [cl_host, cl_port])
|
||||
fsm = STREAM_STATE.ERROR
|
||||
stream.STATUS_CONNECTED:
|
||||
cl_host = stream.get_connected_host()
|
||||
cl_port = stream.get_connected_port()
|
||||
call_deferred('emit_signal', 'connected', [cl_host, cl_port])
|
||||
stream.STATUS_ERROR:
|
||||
fsm = STREAM_STATE.ERROR
|
||||
|
||||
if fsm == STREAM_STATE.CONNECT:
|
||||
if sock.is_connection_available(): # Проверить, если кто то пытается подключиться
|
||||
stream = sock.take_connection() # Принять соединение
|
||||
new_status = stream.get_status()
|
||||
if new_status == stream.STATUS_CONNECTED:
|
||||
fsm = STREAM_STATE.WAIT
|
||||
else:
|
||||
fsm = STREAM_STATE.ERROR
|
||||
elif fsm == STREAM_STATE.WAIT:
|
||||
if status == stream.STATUS_CONNECTED:
|
||||
fsm = STREAM_STATE.RX_START
|
||||
else:
|
||||
OS.delay_msec(50)
|
||||
fsm = STREAM_STATE.CONNECT
|
||||
elif fsm == STREAM_STATE.ERROR:
|
||||
stream.disconnect_from_host()
|
||||
fsm = STREAM_STATE.WAIT
|
||||
OS.delay_msec(1000)
|
||||
elif fsm == STREAM_STATE.IDLE:
|
||||
OS.delay_msec(50)
|
||||
fsm = STREAM_STATE.RX_START
|
||||
elif fsm == STREAM_STATE.RX_START:
|
||||
rx_buff.clear()
|
||||
rx_bytes = 0
|
||||
var sz = stream.get_available_bytes()
|
||||
if sz <= 0:
|
||||
fsm = STREAM_STATE.TX_START
|
||||
continue
|
||||
var rxd = stream.get_data(head_len)
|
||||
if rxd[0] == Error.OK:
|
||||
rx_buff.append_array(rxd[1])
|
||||
else:
|
||||
fsm = STREAM_STATE.ERROR
|
||||
continue
|
||||
var pay: = rx_buff.decode_u32(len_place)
|
||||
rx_bytes = pay + head_len
|
||||
if rx_buff.size() == rx_bytes:
|
||||
fsm = STREAM_STATE.RX_DONE
|
||||
else:
|
||||
rxd = stream.get_data(rx_bytes - rx_buff.size())
|
||||
rc = rxd[0]
|
||||
if rc == Error.OK:
|
||||
rx_buff.append_array(rxd[1])
|
||||
fsm = STREAM_STATE.RX_DONE
|
||||
else:
|
||||
fsm = STREAM_STATE.ERROR
|
||||
elif fsm == STREAM_STATE.RX_DONE:
|
||||
var rx_data: = rx_buff.duplicate()
|
||||
call_deferred('emit_signal', 'data_received', rx_data)
|
||||
fsm = STREAM_STATE.TX_START
|
||||
elif fsm == STREAM_STATE.TX_START:
|
||||
tx_mutex.lock()
|
||||
if not tx_queue.size():
|
||||
fsm = STREAM_STATE.IDLE
|
||||
tx_mutex.unlock()
|
||||
continue
|
||||
var data = tx_queue.pop_front()
|
||||
tx_mutex.unlock()
|
||||
rc = stream.put_data(data)
|
||||
if rc == Error.OK:
|
||||
fsm = STREAM_STATE.TX_DONE
|
||||
else:
|
||||
fsm = STREAM_STATE.ERROR
|
||||
elif fsm == STREAM_STATE.TX_DONE:
|
||||
call_deferred('emit_signal', 'data_sended')
|
||||
fsm = STREAM_STATE.RX_START
|
||||
|
||||
func pribor_line_changed(u, key):
|
||||
uarep_state = tools.set_bit(uarep_state, PR_STATE[key][0], u.online)
|
||||
uarep_line = tools.set_bit(uarep_state, PR_STATE[key][1], u.online)
|
||||
uarep_line = tools.set_bit(uarep_line, PR_STATE[key][1], u.online)
|
||||
|
||||
func _to_string() -> String: return String('5П-28: "%s" %s ' % [self.name, ['отключен', 'на связи'][int(online)]])
|
||||
|
||||
@@ -95,16 +243,10 @@ class TCP5P28 extends unit.Unit:
|
||||
if cmd_type == CMD_TYPE_IN and ext_cu:
|
||||
set_interfer(data)
|
||||
|
||||
func process(tick: int):
|
||||
if online and ((tick - rx_tick) > ONLINE_TIMEOUT):
|
||||
online = false
|
||||
emit_signal('line_changed', self)
|
||||
if len(tx_stack):
|
||||
tx_data = tx_stack[0]
|
||||
tx_stack.remove_at(0)
|
||||
return Error.OK
|
||||
else:
|
||||
return Error.ERR_UNAVAILABLE
|
||||
func queue_packet(packet: PackedByteArray):
|
||||
tx_mutex.lock()
|
||||
tx_queue.append(packet)
|
||||
tx_mutex.unlock()
|
||||
|
||||
func pack_threats(ths: Dictionary):
|
||||
var data = PackedByteArray()
|
||||
@@ -117,7 +259,7 @@ class TCP5P28 extends unit.Unit:
|
||||
data.append_array(get_threats_data(th, tick0))
|
||||
var data_to_send: PackedByteArray = create_header(data_len)
|
||||
data_to_send.append_array(data)
|
||||
tx_stack.append(data_to_send)
|
||||
queue_packet(data_to_send)
|
||||
|
||||
func pack_interfers(interfers: Dictionary, ecms: Dictionary):
|
||||
var data = PackedByteArray()
|
||||
@@ -141,7 +283,7 @@ class TCP5P28 extends unit.Unit:
|
||||
data.append_array(cu_data)
|
||||
var data_to_send: PackedByteArray = create_header(data_len + 4 * interfers.size())
|
||||
data_to_send.append_array(data)
|
||||
tx_stack.append(data_to_send)
|
||||
queue_packet(data_to_send)
|
||||
|
||||
func create_header(data_len: int):
|
||||
var head_data = PackedByteArray()
|
||||
@@ -210,7 +352,7 @@ class TCP5P28 extends unit.Unit:
|
||||
data_tx.encode_u16(0, err) # Код ошибки
|
||||
var data_to_send: PackedByteArray = create_header(data_len)
|
||||
data_to_send.append_array(data_tx)
|
||||
tx_stack.append(data_to_send)
|
||||
queue_packet(data_to_send)
|
||||
|
||||
func on_setting_changed():
|
||||
ext_cu = ProjectSettings.get_setting('application/config/Внешнее управление', false)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
extends Node
|
||||
## Работа с целями.
|
||||
|
||||
const MSG9_RESEND_TIMEOUT = 1.0 ## Время повторной отправки пакета 9
|
||||
const MSG9_RESEND_TIMEOUT = 3.0 ## Время повторной отправки пакета 9
|
||||
|
||||
## Режимы работы АФСП и БПО (Протокол ТНИИС-СТЦ, пункт 2.5.10)
|
||||
enum AFSP_BPO_MODE {
|
||||
@@ -217,10 +217,7 @@ func send_msg9(unit_caps):
|
||||
|
||||
|
||||
func on_timer_msg9(unit_caps, timer_msg9):
|
||||
if bpo_mode != bpo_mode_rx:
|
||||
send_msg9(unit_caps)
|
||||
else:
|
||||
timer_msg9.stop()
|
||||
send_msg9(unit_caps)
|
||||
|
||||
|
||||
func on_caps_line_changed(unit_caps, timer_msg9):
|
||||
|
||||
@@ -156,7 +156,8 @@ func map_dec_to_rad(pos0: Vector2, pos: Vector2) -> Vector2:
|
||||
## [param p] - Координаты вершин полигона.[br]
|
||||
func is_point_in_polygon(pos: Vector2, p: PackedVector2Array) -> bool:
|
||||
var sz: = p.size()
|
||||
assert(sz)
|
||||
if not sz:
|
||||
return false
|
||||
var j: int = sz - 1
|
||||
var odd_nodes: int = 0
|
||||
for i in sz:
|
||||
|
||||
@@ -25,6 +25,6 @@ class Unit extends Object:
|
||||
var rx_tick: int = 0 ## Тик-время последнего приёма данных
|
||||
var online: bool = false ## Состояние подключения устройства
|
||||
var name: StringName = '<без имени>' ## Уникальное имя устройства
|
||||
func _init(nm) -> void: self.name = nm
|
||||
func _init(nm: StringName) -> void: self.name = nm
|
||||
func _to_string() -> String:
|
||||
return String('Unit(\"%s\", %s)' % [self.name, 'на связи' if online else 'отключен'])
|
||||
|
||||
38
scripts/yemstg.gd
Normal file
@@ -0,0 +1,38 @@
|
||||
extends Node
|
||||
|
||||
|
||||
class YeMSTG extends unit.Unit:
|
||||
static var json_conv: = JSON.new()
|
||||
var online_timeout: float = 5000 ## Должен быть равен наибольшему времени дотоверности из всех кластеров
|
||||
var info: = Dictionary() ## Доклад о состоянии
|
||||
var cmd: = Dictionary() ## Команда
|
||||
var cnt: int = 0 ## Счётчик отправленных пакетов
|
||||
|
||||
func _init(unit_name) -> void:
|
||||
super._init(unit_name)
|
||||
cmd_state = CmdState.DONE
|
||||
|
||||
func parse(data: PackedByteArray, now_tick: int):
|
||||
self.rx_tick = now_tick
|
||||
if not online:
|
||||
online = true
|
||||
emit_signal('line_changed', self)
|
||||
var utf8_data: = data.get_string_from_utf8()
|
||||
if Error.OK == json_conv.parse(utf8_data):
|
||||
info.merge(json_conv.get_data(), true)
|
||||
emit_signal('data_received', info)
|
||||
else:
|
||||
var msg: = json_conv.get_error_message()
|
||||
emit_signal('parse_error', self, msg)
|
||||
|
||||
func process(now_tick: int):
|
||||
if online and ((now_tick - rx_tick) > online_timeout):
|
||||
online = false
|
||||
emit_signal('line_changed', self)
|
||||
var rc = Error.ERR_BUSY
|
||||
if cmd_state == CmdState.SEND:
|
||||
tx_data = JSON.stringify(cmd).to_utf8_buffer()
|
||||
tx_len = tx_data.size()
|
||||
cmd_state = CmdState.DONE
|
||||
rc = Error.OK
|
||||
return rc
|
||||
1
scripts/yemstg.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bst5wk3otwwai
|
||||
@@ -173,4 +173,4 @@
|
||||
false,
|
||||
true
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://bvbvtgwps54yr"]
|
||||
|
||||
[node name="Editl" type="LineEdit"]
|
||||
offset_right = 59.875
|
||||
offset_bottom = 33.0
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.5
|
||||
60
table/header-image.tscn
Normal file
@@ -0,0 +1,60 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cymcld4mjmlhj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c73tjrn8gr00o" path="res://data/Передатчик.png" id="1_nbmfn"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_63652"]
|
||||
script/source = "extends GridContainer
|
||||
|
||||
@export var text: String:
|
||||
set(val):
|
||||
text = val
|
||||
if is_inside_tree():
|
||||
$label.text = val
|
||||
get:
|
||||
return text
|
||||
|
||||
|
||||
@export_file var image_file: String:
|
||||
set(val):
|
||||
image_file = val
|
||||
if is_inside_tree():
|
||||
$image.texture = load(val)
|
||||
get:
|
||||
return image_file
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if ResourceLoader.exists(image_file):
|
||||
$image.texture = load(image_file)
|
||||
$label.text = text
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nbmfn"]
|
||||
bg_color = Color(0.741395, 0.468103, 0.328942, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[node name="header-image" type="GridContainer"]
|
||||
offset_right = 100.0
|
||||
offset_bottom = 19.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 2
|
||||
script = SubResource("GDScript_63652")
|
||||
|
||||
[node name="image" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("1_nbmfn")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nbmfn")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dwphmxstaxn4v"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dwphmxstaxn4v"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yign5"]
|
||||
bg_color = Color(0.117647, 0.117647, 0.117647, 0.85098)
|
||||
@@ -9,8 +9,29 @@ corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_dhnrx"]
|
||||
script/source = "extends Label
|
||||
|
||||
static var styles: = [null, null]
|
||||
static var init_done: = false
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
if init_done:
|
||||
init_done = true
|
||||
var style_light: = get_theme_stylebox('normal')
|
||||
style_light.bg_color = Color.GRAY
|
||||
styles[1] = style_light
|
||||
var style_dark: = style_light.duplicate(true)
|
||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||
styles[0] = style_dark
|
||||
"
|
||||
|
||||
[node name="Lable" type="Label"]
|
||||
offset_right = 104.0
|
||||
offset_bottom = 27.0
|
||||
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_yign5")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = SubResource("GDScript_dhnrx")
|
||||
|
||||
@@ -1,4 +1,34 @@
|
||||
[gd_scene format=3 uid="uid://c1i4rwaajq7d5"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c1i4rwaajq7d5"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_eegm3"]
|
||||
script/source = "extends LineEdit
|
||||
|
||||
static var styles: = [null, null]
|
||||
static var init_done: = false
|
||||
|
||||
func _init() -> void:
|
||||
if not init_done:
|
||||
init_done = true
|
||||
var style_light: = get_theme_stylebox('read_only')
|
||||
style_light.bg_color = Color.GRAY
|
||||
styles[1] = style_light
|
||||
var style_dark: = style_light.duplicate(true)
|
||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||
styles[0] = style_dark
|
||||
ProjectSettings.connect('settings_changed', apply_colors)
|
||||
apply_colors()
|
||||
|
||||
|
||||
func apply_colors():
|
||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||
add_theme_color_override('font_color_readonly', Color.BLACK)
|
||||
add_theme_color_override('font_color_placeholder', Color(0, 0, 0, 0.5))
|
||||
add_theme_stylebox_override('read_only', styles[1])
|
||||
else:
|
||||
add_theme_color_override('font_color_readonly', Color('#D8731A')) # тёмно-оранжевый
|
||||
add_theme_color_override('font_color_placeholder', Color(1, 1, 1, 0.5))
|
||||
add_theme_stylebox_override('read_only', styles[0])
|
||||
"
|
||||
|
||||
[node name="Label" type="LineEdit"]
|
||||
offset_right = 121.0
|
||||
@@ -8,3 +38,4 @@ editable = false
|
||||
context_menu_enabled = false
|
||||
caret_blink = true
|
||||
caret_blink_interval = 0.1
|
||||
script = SubResource("GDScript_eegm3")
|
||||
|
||||
@@ -1,22 +1,68 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dgidt8lifm7xe"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dgidt8lifm7xe"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="2_wrw87"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f4oye"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_kvru5"]
|
||||
script/source = "extends LineEdit
|
||||
|
||||
static var styles: = [null, null]
|
||||
static var init_done: = false
|
||||
|
||||
var checkbutton_material: Material
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
if not init_done:
|
||||
init_done = true
|
||||
var style_light: = get_theme_stylebox('read_only')
|
||||
style_light.bg_color = Color.GRAY
|
||||
styles[1] = style_light
|
||||
var style_dark: = style_light.duplicate(true)
|
||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||
styles[0] = style_dark
|
||||
ProjectSettings.connect('settings_changed', on_setting_changed)
|
||||
call_deferred('on_setting_changed')
|
||||
|
||||
|
||||
func on_setting_changed():
|
||||
checkbutton_material = $CheckButton.material
|
||||
apply_colors()
|
||||
|
||||
|
||||
func apply_colors():
|
||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||
add_theme_stylebox_override('read_only', styles[1])
|
||||
$CheckButton.material = null
|
||||
else:
|
||||
add_theme_stylebox_override('read_only', styles[0])
|
||||
$CheckButton.material = checkbutton_material
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wrw87"]
|
||||
shader = ExtResource("2_wrw87")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_t3fqw"]
|
||||
|
||||
[sub_resource type="Theme" id="Theme_odxqp"]
|
||||
CheckButton/styles/focus = SubResource("StyleBoxEmpty_t3fqw")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kvru5"]
|
||||
|
||||
[node name="LineEdit" type="LineEdit"]
|
||||
offset_right = 85.0
|
||||
offset_bottom = 27.0
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_f4oye")
|
||||
editable = false
|
||||
script = SubResource("GDScript_kvru5")
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
material = SubResource("ShaderMaterial_wrw87")
|
||||
layout_mode = 0
|
||||
offset_left = 21.0
|
||||
offset_top = 1.0
|
||||
offset_right = 65.0
|
||||
offset_bottom = 25.0
|
||||
theme = SubResource("Theme_odxqp")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_kvru5")
|
||||
|
||||
@@ -1,32 +1,75 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://5rw652cmnybi"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://5rw652cmnybi"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="1_anyuq"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7hsq1"]
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_il5wc"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xxfw6"]
|
||||
[sub_resource type="GDScript" id="GDScript_vuu0m"]
|
||||
script/source = "extends LineEdit
|
||||
|
||||
static var styles = [[null, null], [null, null]]
|
||||
static var init_done: = false
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
if not init_done:
|
||||
init_done = true
|
||||
var style_0_light = get_theme_stylebox('normal')
|
||||
var style_1_light = get_theme_stylebox('read_only')
|
||||
|
||||
style_0_light.bg_color = Color(0.12, 0.12, 0.12)
|
||||
style_1_light.bg_color = Color(0.12, 0.12, 0.12)
|
||||
styles[1][0] = style_0_light
|
||||
styles[1][1] = style_1_light
|
||||
|
||||
var style_0_dark = style_0_light.duplicate(true)
|
||||
var style_1_dark = style_1_light.duplicate(true)
|
||||
|
||||
style_0_light.bg_color = Color.GRAY
|
||||
style_1_light.bg_color = Color.GRAY
|
||||
styles[0][0] = style_0_dark
|
||||
styles[0][1] = style_1_dark
|
||||
ProjectSettings.connect('settings_changed', apply_colors)
|
||||
apply_colors()
|
||||
|
||||
|
||||
func apply_colors():
|
||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||
add_theme_color_override('font_color', Color.BLACK)
|
||||
add_theme_color_override('font_uneditable_color', Color.BLACK)
|
||||
add_theme_stylebox_override('normal', styles[1][0])
|
||||
add_theme_stylebox_override('read_only', styles[1][1])
|
||||
else:
|
||||
add_theme_color_override('font_color', Color(1.0, 0.596, 0.4))
|
||||
add_theme_color_override('font_uneditable_color', Color(1.0, 0.596, 0.4))
|
||||
add_theme_stylebox_override('normal', styles[0][0])
|
||||
add_theme_stylebox_override('read_only', styles[0][1])
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8lkgc"]
|
||||
shader = ExtResource("1_anyuq")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_y8485"]
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8lkgc"]
|
||||
|
||||
[node name="LineEdit" type="LineEdit"]
|
||||
offset_right = 950.0
|
||||
offset_bottom = 27.0
|
||||
theme_override_colors/font_uneditable_color = Color(1, 0.596078, 0.4, 1)
|
||||
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_7hsq1")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_il5wc")
|
||||
editable = false
|
||||
context_menu_enabled = false
|
||||
shortcut_keys_enabled = false
|
||||
middle_mouse_paste_enabled = false
|
||||
selecting_enabled = false
|
||||
deselect_on_focus_loss_enabled = false
|
||||
script = SubResource("GDScript_vuu0m")
|
||||
|
||||
[node name="CheckButton" type="CheckButton" parent="."]
|
||||
material = SubResource("ShaderMaterial_xxfw6")
|
||||
material = SubResource("ShaderMaterial_8lkgc")
|
||||
layout_mode = 0
|
||||
offset_left = 453.0
|
||||
offset_top = 1.5
|
||||
offset_right = 497.0
|
||||
offset_bottom = 25.5
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_y8485")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_8lkgc")
|
||||
|
||||