Changed to vehicle sensor instead of single sensor types

This commit is contained in:
2026-07-04 23:49:20 -06:00
parent 55522fc6fc
commit 10e9a0f5df
147 changed files with 523 additions and 8763 deletions
+4 -6
View File
@@ -3,19 +3,17 @@ class_name SpeedWidgetNode
var K2MI = 0.6213712
var speed_kmh: float
var speed_mph: float
var label_node: Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
label_node = get_node("VBoxContainer/SpeedLabel")
SensorSignals.speed_updated.connect(_on_speed_updated)
func _on_speed_updated(ip_address: String, pnt_speed_kmh: float):
speed_kmh = pnt_speed_kmh
speed_mph = speed_kmh * K2MI
func _update_data():
if label_node == null:
return
var speed_mph = host_vehicle.speed_kmh * K2MI
var display_speed: int = 0
if speed_mph >= 1:
display_speed = int(round(speed_mph))