extends HBoxContainer


"""
offset | size   | type | description
4      | 1 byte | bool | peer provides datetime
5      | 1 byte | bool | peer provides gps
6      | 1 byte | bool | peer provides accelerometer
7     | 1 byte | bool | peer provides gyroscope
8     | 1 byte | bool | peer provides magnetometer
9     | 1 byte | bool | peer provides euler orientation
10     | 1 byte | bool | peer provides quaternion orientation
"""
var data_labels = ["Date Time", "PNT", "Accel", "Gyro", "Magnet", "Euler", "Quat"]

var provided_data: Array = [0, 0, 0, 0, 0, 0, 0]
var data_columns: Array

@export var data_column_scene: PackedScene

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	_setup_data_columns()

func _setup_data_columns():
	for i in range(provided_data.size()):
		var column_instance = data_column_scene.instantiate()
		column_instance.get_node('DataLabel').text = data_labels[i]
		if provided_data[i] == 0:
			column_instance.get_node('DataValue').text = "False"
		else:
			column_instance.get_node('DataValue').text = "True"

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass

func set_provided_data(incoming_provided_data):
	provided_data = incoming_provided_data
