diff --git a/scenes/эмс/эмс.gd b/scenes/эмс/эмс.gd index ece1cdb..650d777 100644 --- a/scenes/эмс/эмс.gd +++ b/scenes/эмс/эмс.gd @@ -43,7 +43,7 @@ func init_boards(): g_boards['КЭМС-Б'] = yemsboards.EmsBoard.new(0, 0x130, yemsconsts.INPUT_KEMS, yemsconsts.OUTPUT_KEMS) g_boards['ЭМС-Б1'] = yemsboards.EmsBoard.new(1, 0x110, yemsconsts.INPUT_EMS1, yemsconsts.OUTPUT_EMS1) g_boards['ЭМС-Б2'] = yemsboards.EmsBoard.new(2, 0x120, yemsconsts.INPUT_EMS2, yemsconsts.OUTPUT_EMS2) - + init_tbl_in() $scrollin/tbl_in.pin_header($scrollin, self) init_tbl_out() @@ -52,7 +52,7 @@ func init_boards(): $scrl_out_set/tbl_out_set.pin_header($scrl_out_set, self) init_tbl_files() $scrl_files/tbl_files.pin_header($scrl_files, self) - + var unit_key = repsettings.get_unit_key('уарэп-эмс') var unit = repnetwork.units[unit_key] unit.connect('data_received', Callable(self, 'on_data_ems_received')) @@ -60,7 +60,7 @@ func init_boards(): $btn_disconnect.connect('pressed', Callable(self, 'on_btn_disconnect')) $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)) - + ## Обработчик нажатия кнопки disconnect. @@ -374,4 +374,4 @@ func on_row_pressed(i_row: int, tbl): func on_data_ems_received(unit): print_debug(unit.status) - + diff --git a/scripts/tools.gd b/scripts/tools.gd index beeee06..7a3b336 100644 --- a/scripts/tools.gd +++ b/scripts/tools.gd @@ -74,7 +74,6 @@ func get_string_slice(s_in: String, s_out: Array, i0: int, i1: int): func pos_calc(freq: float, aoa: float, pos0: Vector2, r0: float, r1: float, f0: float, f1: float): var r = remap(freq, f0, f1, r0, r1) var aoa_rad = radians(aoa) - PI / 2.0 - return Vector2(cos(aoa_rad), sin(aoa_rad)) * r + pos0 @@ -112,11 +111,6 @@ func map_dec_to_rad(pos0: Vector2, pos: Vector2) -> Vector2: return Vector2(ang + 360.0 * float(ang < 0.0), hypot(x1, y1)) -## Переводит значение val из диапазона a0...a1 в диапазон b0...b1. -func map_range(val: float, a0: float, a1: float, b0: float, b1: float) -> float: - return (((val - a0) * (b1 - b0)) / (a1 - a0)) + b0 - - ## Возвращает [b]true[/b], если точка внутри заданного полигона.[br] ## [param pos] - Проверяемая точка.[br] ## [param p] - Координаты вершин полигона.[br] diff --git a/scripts/unit.gd b/scripts/unit.gd index 3e46652..099722c 100644 --- a/scripts/unit.gd +++ b/scripts/unit.gd @@ -1,7 +1,6 @@ class_name base_unit extends Node ## Базовый класс для управления подключаемыми устройствами - class Unit: signal line_changed(unit) ## Вызывается при изменение состояния связи signal command_done(unit) ## Вызывается после выполнения команды.