diff --git a/scenes/tilemap/tilemap.gd b/scenes/tilemap/tilemap.gd index 3b8838f6..3920258b 100644 --- a/scenes/tilemap/tilemap.gd +++ b/scenes/tilemap/tilemap.gd @@ -161,7 +161,7 @@ func _map_request_completed(result, response_code, headers, data): var lat_c = (bounds.north + bounds.south) / 2.0 var sx: float = float(map_tile.size.x) / (bounds.east - bounds.west) * (lng_c - tile.lng) + map_tile.size.x / 2.0 # Cмещение в пискселях центра плитки от заданной точки по горизонтали. var sy: float = float(map_tile.size.y) / (bounds.north - bounds.south) * (lat_c - tile.lat) - map_tile.size.y / 2.0 # Cмещение в пискселях центра плитки от заданной точки по вертикали. - var dst_pos: Vector2i = Vector2i(sx, -sy) + map_tile.size * map_mode + var dst_pos: Vector2i = Vector2i(int(sx), int(-sy)) + map_tile.size * map_mode img_tile_to_map_image(img_tile, dst_pos) root_rect = Rect2i(dst_pos.x, dst_pos.y, tile.x, tile.y) else: diff --git a/scripts/modbus.gd b/scripts/modbus.gd index befdea15..b7fe105d 100644 --- a/scripts/modbus.gd +++ b/scripts/modbus.gd @@ -106,7 +106,7 @@ class ModbusClient: func write(addr: int, data: Array) -> bool: if cmd_state != CmdState.DONE: return false var json_dict = {'code': 'write', 'data': [addr] + data} - tx_data = json_conv.stringify(json_dict).to_utf8_buffer() + tx_data = JSON.stringify(json_dict).to_utf8_buffer() cmd_state = CmdState.SEND return true @@ -116,7 +116,7 @@ class ModbusClient: func read_holdind(addr: int, count: int = 1) -> bool: if cmd_state != CmdState.DONE: return false var json_dict = {'code': 'read_holding', 'data': [addr, count]} - tx_data = json_conv.stringify(json_dict).to_utf8_buffer() + tx_data = JSON.stringify(json_dict).to_utf8_buffer() cmd_state = CmdState.SEND return true @@ -126,6 +126,6 @@ class ModbusClient: func read_input(addr: int, count: int = 1) -> bool: if cmd_state != CmdState.DONE: return false var json_dict = {'code': 'read_input', 'data': [addr, count]} - tx_data = json_conv.stringify(json_dict).to_utf8_buffer() + tx_data = JSON.stringify(json_dict).to_utf8_buffer() cmd_state = CmdState.SEND return true diff --git a/scripts/tcp5p28.gd b/scripts/tcp5p28.gd index 794fe234..cc7811bf 100644 --- a/scripts/tcp5p28.gd +++ b/scripts/tcp5p28.gd @@ -185,7 +185,6 @@ class TCP5P28: func on_interfer_accept(err: bool): var data_tx = PackedByteArray() var data_len = 2 # длинна блока данных в байтах - var tick = Time.get_ticks_msec() data_tx.resize(data_len) data_tx.encode_u16(0, err) # Код ошибки var data_to_send: PackedByteArray = create_header(data_len) diff --git a/table/table.gd b/table/table.gd index 86fb1ca6..9d9363d1 100644 --- a/table/table.gd +++ b/table/table.gd @@ -518,8 +518,8 @@ func connect_columns(dest_node: Node, event_name: String, callback: String, clmn assert(i_col >= 0 and i_col < columns, 'ошибка: нет такой колонки: %d' % i_col) var node = get_node2(i_col, i_row) if node.has_meta(META_CALLABLE): - var conn = node.get_meta(META_CALLABLE) - node.disconnect(event_name, conn) + var conn_prev = node.get_meta(META_CALLABLE) + node.disconnect(event_name, conn_prev) var conn = Callable(dest_node, callback).bind([node] + user_data) var rc = node.connect(event_name, conn) if rc == Error.OK: