diff options
author | Chris Schlaeger <chris@linux.com> | 2019-09-03 21:17:17 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2019-09-03 21:17:17 +0200 |
commit | e926d21e282668b97fcc2689af0c2c8d3eab6b02 (patch) | |
tree | 83d8f59b36c22052e21d1fce515dace99207fe91 | |
parent | b01b8b0c8cb440ba01b58d9980470621717638cd (diff) | |
download | postrunner-e926d21e282668b97fcc2689af0c2c8d3eab6b02.zip |
New: Add support for Garmin Fenix5X Plus FW 8.40
-rw-r--r-- | lib/postrunner/ChartView.rb | 13 | ||||
-rw-r--r-- | postrunner.gemspec | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/postrunner/ChartView.rb b/lib/postrunner/ChartView.rb index 9274d9e..e73d978 100644 --- a/lib/postrunner/ChartView.rb +++ b/lib/postrunner/ChartView.rb @@ -295,7 +295,18 @@ EOT # finish the line and start a new one later. data_set << [ (last_timestamp - start_time + 1).to_i * 1000, nil ] end - if (value = r.get_as(chart[:id], chart[:unit] || '')) + value = r.get_as(chart[:id], chart[:unit] || '') + if value.nil? && chart[:id] == 'speed' + # If speed field doesn't exist the value might be in the + # enhanced_speed field. + value = r.get_as('enhanced_speed', chart[:unit] || '') + end + if value.nil? && chart[:id] == 'altitude' + # If altitude field doesn't exist the value might be in the + # enhanced_elevation field. + value = r.get_as('enhanced_elevation', chart[:unit] || '') + end + if value if chart[:id] == 'pace' # Slow speeds lead to very large pace values that make the graph # hard to read. We cap the pace at 20.0 min/km to keep it diff --git a/postrunner.gemspec b/postrunner.gemspec index 08cd48b..d60c074 100644 --- a/postrunner.gemspec +++ b/postrunner.gemspec @@ -28,12 +28,12 @@ operating systems as well.} spec.require_paths = ["lib"] spec.required_ruby_version = '>=2.4' - spec.add_dependency 'fit4ruby', '~> 3.2.0' + spec.add_dependency 'fit4ruby', '~> 3.3.0' spec.add_dependency 'perobs', '~> 4.1.0' spec.add_dependency 'nokogiri', '~> 1.6' spec.add_development_dependency 'bundler', '~> 1.6' spec.add_development_dependency 'rake', '~> 0.9.6' spec.add_development_dependency 'rspec', '~> 3.6.0' - spec.add_development_dependency 'yard', '~> 0.9.12' + spec.add_development_dependency 'yard', '~> 0.9.20' end |