File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ public override void _Process(double delta) {
4545 workoutLength . Text = $ "{ ( int ) workout . totalTime_s / 60 } ";
4646 totalDescent . Text = $ "{ ( int ) workout . totalDescent } ";
4747 totalAscent . Text = $ "{ ( int ) workout . totalAscent } ";
48- caloriesBurnt . Text = $ "{ ( int ) workout . caloriesBurnt } ";
48+ caloriesBurnt . Text = $ "{ ( int ) ( workout . caloriesBurnt ) } ";
4949
5050 cadence . Text = $ " { bikeInput . currentCadence_RPM } ";
51- cadenceAvr . Text = $ "{ workout . averageCadence } ";
51+ cadenceAvr . Text = $ "{ ( ( int ) workout . averageCadence ) } ";
5252
5353 speed . Text = $ "{ ( int ) bikePhysics . speed_kmH } ";
5454 speedAvr . Text = $ "{ ( int ) workout . averageSpeed_kmH } ";
@@ -57,7 +57,7 @@ public override void _Process(double delta) {
5757 powerAvr . Text = $ "{ ( int ) workout . averageWatts } ";
5858
5959 heartRate . Text = $ "{ bikeInput . heartRate } ";
60- heartRateAvr . Text = $ "{ workout . averageHeartRate } ";
60+ heartRateAvr . Text = $ "{ ( ( int ) workout . averageHeartRate ) } ";
6161
6262 fps . Text = $ "FPS: { Engine . GetFramesPerSecond ( ) } ";
6363 base . _Process ( delta ) ;
Original file line number Diff line number Diff line change @@ -287,27 +287,35 @@ alignment = 1
287287[node name ="totalDescent" type ="Label" parent ="workout stat/VBoxContainer" ]
288288layout_mode = 2
289289size_flags_vertical = 6
290+ tooltip_text = "total descent in meters made during whole activity"
291+ mouse_filter = 1
290292theme_type_variation = &"H2Label"
291293text = "100"
292294horizontal_alignment = 1
293295
294296[node name ="totalAscent" type ="Label" parent ="workout stat/VBoxContainer" ]
295297layout_mode = 2
296298size_flags_vertical = 6
299+ tooltip_text = "total ascent in meters made during whole activity"
300+ mouse_filter = 1
297301theme_type_variation = &"H2Label"
298302text = "200"
299303horizontal_alignment = 1
300304
301305[node name ="caloriesBurnt" type ="Label" parent ="workout stat/VBoxContainer" ]
302306layout_mode = 2
303307size_flags_vertical = 6
308+ tooltip_text = "kcalories burnt during whole activity"
309+ mouse_filter = 1
304310theme_type_variation = &"H2Label"
305311text = "1300"
306312horizontal_alignment = 1
307313
308314[node name ="workoutLength" type ="Label" parent ="workout stat/VBoxContainer" ]
309315layout_mode = 2
310316size_flags_vertical = 6
317+ tooltip_text = "total workout length in minutes"
318+ mouse_filter = 1
311319theme_type_variation = &"H2Label"
312320text = "120"
313321horizontal_alignment = 1
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ visible = false
235235[node name ="heart rate device type" type ="Node" parent ="Panel/contents/device connection/HSplitContainer/device types/VBoxContainer2/heart rate tracker " node_paths =PackedStringArray ("display" )]
236236script = ExtResource ("7_lqkny" )
237237display = NodePath (".." )
238+ bluetoothDeviceTypeName = "hr tracker"
238239glyphIcon = " "
239240
240241[node name ="other device type " parent ="Panel/contents/device connection/HSplitContainer/device types/VBoxContainer2" node_paths =PackedStringArray ("icon" ) instance =ExtResource ("6_bexj6" )]
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class Workout {
2222 public float averageWatts ;
2323 public float caloriesBurnt ;
2424 const float humanMetabolicEfficiency = .24f ;
25- const float julesToCalories = 4.184f ;
25+ const float julesToCalories = 1f / 4184f ;
2626
2727 public float totalAscent ;
2828 public float totalDescent ;
@@ -65,7 +65,8 @@ float currentHeight
6565 averageHeartRate = totalHeartRate / totalTime_s ;
6666 averageSpeed_kmH = totalSpeed_kmH / totalTime_s ;
6767 averageWatts = totalPower / totalTime_s ;
68- caloriesBurnt = averageWatts * totalTime_s * humanMetabolicEfficiency * julesToCalories ;
68+
69+ caloriesBurnt = averageWatts * totalTime_s * julesToCalories / humanMetabolicEfficiency ;
6970 }
7071
7172 public static Workout Load ( string name ) {
You can’t perform that action at this time.
0 commit comments