Commit Graph

9720 Commits

Author SHA1 Message Date
Ale Martinez
f1c6394305 Use the new Data instead of Ride Editor for Python Fixes
Fix crash reported at the forum
2020-08-26 11:38:47 -03:00
Ale Martinez
0f40659052 Fix comment on BT40Device 2020-08-26 11:37:35 -03:00
Ale Martinez
16d5c82f21 Fix sample measures.ini documentation error
[skip ci]
2020-08-25 18:39:40 -03:00
Mark Liversedge
96b4cacec9 DataFilter - xdata() function
.. xdata("name", "series" | km | secs) - returns a vector of xdata.

.. no resampling or interpolation is applied since the user can
   do this with the resample() and interpolate() functions.
2020-08-25 19:42:04 +01:00
Ale Martinez
1a184f925d Fix Qt message handler used when API Web Service is enabled
This has been reported to produce garbled output on Windows and,
according to https://doc.qt.io/qt-5/qtglobal.html#qPrintable,
it is dangerous since the array returned by QString::toLocal8Bit()
will fall out of scope, so lets use a safer version to avoid
the risk of crashes hard to debug.
[publish binaries]
2020-08-25 14:17:30 -03:00
Ale Martinez
84f706f370 Use different time base for BTLE speed computation
Depending if data come from Power or CSC sensor.
Complements #3456 Fixes #3578
2020-08-25 13:59:32 -03:00
Ale Martinez
42632c4d8d Avoid crashes on Trends Overview when metric is unavailable
Metric, TopN and Donut crash on setData when the base metric
is not available, for example when a User Metric was removed.
2020-08-24 19:12:11 -03:00
Mark Liversedge
203c505f34 Update Readme.md
Describe GoldenCheetah from a user perspective, not a developer.
2020-08-24 17:06:06 +01:00
Ale Martinez
5ef8817107 Move Pace units from athlete to general settings
Also change defaults to match metric/imperial for consistency.
Fixes #2253
2020-08-23 12:53:53 -03:00
Ale Martinez
46e07a7016 Make measures.ini global looking for it in gcroot
For the same reason metadata.xml is now global.
Also load default measures groups even when measures.ini is present,
this may change when we provide an UI to edit measures.ini, but for now
it avoids users breaking body and hrv features.
[publish binaries]
2020-08-22 19:14:42 -03:00
Poncho
35606d321c src/Core/Context.cpp: include Settings.h (#3577) 2020-08-22 11:48:58 +01:00
Mark Liversedge
fbd095a2d4 Split Global and Athlete configuration
.. Global settings (themes, metadata etc) are now maintained
   in the config dialog as in the past, whilst athlete settings
   (such as zones, measures etc) are now maintained in a new
   config dialog accessible from the athlete view (gear icon).

.. Config changes are communicated via two signals;
   * Context::configChanged(qint32)
   * GlobalContext::configChanged(qint32)

   Crucially, all global context signals are cascaded through
   the athlete contexts-- so athlete specific widgets only
   need to connect to the athlete context signal (and will get
   athlete and global config change notifications).

   Whilst global widgets such as the sidebar and mainwindow
   need only connect to the globalcontext signal since they
   are not interested in athlete specific details.

[publish binaries]
2020-08-22 11:36:24 +01:00
Ale Martinez
79071a2f3b Fix Travis-ci macOS builds - change sip source
Python sip 4.19.8 is not available anymore from Riverbankcomputing.com,
lets download from sourceforge.net like we do for Linux and Windows builds.
2020-08-21 17:33:15 -03:00
Mark Liversedge
80d7eed382 RideMetadata and friends moved to GlobalContext
.. Ride metadata was associated to the athlete rather than a
   global setting. This was a serious design flaw since user
   metrics can reference metadata.

.. A global metadata.xml file is generated on startup by
   consolidating all athlete level settings into a single
   configuration.

.. Other dependencies were also moved; SpecialFields,
   ColorEngine and UseMetricUnits.

.. We should now be able to remove athlete configuration
   from the config dialog and put it into the athlete view
   instead.

   This will also fixe a long standing issue with
   configuring athlete settings when multiple athletes are
   open.

[publish binaries]
2020-08-21 19:01:37 +01:00
Ale Martinez
a0409e8cea Fix truncated json when importing Lap Swim FIT files
Due to NAN distance on 1sec pauses, introduced in 3f9892d
[publish binaries]
2020-08-20 17:04:19 -03:00
Ale Martinez
6cdd5bbbe7 Shorter timeout on transfer.sh upload to avoid timeouts
Uploads are quite fast or don't work, so don't wait too much.
2020-08-20 17:03:01 -03:00
Ale Martinez
39feb5807c Show metrics in locale aware collation order
Unicode order can be confusing for some locales
Reported in #3542
2020-08-20 10:55:37 -03:00
Mark Liversedge
99fb4f551e Tweak RideEditor header cosmetics
.. solid line between header and data, just makes it less of
   a see of text by separating the header from the data.
2020-08-19 11:47:35 +01:00
Mark Liversedge
6fcabd699a Ride Editor bottom tabs match Ride Metadata tab style
.. 4px width bar etc.
2020-08-18 10:01:48 +01:00
Ale Martinez
bdd6d2c219 Fix KPI Tracker in chart library
Best 60min Power was Best 60min Speed, separately fixed the web version
Fixes #3574
2020-08-17 17:55:25 -03:00
Mark Liversedge
90e20d79bd Unified Editor and Metadata
.. the 'Details' chart now combines editing the metada fields such as
   workout, sport, notes and so on, with an additional tab 'Raw Data'
   that contains the RideEditor.

.. it is now no longer possible to add Editor inidividually and the
   Summary and Details chart is deprecated (Summary will also be
   removed once Overview has enough functionality to replace it).
2020-08-16 18:14:18 +01:00
Mark Liversedge
ebca2b846a Modernise the Metadata tabbar
.. flat styling with an indicator underneath the current selection.

.. been meaning to do this for absolutely ages.
2020-08-16 09:51:35 +01:00
Ale Martinez
2a43f11c72 Revert "Windows builds log to goldencheetah.log when not debugging (#3485)"
This reverts commit 6bc48200e7.
It is crashing on Windows 8, I can't debug on that version
and it is not that useful feature, --debug gives more information.
[publish binaries]
2020-08-15 19:36:16 -03:00
Mark Liversedge
6cdb848e9f Show metric refresh progress on Athlete View
.. part of a general process of centralising status, progress messages
   and indicators into one place.
2020-08-15 11:47:41 +01:00
Mark Liversedge
2372b4cdbe RideNavigator one more row of text
.. feels a little less cramped. but still needs to be completely
   overhauled for v3.6 UX
2020-08-15 10:31:12 +01:00
Mark Liversedge
2eed6f66dc Allplot less transparency
.. when filling curves as looks washed out with white backgrounds.
2020-08-15 10:30:12 +01:00
Mark Liversedge
3c6bbd5ec6 Theme Tweak add MS Teams inspired theme
.. same understated purple and white.

.. also removed some of the old (rubbish) themes.
2020-08-15 09:54:40 +01:00
Ale Martinez
1eae9f4071 Metrics Trends chart - Fix averaging group counter in table mode
The group counter was not reset and incremented unconditionally
in table mode, producing wrong averages when zeros are excluded.
Fixes #3566
2020-08-14 19:01:07 -03:00
Ale Martinez
414cc630fd Don't compute Pace Swim for non swimming activities
Fixes #3570
2020-08-14 12:57:46 -03:00
Ale Martinez
2ada830c5b Fix generated distance for lap swims
Fixes #3567
2020-08-14 12:29:47 -03:00
Mark Liversedge
80ba487153 Fix SEGV configChanged after athlete closed
.. the views were not being deleted, so the global context connection
   to configChanged signal was still called, but the athlete and
   context were long gone - so SEGV (!)

.. the reason this didn't get triggered in earlier releases is due to
   the fact the event was disconnected when the athlete context was
   deleted.
2020-08-14 13:43:41 +01:00
Mark Liversedge
9bb1f3434d Fixup RideCache Load in Thread
.. move thread based load of ridecache into ridecache, this fixes a
   serious regression.

.. previously because the ridecache was created in a thread it could
   not attach to the events from the main gui event loop.

.. we now load the RideDB.json file in a worker thread, but the
   ridecache, and its items are created in the main thread.
2020-08-14 10:25:21 +01:00
Alejandro Martinez
64e83121ca Computrainer Button tidy up (#3538)
Since F3 was assigned to Calibration, its use as modifier was deprecated.
Also nextDisplay is not implemented so we can do some cleanup.
F1 is restored to their original function: start/pause and F2 is used
for new lap, in both cases with debouncing to avoid false activations.
This way the same functions enabled for ANT+ remotes are available via HBC:
Start&Pause: F1
Lap/Interval: F2
Load increase/decrease: +/-
Calibration: F3
2020-08-13 21:29:42 -03:00
Ale Martinez
97da9f9539 Increase precision to 3 digits on RideEditor XData
Fixes #3568
2020-08-13 20:10:05 -03:00
Alejandro Martinez
c52d260949 Generalize Body/Hrv Measures and add Nutrition data as example (#3564)
measures.ini is looked for in Athlete's config folder,
it should have a section for each measures group,
nutrition data with Energy and Macros is provided as example.
Moved default weight to About and removed RiderPhysPage and created
a tab for each measures group under Measures.
MeasuresPage handles conversion between metric and imperial units
Generalized CSV import with configurable headers.
MeasuresDownload enables download from Withings/Todays Plan only for Body
measures.
This is Part 1/2 of #2872
2020-08-11 21:02:19 -03:00
Ale Martinez
9a2d71dc5d Avoid rounding when computing speed and cadence on Lap Swims
Fixes #3563
2020-08-11 19:11:03 -03:00
Mark Liversedge
1d9f570ed8 Introduce a Global Context
.. GlobalContext::context() provides a global context that is not
   tied to an athlete or MainWindow.

.. At present it just offers signals for config changes but will
   likely see more context move across as the application preferences
   and athlete configuration are separated as we enhance support
   for multiple athletes.
2020-08-11 22:16:13 +01:00
Alejandro Martinez
6bc48200e7 Windows builds log to goldencheetah.log when not debugging (#3485)
Similar to Linux/macOS builds, messages are redirected to goldencheetah.log
when not output to console is requested, but instead of relying on low level
stderr redirection a message handler logging directly to the file is installed.
[publish binaries]
2020-08-10 21:21:34 -03:00
Ale Martinez
c886158c16 Honor default locale on RideEditor copy/cut
paste and paste special are already doing this via strtod
Fixes #2552
2020-08-10 11:29:02 -03:00
Ale Martinez
c49180460d Avoid multiple ConfigDialog creation and close on exit
configdialog_ptr is already maintained to handle raise event,
cleanup is moved to destructor to ensure it is always called,
and it is used to ensure:
1) only one instance is created from MainWindow
2) it is closed on MainWindow destructor
Fixes #1918
2020-08-09 15:38:08 -03:00
Ale Martinez
7c90abf675 Fix percentage calculation in Overview Zones histograms
It was restricted to the first 4 zones, likely a copy/paste error.
Fixes #3559
2020-08-08 20:28:20 -03:00
Ale Martinez
f0fd495a21 Remove special case for Device metadata tag query
Keeping exception for isset/set/unset
Fixes #3428
2020-08-07 16:00:05 -03:00
Ale Martinez
3f9892d130 Change lap swim import from FIT files
The logic to generate synthetic speed/distance/cadence sample data
from length records was removed from FitRideFile, and Fix Lap Swim
data processor is now used for that task, this is simpler, avoids
code duplication and preserves other data s.t. HR and Temp
Fixes #3545
total_timer_time is used as length duration instead of total_elapsed_time
to support Suunto lap swim files
Fixes #3272
2020-08-04 13:56:32 -03:00
Mark Liversedge
8150d5b7ce Protect against closing first athlete opened
.. since the context of the first athlete is used as a partial
   application context across the code we now prohibit closing
   the first athlete opened.

.. we will separate out the app and athlete context shortly
   but this will at least protect against SEGV.

[publish binaries]
2020-08-04 07:47:22 +01:00
Mark Liversedge
edec952b86 Athlete View 2 of 3
.. Show days since last activity and disable config icon since there
   isn't an appropriate action for now

.. Athletes can be opened and closed via the tiles and a reusable
   'Button' overview widget is available for re-use elsewhere.

.. Part 3 will enable checking for downloadable data to show an
   indicator on the tile for e.g. coaches with multiple athletes.

NOTE:

   There are a few issues regarding application context separation
   from athlete context that need fixing up (if you close the first
   athlete loaded expect crashes). Will look at this as a separate
   update since its been there for some time and is not related to
   the new view per se.
2020-08-03 20:09:47 +01:00
Mark Liversedge
7d9337fb23 Theme Tweaks
.. modern light now uses the Fiori Belize Blue theme.

.. this means that the overview (chartspace) background is now also
   configurable, so the existing themes could be updated.

.. probably need to revisit all the themes tbh.
2020-08-03 20:09:47 +01:00
Ale Martinez
7e3f141124 Don't crash when Python chart APIs are called without a Chart
Just do nothing and return false.
Fixes #3554
2020-08-03 12:59:42 -03:00
Ale Martinez
750f7fb258 Fix missing return in previous commit
5a27239e01
2020-08-02 12:14:02 -03:00
Ale Martinez
08632206c3 Update Preferences Appearance screen capture for the wiki
[skip ci]
2020-07-31 14:52:00 -03:00
Ale Martinez
51eb9e6c96 Remove climb detection logging to climb.log
There has been some reports about performance issues on Windows,
and this was a debug tool for a feature which has been stable
for years, so we can remove it to avoid the overhead.
[publish binaries]
2020-07-30 14:26:03 -03:00