Commit Graph

4483 Commits

Author SHA1 Message Date
Mark Liversedge
9ae44f8a96 Stray connect() in ScatterWindow 2014-12-10 13:53:55 +00:00
Damien
77847f08ac Config: modify wheel size configuration 2014-12-10 00:10:42 +01:00
Damien
03e94f4844 ScatterPlot: Add trend line 2014-12-09 22:35:12 +01:00
Mark Liversedge
dbe44a40b5 Merge pull request #1194 from amtriathlon/master
Update Spanish Translation
2014-12-09 19:12:55 +00:00
Alejandro Martinez
1699312f10 Update Spanish Translation 2014-12-09 16:11:03 -03:00
Mark Liversedge
db40fb733f Simplify Lucene Method
.. it ignored most of the parameters so lets simplify
   and make it just look at ride() -- this may simplify
   even further to the tags in future.
2014-12-09 15:15:49 +00:00
Mark Liversedge
7d218382a7 Only save Withings on SUCCESS
.. moved the overwrite of the withings cached response
   to when we know we got something successfully.

.. previously we overwrote regardless of what we received
   which means that when we have firewall/network type issues
   the cache was overwritten with blank data !
2014-12-09 14:34:04 +00:00
Mark Liversedge
1cf988a550 RideCache refresh on addRide
.. but only refreshes the ride added rather than looking everywhere.
   So, when we are importing large numbers of activities it won't
   repeatedly run a full refresh (which was bonkers).
2014-12-09 13:59:10 +00:00
Mark Liversedge
0c0987e99b RideCache Exit gracefully
.. if we close GC during a background refresh operation
   then the refresh is cancelled and cache saved in whatever
   state it is in now .. the user clearly didn't want to wait !
2014-12-09 11:29:50 +00:00
Mark Liversedge
a94bda9403 RideCache::save() UTF-8 with a BOM
.. same as the ridefile.json
2014-12-08 22:52:26 +00:00
Mark Liversedge
e8105ce23e rideDB.json Indentation nit
.. yeah, I'm a bit OCD.
2014-12-08 22:35:08 +00:00
Mark Liversedge
170c38467a RideCache::save()
.. dumps the ridecache to cache/rideDB.json
2014-12-08 22:12:06 +00:00
Claus Assmann
93393246d7 Fixup RideCache on QT < 5
.. QtConcurrent header names changed.
2014-12-08 20:02:34 +00:00
Mark Liversedge
8f2fc62cac RideCache compute metrics
.. when refresh() is called for a rideitem it will
   now compute the metrics for the entire ride

.. when a ride is opened the cache is also updated
   at the same time.
2014-12-08 19:38:01 +00:00
Mark Liversedge
c0d63dbdf3 Temporary Fixup
.. refresh metricDB when new withings data downloaded

.. but refreshes for all dates that have data for now, this
   will be resolved shortly.
2014-12-08 17:59:59 +00:00
Mark Liversedge
79748ecb3d Remove RideCache refresh sleep!
.. added to slow things down on my developer PC as its
   to fast to notice when I'm testing.

.. also left in an erroneous line clearing RideItem::isstale
   which is also wrong as breaks separation of concerns
2014-12-08 17:24:50 +00:00
Mark Liversedge
bf78eeaec7 Ridecace Measures deprecated from SQLite
This is quite a big patch with lots of nasty interdependencies
all collected together but essentially it deprecates;

* Measures are no longer stored in SQL tables
* Zeo support has been dropped (they went bust)

To achieve this there are a large number of updates;

* Withings json is now cached in /cache and in the Athlete
  class. So can be traversed in memory rather than SQL

* All "measures" on LTM have been removed and the only metric
  left is "Athlete Weight" that cascades from withings to ride
  "Weight" metadata value to athlete settings to a 80kg default

* RideCache is now refreshed, but only for metadata. This is needed
  to cache the "Weight" metadata from rides when calculating weight.

* JsonRideFile parser is now re-entrant since it will run in parallel
  during RideCache refreshes (using the QtConcurrent::map()
  framework).

BUT NOTE

* This is about deprecating the Measures table more than anything
  else. Functionally we are in pretty much the same place; just that
  data is stored in a different place.

  e.g. metric/imperial handling of weight is not fixed yet, no
  metrics are in the cache yet, load/save of the cache is not done
  so startup is slow etc.
2014-12-08 16:48:58 +00:00
Mark Liversedge
98a15ed4fb RideWindow copy/paste error
.. surprised it works !
2014-12-07 09:51:56 +00:00
Mark Liversedge
51f25cb1f7 Minor logic error 2014-12-07 00:20:17 +00:00
Mark Liversedge
259b739bf6 Merge pull request #1191 from amtriathlon/master
Enabled CP Models for Speed series
2014-12-07 00:15:23 +00:00
Mark Liversedge
760f1870a7 RideCache / RideItem fixups
.. fingerprint for range should not take into account the
   start/end date as its irrelevant and will change

.. RideItem now responsible for refresh and status updating
   on the rideitem

.. framework seems good now; only rides that need to be refreshed
   will get asked for a refresh -- but need to look more closely
   at how we derive 'Weight' for each rideitem now...
2014-12-07 00:11:44 +00:00
Alejandro Martinez
96ee321852 Enabled CP Models for Speed series
Results are shown in metric units for speed/distance and pace units according to user preferences
2014-12-06 20:48:31 -03:00
Mark Liversedge
a1e95d0880 RideItem separation of concerns
.. instead of making the caller keep rideitem up to date etc
   we are going to move to it looking after itself.

.. the first part of this is to make it responsible for checking
   if it is stale and computing fingerprints etc

.. the next part will be making it responsible for refreshing
   the cached values.

One big thing too:

.. the fingerprint is now based upon the zone config that applies
   for the date of the ride -- not all zone config. So if the config
   changes but not for the date of this ride (e.g. set a new CP starting
   from today) then the old data does not get marked as stale.
2014-12-06 08:48:34 +00:00
Mark Liversedge
23ebb0542c RideCache Framework Update
.. needed to clean RideItem a touch

.. needed to isolate intervals code as it has some
   problems and breaks metricaggregator for normal
   use.

.. found a bit of Context code in MainWindow.cpp (!!)
2014-12-05 23:06:28 +00:00
Mark Liversedge
b597a2dafc RideCache Background Refresh Framework
.. subtle, thin progress bar on tabview to notify
   when background updates are in progress

.. background updating code created but does not
   perform a refresh yet, just sleeps for 0.2s

.. to enable 'visibility' of the code use WANT_RIDECACHE
   to the defines in gcconfig.pri
2014-12-05 20:08:32 +00:00
Mark Liversedge
97baee2256 Merge pull request #1189 from Joern-R/fix2
Athlete Subdirs - improvements
2014-12-05 17:48:54 +00:00
Joern
076a6e86ec Athlete Subdirs - improvements
.. added /BAK subdir where all actvities .BAK files are stored
.. do not delete any original files in /imports /downloads when deleting
activity
.. copy deleted activity .JSON as .BAK into /BAK subfolder
.. adjust upgrade procedure to copy .BAK files to /BAK
2014-12-05 18:44:11 +01:00
Mark Liversedge
0b7f6e22d4 Merge pull request #1188 from mtbkeith/master
code cleanup of build warnings
2014-12-05 16:13:46 +00:00
Mark Liversedge
27df106889 Merge pull request #1187 from Joern-R/fix1
GC Upgrade 3.11 - adjustment
2014-12-05 16:09:05 +00:00
Joern
c9dabc5d00 GC Upgrade
.. do not force User to scroll down to proceed
.. change "proceed" text to be more clear
2014-12-05 17:11:09 +01:00
Reynolds
53d4834e3a Merge branch 'master' of https://github.com/mtbkeith/GoldenCheetah
# By Mark Liversedge
# Via Mark Liversedge
* 'master' of https://github.com/mtbkeith/GoldenCheetah:
  Added RideCache
  Introduce the RideCache
  Turn off interval hover on leave
2014-12-05 10:59:43 -05:00
Mark Liversedge
45550c0f28 Added RideCache
.. source files missed off last commit
2014-12-05 15:33:19 +00:00
Mark Liversedge
0b5da213da Introduce the RideCache
.. just a refactor of ridelist out of Athlete for now
   but will shortly be refreshing in background and
   loading and saving to rideDB.json
2014-12-05 15:30:54 +00:00
Mark Liversedge
9b92ad6605 Turn off interval hover on leave
.. so you get hover notifications only when
   hovering, as soon as the mouse leaves the chart
   the hover goes away.
2014-12-05 11:57:02 +00:00
Keith Reynolds
d02909660c Remove unused local method 'unquote'
Fix virtual function to proper signature for QXmlAttributes reference and prevent hiding.
2014-12-04 18:04:08 -05:00
Mark Liversedge
f70bf3080f Added RideMetric::index()
.. each metric now has an index (identifier) that can is numeric
   starting at 0 and going up.

.. it can be used to offset into an array when we add a cache for
   storing precomputed metrics.
2014-12-04 13:54:42 +00:00
Mark Liversedge
f91aa20464 Tidy up RideItem.h
.. the cache code can start now !
2014-12-03 20:38:08 +00:00
Mark Liversedge
48e437ddf5 Fixup 3D plot for RideItem zones
.. missed in last commit.
2014-12-03 20:21:30 +00:00
Mark Liversedge
973281317d Remove Zones from RideItem
.. they are in Athlete::zones() et al now

.. this refactor was missed in the 3.0 mainwindow
   refactoring and is part of the prep to use RideItem
   as an in memory cache instead of the old metricDB
2014-12-03 19:06:07 +00:00
Mark Liversedge
bfaa317d22 QVector::removeAt(int) is new
.. so use ::remove() instead for QT4 compatibility.
2014-12-03 15:30:40 +00:00
Mark Liversedge
d04fb74458 Merge pull request #1186 from amtriathlon/master
Fixed copy and paste error
2014-12-03 15:28:18 +00:00
Alejandro Martinez
45ea8ed7ce Fixed copy and paste error 2014-12-03 12:23:38 -03:00
Mark Liversedge
0447489ea4 Merge pull request #1185 from amtriathlon/master
Added xPace metric
2014-12-03 15:12:45 +00:00
Alejandro Martinez
8f06039451 Added xPace metric
Computed as the constant pace on flat surface with the same LNP
2014-12-03 10:48:13 -03:00
Mark Liversedge
2ef71f6df3 Add RideMetric::toString(bool useMetricUnits)
.. so we can now call that instead of doing the conversion
   and formatting all over the code !

NOTE: it still needs to be /called/ in the code, that change
      will need to be applied everywhere a metric is displayed
      to the user.
2014-12-03 12:36:40 +00:00
Mark Liversedge
37a496ac38 Save Command flushed Metadata first
.. to fix long standing bug with saving whilst editing
   a field. But still leaves a problem if exiting whilst
   editing a field (which is a bit weird tbh).
2014-12-03 10:57:07 +00:00
Mark Liversedge
1c7edb30b4 Finally remove Old Ride list QTreeWidget !
.. its been there since the beginning at the heart of the code
   as a registry of the rides (RideItem) and controlling the
   selection of rides.

.. in v3.0 we stopped showing it, but it was still created and
   then hidden immediately. But removing the 'spine' of the code
   was seen as a step too far.

.. this is the first part of moving from SQL to a NoSQL cache
   for ride metrics, metadata and measures -- RideItem is now
   no longer inheriting from QTreeWidgetItem with all the issues
   that brings.

.. since its right at the heart there are likely to be unforeseen
   bugs as we go, especially since it affects the ride navigator.

.. add/delete has been tested a fair amount and should be reliable.
2014-12-03 10:33:50 +00:00
Alejandro Martinez
ec11bb4005 Ignored /release to keep git quiet on windows 2014-12-02 13:52:51 -03:00
Mark Liversedge
994b4f71b8 Merge pull request #1183 from amtriathlon/master
Spanish Translation Update
2014-12-01 19:29:23 +00:00
Alejandro Martinez
5ea9957867 Spanish Translation Update 2014-12-01 14:34:01 -03:00