Compare commits

...

9 Commits

6 changed files with 38 additions and 2 deletions

2
generate-sertificate.sh Normal file
View File

@@ -0,0 +1,2 @@
#openssl req -x509 -newkey rsa:4096 -keyout key.pem -nodes -out cert.pem -sha256 -days 365 -subj "/C=RU/ST=NTC/L=TNIIS/O=Company Name/OU=Org/CN=www.example.com"
openssl req -new -x509 -keyout "html/server.pem" -out "html/server.pem" -days 365 -nodes

17
https-server.py Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
from http import server # Python 3
import ssl
import os
class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if __name__ == '__main__':
html_dir = os.path.join(os.path.dirname(__file__), 'html')
os.chdir(html_dir)
srv = server.HTTPServer(('', 8000), MyHTTPRequestHandler)
sdc = ssl.create_default_context()
srv.serve_forever()

View File

@@ -6,6 +6,10 @@ var selected: bool
func set_track_visible(value: bool): $track.visible = value
## Задаёт цвет точки
func set_bip_color(val: Color): $bip.set_instance_shader_parameter('color', val)
## Присваивает заданное значение видимости индикатору выполнения.
func set_ecm_visible(value: bool): $ecm_done.visible = value

View File

@@ -253,9 +253,10 @@ func map_threat_to_bip(th: threats.Threat, bip: Control) -> bool:
## Обработчик сигнала обновления цели.
func on_threat_update(th):
func on_threat_update(th: threats.Threat):
var bip = get_node('%d' % th.id)
bip.update(th.tick_rx)
bip.set_bip_color(Color.CORAL if th.proto else Color.WHITE)
bip.visible = map_threat_to_bip(th, bip)

View File

@@ -379,8 +379,8 @@ texture_normal = ExtResource("14_ggrwd")
[connection signal="drag_continue" from="." to="." method="_on_drag_continue"]
[connection signal="toggled" from="btn_view" to="." method="on_button_view_toggled"]
[connection signal="toggled" from="chk_auto" to="." method="on_value_changed"]
[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate_toggled"]
[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate"]
[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate_toggled"]
[connection signal="toggled" from="btn_center" to="." method="on_btn_center_toggled"]
[connection signal="button_down" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_down"]
[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_button_up"]

12
uarep-ctl.linux.x86_64 Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
DATE_TIME=$(date "+%F %H-%M-%S")
LOG_PATH="/home/${USER}/$(basename "$0")-${DATE_TIME}.log" # Путь к файлу журнала.
# { Вывод этого скрипта в файл журнала и консоль одновременно
# shellcheck disable=SC2015,SC2086
test $1 = x$'\x00' && shift || { set -o pipefail ; ( exec 2>&1 ; $0 $'\x00' "$@" ) | tee "${LOG_PATH}" ; exit $? ; }
# }
/opt/uarep-ctl/bin/uarep-ctl.linux.x86_64 -f -t --screen 1