From 897ac024a5cbd0658b8970acc3c930c3e2e40c0d Mon Sep 17 00:00:00 2001 From: shurongsen <1799096798@qq.com> Date: Wed, 25 Dec 2024 11:56:12 +0800 Subject: [PATCH] add --- .DS_Store | Bin 8196 -> 8196 bytes Robo-Bus-A31-HMI/.DS_Store | Bin 10244 -> 10244 bytes Robo-Bus-A31-HMI/Modules/data_panel.gd | 5 +++ Robo-Bus-A31-HMI/Modules/data_panel.tscn | 1 + Robo-Bus-A31-HMI/code/main.gd | 39 +++++++++++------- Robo-Bus-A31-HMI/common/websocket.gd | 4 +- Robo-Bus-A31-HMI/control.tscn | 1 + Robo-Bus-A31-HMI/pad_hmi_ui/Main3DVehicle.gd | 2 + .../information/information/.DS_Store | Bin 0 -> 6148 bytes .../pad_hmi_ui/setting/setting/.DS_Store | Bin 0 -> 6148 bytes Robo-Bus-A31-HMI/project.godot | 3 +- 11 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 Robo-Bus-A31-HMI/pad_hmi_ui/information/information/.DS_Store create mode 100644 Robo-Bus-A31-HMI/pad_hmi_ui/setting/setting/.DS_Store diff --git a/.DS_Store b/.DS_Store index 52091c1f255dd8bc164e57bea0226b9d5b2720dd..d7c0f14f8e222e2cc949178a2101f0c35c467df8 100644 GIT binary patch delta 20 bcmZp1XmQwZP>|iwz(_~I(tPs?K^r~*M^Oeh delta 20 bcmZp1XmQwZP>|i&)KW*m)ME1qK^r~*N6-dB diff --git a/Robo-Bus-A31-HMI/.DS_Store b/Robo-Bus-A31-HMI/.DS_Store index 85f9cfd76fb0b325b951353e99aefd3e72ac6d41..418ca8b02cfdbffdad7ef2699beafb65c2a16d94 100644 GIT binary patch delta 87 zcmZn(XbG6$C7U^hRb%4QycgN&Rk49N`n3@Hq$lN&`EI1G&qbrej@Ehlq|+Ka-a k%7TmXa`N-i85kHCH=hy=<=xD#@QY<~tcc2HTao)r00fm6-T(jq delta 37 tcmZn(XbG6$I9U^hRb(q void: + OnClick3DVehicle.emit() + pass # Replace with function body. diff --git a/Robo-Bus-A31-HMI/Modules/data_panel.tscn b/Robo-Bus-A31-HMI/Modules/data_panel.tscn index ba657c4..091eb98 100644 --- a/Robo-Bus-A31-HMI/Modules/data_panel.tscn +++ b/Robo-Bus-A31-HMI/Modules/data_panel.tscn @@ -769,6 +769,7 @@ layout_mode = 2 theme_override_font_sizes/font_size = 25 text = "长通集团南" +[connection signal="on_click" from="MediumMenu/VBoxContainer/CarInfoDisplay/3DVehicle" to="." method="_on_d_vehicle_on_click"] [connection signal="drag_ended" from="RightMenu/VBoxContainer/MarginContainer5/HSlider" to="RightMenu/VBoxContainer/MarginContainer5/HSlider" method="_on_drag_ended"] [editable path="RightMenu/VBoxContainer/VolumeSettings"] diff --git a/Robo-Bus-A31-HMI/code/main.gd b/Robo-Bus-A31-HMI/code/main.gd index 76e53b0..12c8c14 100644 --- a/Robo-Bus-A31-HMI/code/main.gd +++ b/Robo-Bus-A31-HMI/code/main.gd @@ -7,7 +7,7 @@ extends BaseControl @onready var main_3d_vehicle_background: NinePatchRect = %Main3DVehicleBackground @onready var main_3d_vehicle_information: MarginContainer = %Main3DVehicleInformation @onready var _3d_vehicle_information: MarginContainer = %"3DVehicleInformation" -@onready var pretend_main_3d_vehicle_information: MarginContainer = %PretendMain3DVehicleInformation +@onready var pretend_main_3d_vehicle_information: MarginContainer var isVolumeSettings = false: set(value): isVolumeSettings = value @@ -15,6 +15,12 @@ var isVolumeSettings = false: isVolumeSettings = false # Called when the node enters the scene tree for the first time. func _ready() -> void: + pretend_main_3d_vehicle_information = find_child("PretendMain3DVehicleInformation") + main_3d_vehicle_background = find_child("Main3DVehicleBackground") + main_3d_vehicle_information = find_child("Main3DVehicleInformation") + _3d_vehicle_information = find_child("3DVehicleInformation") + main_3d_vehicle_texture = find_child("Main3DVehicleTexture") + #Engine.time_scale = 0.01 pass # Replace with function body. @@ -25,6 +31,24 @@ func _process(delta: float) -> void: func OnClick3DVehicle(_node: Variant) -> void: + + #main_3d_vehicle.self_modulate.a = 1 + + pass # Replace with function body."" +@onready var dic = { + "Home":%DataPanel, + "VehicleInformation":%Information, + "SetUp":%Setting +} + +func _on_tabs_onclick(State: Variant) -> void: + for node in dic.values(): + node.visible = false + dic[State].visible = true + pass # Replace with function body. + + +func _on_data_panel_on_click_3d_vehicle() -> void: if !isVolumeSettings: isVolumeSettings = true main_3d_vehicle.visible = true @@ -58,17 +82,4 @@ func OnClick3DVehicle(_node: Variant) -> void: await get_tree().create_timer(0.1).timeout _3d_vehicle_information.modulate.a = 1 data_panel.visible = false - #main_3d_vehicle.self_modulate.a = 1 - - pass # Replace with function body."" -@onready var dic = { - "Home":%DataPanel, - "VehicleInformation":%Information, - "SetUp":%Setting -} - -func _on_tabs_onclick(State: Variant) -> void: - for node in dic.values(): - node.visible = false - dic[State].visible = true pass # Replace with function body. diff --git a/Robo-Bus-A31-HMI/common/websocket.gd b/Robo-Bus-A31-HMI/common/websocket.gd index dcf5b16..5536532 100644 --- a/Robo-Bus-A31-HMI/common/websocket.gd +++ b/Robo-Bus-A31-HMI/common/websocket.gd @@ -11,8 +11,8 @@ var socket = WebSocketPeer.new() var last_state = WebSocketPeer.STATE_CLOSED # 默认URL -var default_url = "ws://192.168.4.88:9091"#本地 -#var default_url = "ws://100.86.230.57:9090"#工作站 +#var default_url = "ws://192.168.4.88:9091"#本地 +var default_url = "ws://100.86.230.57:9090"#工作站 #var default_url = "ws://100.118.150.125:9090"#真机 # 信号 diff --git a/Robo-Bus-A31-HMI/control.tscn b/Robo-Bus-A31-HMI/control.tscn index 6fbfbb2..92c9e1b 100644 --- a/Robo-Bus-A31-HMI/control.tscn +++ b/Robo-Bus-A31-HMI/control.tscn @@ -224,3 +224,4 @@ mouse_filter = 2 environment = ExtResource("14_ndify") [connection signal="Onclick" from="MarginContainer/HBoxContainer/Title/Tabs" to="MarginContainer" method="_on_tabs_onclick"] +[connection signal="OnClick3DVehicle" from="MarginContainer/HBoxContainer/MarginContainer/DataPanel" to="MarginContainer" method="_on_data_panel_on_click_3d_vehicle"] diff --git a/Robo-Bus-A31-HMI/pad_hmi_ui/Main3DVehicle.gd b/Robo-Bus-A31-HMI/pad_hmi_ui/Main3DVehicle.gd index 0e2a15c..0e1d99a 100644 --- a/Robo-Bus-A31-HMI/pad_hmi_ui/Main3DVehicle.gd +++ b/Robo-Bus-A31-HMI/pad_hmi_ui/Main3DVehicle.gd @@ -5,6 +5,8 @@ extends BaseControl @onready var main_3d_vehicle_information: MarginContainer = %Main3DVehicleInformation @onready var main_3d_vehicle_background: NinePatchRect = %Main3DVehicleBackground func _ready() -> void: + %Main3DVehicleTexture.texture = Global.EgoVehicle3D.MainSubGetTexture() + Websocket.connected_to_server.connect(connected_to_server) Websocket.message_received.connect(message_received) func connected_to_server(): diff --git a/Robo-Bus-A31-HMI/pad_hmi_ui/information/information/.DS_Store b/Robo-Bus-A31-HMI/pad_hmi_ui/information/information/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..742f27bd3243a7f908e2bed64150f0a49e3a61b8 GIT binary patch literal 6148 zcmeHKJ5B>J5S*L+#i)o3S6veiz67$?xTY6+rl;+&f2b7tjYG2bjs{xN z74&TVyJ5eBPl&mL_HQb%zT#Jn_){f*)vnKnMtr0GWL=40x9jWrk7w&gdPp!33MB<7V5ZI$j06MadEYxZKBsSu*V=s OxCkgA(F6lOz`#4O5KHg? literal 0 HcmV?d00001 diff --git a/Robo-Bus-A31-HMI/pad_hmi_ui/setting/setting/.DS_Store b/Robo-Bus-A31-HMI/pad_hmi_ui/setting/setting/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2ebe6ff118c2851fab3010b90c847e9281f05413 GIT binary patch literal 6148 zcmeHKu};J=47JM*1(q8b^8+B=9WY1LF)%Z+p#zDf;#gqLPw;pA2O~Vk)25(ZC!!WE*z98{n5>JBtg*-ekn=fC=#d`i{<7cRj@TafiwelI zYpJIN9mBsozfHg0U`<|(Yk2pb4YN=Fvci9>@K1^$%+JX>F_JKU1>*3r#LuMO}U pxR~&g;w}Y~+={`KR(u4{hIo((Fd8OBL}30SkY(_}75G&JJ^)=cjN||S literal 0 HcmV?d00001 diff --git a/Robo-Bus-A31-HMI/project.godot b/Robo-Bus-A31-HMI/project.godot index b819725..cc2dbf4 100644 --- a/Robo-Bus-A31-HMI/project.godot +++ b/Robo-Bus-A31-HMI/project.godot @@ -33,4 +33,5 @@ pointing/emulate_touch_from_mouse=true [rendering] -renderer/rendering_method="mobile" +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility"