summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2019-09-21 14:09:51 +0200
committerChris Schlaeger <chris@linux.com>2019-09-21 14:09:51 +0200
commitebd7935ea32e0179325cfc6edf2106d160c93cb9 (patch)
tree35b9156206e2a6aa3de91b32014ad94dd8292a3f
parent150922ad79e5775d4c379af64b076eb40fc228ba (diff)
downloadpostrunner-ebd7935ea32e0179325cfc6edf2106d160c93cb9.zip
New: Show lactate threshold speed in User Profile section.
-rw-r--r--lib/postrunner/UserProfileView.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/postrunner/UserProfileView.rb b/lib/postrunner/UserProfileView.rb
index a224277..e5e37b0 100644
--- a/lib/postrunner/UserProfileView.rb
+++ b/lib/postrunner/UserProfileView.rb
@@ -18,6 +18,8 @@ module PostRunner
class UserProfileView
+ include Fit4Ruby::Converters
+
def initialize(fit_activity, unit_system)
@fit_activity = fit_activity
@unit_system = unit_system
@@ -66,15 +68,23 @@ module PostRunner
(max_hr = hr_zones.max_heart_rate)
t.row([ 'Max. Heart Rate:', "#{max_hr} bpm" ])
end
+ if (date = user_profile.time_last_lthr_update)
+ t.row([ 'Last Lactate Threshold Update:', date ])
+ end
if (lthr = user_data.running_lactate_threshold_heart_rate)
- t.row([ 'Running LTHR:', "#{lthr} bpm" ])
+ t.row([ 'Running LT Heart Rate:', "#{lthr} bpm" ])
+ end
+ if (speed = user_profile.functional_threshold_speed)
+ unit = { :metric => 'min/km', :statute => 'min/mile' }[@unit_system]
+ t.row([ 'Running LT Pace:', "#{speedToPace(speed)} #{unit}" ])
end
if (activity_class = user_data.activity_class)
t.row([ 'Activity Class:', activity_class ])
end
- if (metmax = user_data.metmax)
- t.row([ 'METmax:', "#{metmax} MET" ])
- end
+ # It's unlikely that anybody ever cares about the METmax value.
+ #if (metmax = user_data.metmax)
+ # t.row([ 'METmax:', "#{metmax} MET" ])
+ #end
if (vo2max = @fit_activity.vo2max)
t.row([ 'VO2max:', "#{'%.1f' % vo2max} ml/kg/min" ])
end