From 3542231987991ddbe0afedb9bc011f1711ad71ed Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Thu, 10 Apr 2025 09:43:37 +0200 Subject: [PATCH] update --- ant/src/ant/channel/channel.cpp | 4 ++-- ant/src/ant/channel/power_channel.cpp | 2 +- demo/node_3d.gd | 2 +- demo/node_3d.tscn | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ant/src/ant/channel/channel.cpp b/ant/src/ant/channel/channel.cpp index 2c00f94..05a3e53 100644 --- a/ant/src/ant/channel/channel.cpp +++ b/ant/src/ant/channel/channel.cpp @@ -12,9 +12,9 @@ void Channel::_bind_methods() { "set_device_number", "get_device_number"); godot::ClassDB::bind_method(godot::D_METHOD("set_channel", "_channel"), - &Channel::SetDeviceNumber); + &Channel::SetChannel); godot::ClassDB::bind_method(godot::D_METHOD("get_channel"), - &Channel::GetDeviceNumber); + &Channel::GetChannel); ADD_PROPERTY(godot::PropertyInfo(godot::Variant::INT, "channel"), "set_channel", "get_channel"); diff --git a/ant/src/ant/channel/power_channel.cpp b/ant/src/ant/channel/power_channel.cpp index fc70c1b..55c86e1 100644 --- a/ant/src/ant/channel/power_channel.cpp +++ b/ant/src/ant/channel/power_channel.cpp @@ -23,7 +23,7 @@ PowerChannel::PowerChannel() { channel_config_.frequency = 57; channel_config_.transmission_type = 0; channel_config_.device_type = DeviceTypes::kPower; - channel_config_.channel_period = 8070; + channel_config_.channel_period = 8182; } void PowerChannel::OnBroadcastData(godot::Ref data) { diff --git a/demo/node_3d.gd b/demo/node_3d.gd index b7f93ad..d11959f 100644 --- a/demo/node_3d.gd +++ b/demo/node_3d.gd @@ -2,7 +2,7 @@ extends Node3D @onready var ant_device = $ANTDevice @onready var hr_label = $PanelContainer/hr_container/VBoxContainer/value_label -@onready var pwr_label = $PanelContainer/pwr_container/VBoxContainer/value_label +@onready var pwr_label = $PanelContainer/pwr_container/VBoxContainer/power_label var timer: Timer diff --git a/demo/node_3d.tscn b/demo/node_3d.tscn index dad9457..0e1ffb3 100644 --- a/demo/node_3d.tscn +++ b/demo/node_3d.tscn @@ -9,10 +9,9 @@ script = ExtResource("1_a202f") [node name="ANTDevice" type="ANTDevice" parent="."] script = ExtResource("2_noarx") -[node name="HeartRateChannel" type="HeartRateChannel" parent="ANTDevice"] -channel = 2 - [node name="PowerChannel" type="PowerChannel" parent="ANTDevice"] +device_number = 23248 +channel = 1 [node name="PanelContainer" type="BoxContainer" parent="."] offset_right = 40.0 @@ -86,7 +85,6 @@ horizontal_alignment = 1 [connection signal="broadcast_data_received" from="ANTDevice" to="ANTDevice" method="_on_broadcast_data_received"] [connection signal="channel_response_received" from="ANTDevice" to="ANTDevice" method="_on_channel_response_received"] [connection signal="device_number_received" from="ANTDevice" to="ANTDevice" method="_on_device_number_received"] -[connection signal="heart_rate_updated" from="ANTDevice/HeartRateChannel" to="ANTDevice" method="_on_heart_rate_channel_heart_rate_updated"] [connection signal="battery_status_received" from="ANTDevice/PowerChannel" to="ANTDevice" method="_on_power_channel_battery_status_received"] [connection signal="crank_torque_received" from="ANTDevice/PowerChannel" to="ANTDevice" method="_on_power_channel_crank_torque_received"] [connection signal="power_received" from="ANTDevice/PowerChannel" to="ANTDevice" method="_on_power_channel_power_received"]