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
@@ -8,11 +8,12 @@ var label: Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
SensorSignals.pitch_updated.connect(_on_pitch_updated)
sprite = get_node("Sprite2D")
label = get_node("Label")
var label_size = label.size
func _on_pitch_updated(sensor_ip: String, pitch_rad: float):
sprite.rotation = pitch_rad
label.text = str(round(rad_to_deg(pitch_rad)*10)/10) + " \u00B0"
func _update_data():
if sprite == null or label == null:
return
sprite.rotation = host_vehicle.pitch_rad
label.text = str(round(rad_to_deg(host_vehicle.pitch_rad)*10)/10) + " \u00B0"
+5 -4
View File
@@ -7,11 +7,12 @@ var label: Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
SensorSignals.roll_updated.connect(_on_roll_updated)
sprite = get_node("Sprite2D")
label = get_node("Label")
var label_size = label.size
func _on_roll_updated(sensor_ip: String, roll_rad: float):
sprite.rotation = roll_rad
label.text = str(round(rad_to_deg(abs(roll_rad))*10)/10) + " \u00B0"
func _update_data():
if sprite == null or label == null:
return
sprite.rotation = host_vehicle.roll_rad
label.text = str(abs(round(rad_to_deg(host_vehicle.roll_rad)*10)/10)) + " \u00B0"