diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/Activity.rb | 8 | ||||
-rw-r--r-- | lib/postrunner/ActivityReport.rb | 2 | ||||
-rw-r--r-- | lib/postrunner/Main.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/postrunner/Activity.rb b/lib/postrunner/Activity.rb index aa50789..a37c2de 100644 --- a/lib/postrunner/Activity.rb +++ b/lib/postrunner/Activity.rb @@ -31,8 +31,8 @@ module PostRunner Log.info "FIT file #{@fit_file} is OK" end - def dump - load_fit_file + def dump(filter) + load_fit_file(filter) end def yaml_initialize(tag, value) @@ -69,10 +69,10 @@ module PostRunner private - def load_fit_file + def load_fit_file(filter = nil) fit_file = File.join(@db.fit_dir, @fit_file) begin - return Fit4Ruby.read(fit_file) + return Fit4Ruby.read(fit_file, filter) rescue Fit4Ruby::Error Log.fatal $! end diff --git a/lib/postrunner/ActivityReport.rb b/lib/postrunner/ActivityReport.rb index 84075d5..60ceef1 100644 --- a/lib/postrunner/ActivityReport.rb +++ b/lib/postrunner/ActivityReport.rb @@ -60,7 +60,7 @@ module PostRunner 'Avg. HR', 'Max. HR' ]) t.set_column_attributes(Array.new(7, { :halign => :right })) t.body - @activity.laps.each do |lap| + @activity.sessions[0].laps.each do |lap| t.cell(secsToHMS(lap.total_timer_time)) t.cell('%.2f' % (lap.total_distance / 1000.0)) t.cell(speedToPace(lap.avg_speed)) diff --git a/lib/postrunner/Main.rb b/lib/postrunner/Main.rb index 96d6265..3ec3c70 100644 --- a/lib/postrunner/Main.rb +++ b/lib/postrunner/Main.rb @@ -220,7 +220,7 @@ EOT when :delete @activities.delete(activity) when :dump - activity.dump + activity.dump(@filter) when :rename @activities.rename(activity, @name) when :summary |