Commit Graph

86 Commits

Author SHA1 Message Date
Mark Liversedge
ff0fb0bef1 Add support for deleting videos
.. but only deletes references and db entry
.. we do not delete from the filesystem -- need to add a dialog
   to ask the user to confirm deleting the file from disk.
2013-03-07 15:23:43 +00:00
Mark Liversedge
b41ff0a020 Add function to delete workouts
.. in train view we could add workouts but never delete.
2013-03-07 14:34:47 +00:00
Mark Liversedge
bf2737fde0 UI Nits: Simplify splitter to just one menu
.. instead of + and - and menu.
2013-03-05 19:47:54 +00:00
Mark Liversedge
d8bd3fe939 UI Nits: TrainTool splitter shortcuts 2013-03-04 20:42:15 +00:00
Mark Liversedge
9dcbadcc84 UI Nits: Splitter actions for TrainTool Devices
.. add and delete devices.
2013-03-04 16:00:11 +00:00
Mark Liversedge
dbd21d35e4 UI Nits: Sidebar remember their state
Rather than relying on the parent to maintain the splitter sizes
and states, the GcSplitter remembers its own state and sizing.

This includes remembering if the children have been hidden via the
icon bar at the bottom of the splitter.
2013-03-02 22:52:41 +00:00
Mark Liversedge
25121f515f UI Nits: Splitter icons adjust
The icons are adjusted via utility function iconFromPNG()
which currently just adjusts the icon color to be a muted
gray as opposed to black.

This is the first pass at recreating the 'template' function
used by the cocoa image functions. Will add an emboss feature
later, but at least now they are less vibrant and when clicked
turn black giving a visual clue that they are clickable.
2013-03-02 20:57:56 +00:00
Mark Liversedge
a9ac871ce0 Splitter for Train View
.. icons and basics. Wanted three treeviews to work on the
issue related to treeviews not expanding properly.
2013-02-25 22:41:48 +00:00
Mark Liversedge
c1d071ee04 Code Cleanup: Deprecate Train Streaming
We no longer support streaming data from the Train View.
All the source for this has been moved to deprecated.
2013-02-20 22:11:54 +00:00
Mark Liversedge
6865dd4bfd Code Cleanup: More compile time errors/warnings
.. warnings from Xcode 4.6 (still some remaining)
.. and deprecated Quarqd code (we have native ANT now)
.. and MultiWindow deprecated (it isn't finished)
2013-02-12 22:40:08 +00:00
Mark Liversedge
9f186855ed Code Cleanup: Train
.. TrainDB and TrainTool cleanup, removed references to GC servers
and removed commented #if0 code.
2013-02-07 16:25:34 +00:00
Mark Liversedge
de9f3f9e4a replace tabs with spaces
.. in TrainTool.cpp
2013-02-06 16:03:40 +00:00
Jaime
d6b7e8645e Restore load/gradient after done with calibration 2013-02-06 10:51:23 -05:00
Mark Liversedge
d22baa98ce tabs to spaces
.. in Computrainer.cpp and TrainTool.cpp
2013-01-28 07:17:45 +00:00
Jaime
c1410814f1 Fixes in CT support to ensure Gradient/Slope is being defaulted and updated properly between the CTConroller and TrainTool.
Fix to preselect ERG mode in workoutTree.
2013-01-27 22:02:52 -05:00
Mark Liversedge
290850da06 Cleanup tabs and whitespace
Not sure where it came from, but cleaned up anyway.
No functional change.
2013-01-24 21:24:49 +00:00
Jaime
00ac77f120 Logic changes to enable real time plotting to resume properly after calibration.
Minor cosmetic fixes of missing #defines for media support
2013-01-23 21:29:32 -05:00
Mark Liversedge
d41a41ba7d Fix Kickr compile error
.. in TrainTool too.
2013-01-21 07:07:37 +00:00
Mark Liversedge
4a42337fa2 Kickr Skeleton Code
Added Skeleton code for device discovery, config
and runtime. Now need to develop the WFApi class
to support each function.
2013-01-20 19:11:16 +00:00
Jaime
0152a38d21 In guiUpdate(), fixed an issue with updating now to current time so that it is updated about every 1 second. 2013-01-17 15:52:16 -05:00
Mark Liversedge
694dcb1731 Fix pause/unpause bug
When you press stop it should clear the paused flag.

Fixes #440.
2013-01-11 08:57:36 +00:00
Mark Liversedge
ea174a758e VLC is Optional - don't SEGV
Ugh. Fixed a couple of SEGV when library importing
is used with video but no video support is compiled in.
2012-12-24 16:45:44 +00:00
Mark Liversedge
274c2c5a71 Workout Library fixups
Remember the selected video or workout when refreshing list
on data change. This is particularly relevant when dragging
and dropping in videos and workouts.
2012-12-24 16:05:07 +00:00
Mark Liversedge
a9a6f9ffb8 Further Workout Library Fixups
- Added drag and drop dialog and functionality
- if only 1 video/workout imported it is imported and selected
- if multiple they are imported with a dialog
- now shows any references in the scan function

The use of references to avoid making copies of videos is
a touch complicated -- the workflow could be friendlier.
2012-12-24 15:23:16 +00:00
Mark Liversedge
2a149bd454 Workout Library Part 3 fixups
Some fixups to recent update for the workout
library support;

- ergDB download now updates the DB
- mainwindow menu options names more consistent
- sort order in the video and workout list
- hooks for import/drag and drop

Will now write the importer for drag-n-drop and
import workouts menu option.
2012-12-23 17:56:41 +00:00
Mark Liversedge
a603dd5b5b Workout Library Part 3 of 3
Linked up the training db to the train tool to
allow users to select from the db.

Further enhancements to the list could be made,
but leaving this till we move to OpenTrainer.

Still need to add drag and drop to copy into
the library or add reference to the file.

Fixes #301.
2012-12-22 19:05:36 +00:00
Mark Liversedge
2d73924f25 ErgFile lookup CP
Instead of passing the CP value for the rider
when opening an ErgFile it now looks up the CP
value itself. Simplifies the API.
2012-12-21 11:09:52 +00:00
Mark Liversedge
d2ebedac20 Workout Library Part 1 of 3
Implementing a workout library that keeps
track of media and workouts that can be used
in train view.

This first part implements;
- library.xml to record search paths
- search dialog to find media/workouts

Part 2 and 3 will bring:
- Sqllite libraryDB to store found details
- Update traintool to use libraryDB and display
  icons, duration/distance, IF and TSS in list
- import and drag-n-drop of new media/workouts
2012-12-20 13:30:49 +00:00
Mark Liversedge
14859d8a51 Context Menu for Devices in Train View
Right click to add/delete a new device on the device list
in the train view sidebar.

It is temporary to bring the train view in line with the rest
of GC, but will then be updated as we remove functionality that
is hidden behind a right click.
2012-12-15 14:07:45 +00:00
Damien
8eee2ddb25 Choose Metric/Imperial units in New Athlete dialog
fixes #34
2012-11-26 23:35:35 +01:00
Mark Liversedge
9ee2eab311 UI Polish: Move train view controls to scope bar
Now we have a scope bar we can move the train view controls
out of the sidebar.
2012-11-20 17:21:22 +00:00
Mark Liversedge
41796abb43 UI Nits: train labels in white
Last commit accidentally changed the color for the
IF/TSS labels on the train tool to black but this
is only appropriate for the Mac implementation.
2012-11-19 22:31:09 +00:00
Mark Liversedge
1cdb5568d3 UI Nits: Goodbye ToolBox
The left sidebar is now a stacked widget and the toolbox
has been consigned to history. We are now ready to add a
left sidebar for the metric "home" view.
2012-11-19 22:15:35 +00:00
Mark Liversedge
f43ac923c5 Mac Native UI (Part 1 of 3)
Part of a series of commits to adjust the UI on a Mac to
look more native and conform better to the Mac UI design
guidelines.

This patch introduces a unified title and toolbar which hosts
a search field and buttons for commonly used functions like
import, split ride, delete etc.

Since it is not possible (or more importantly good practice) to
hide and show toolbar items the Train View controls have now been
moved to the sidebar on a Mac. This is a temporary measure and
will be resolved in future updates.

Further updates planned are;
Part 2 - fixup the preferences pane to be more Mac-like
Part 3 - Spit and Polish around the charts; drop shadows, controls etc
2012-11-18 15:55:07 +00:00
Mark Liversedge
f48ae3d2a8 Mac UI Sidebar Cosmetics
The sidebar elements all get a blue focus rectangle on
Mac OSX. This is a platform specific setting. This patch
removes the focus rectangle for sidebar components only.
2012-11-06 11:16:41 +00:00
Andrew Bryson
0430568d99 Allow user to select another video when paused
Fixes #648

Also little play/pause fix.
2012-03-16 12:28:20 +00:00
Mark Liversedge
43b1c61d6b Add Device Wizard
Introduce a wizard for adding realtime devices since it
is prone to user error, is relatively complicated and is
something most users will only ever do once or twice.

There are several logical updates within this patch:

First; Fix intermittent ANT+ not working
* LibUsb     - check bufRemaining is > 0 not non-zero
* LibUsb     - Always reset the USB stick on open
* ANT.cpp    - Support > 4 channels on USB2
* ANTChannel -  Do not use pairing, but always
*               unassign, assign and set channel id.

Second; Fix device discovery
* Find and discover support in realtime controllers
* Extend Serial.cpp to cover more Serial devices
* Support for 4 or 8 ANT channels for USB1/USB2

Third; Introduce Add Device Wizard with
* General and Specific wizard pages for each device type
* Device pairing with telemetry display
* fixed compile time warnings

Fourth; Update Device Config Page
* use wizard to add new device
* remove edit fields, replaced by wizard
* remove pair, firmware buttons replaced by wizard

Fifth; Deprecate/Remove Device Types
* Null Device - used by developers only
* Quarqd client - replaced by Native ANT+
* GC Server - not implemented yet

I have also introduced a device specific wheel size
and flags for controlling the default selection and
sources for sensor data when in multi-device mode. These
are not yet supported in the code.

Fixes #611.
Fixes #497.
2012-01-21 20:28:33 +00:00
Mark Liversedge
0a6875df3b Fix Crash on no ErgFile selected
Fixes #600.
2012-01-14 15:34:42 +00:00
Mark Liversedge
20f4a0659f Hold down FFwd/Rewind Buttons to skip
When jumping forward and back through a workout
the FFwd/Rewind buttons can now be held down to
auto-repeat and skip quickly.
2012-01-13 19:13:47 +00:00
Andrew Bryson
ea50611649 Add lap time remaining data series
Fixes Feature #592.
2012-01-13 17:52:07 +00:00
Mark Liversedge
3b85037a7b FFwd and Rewind Video (VLC)
When using the fast forward and rewind buttons for
a workout we now also fast forward and rewind the
video playback on Linux/Windows.

The same feature needs to be incorporated under
Mac where we use QTKit for video playback.

Fixes #594.
2012-01-12 11:39:31 +00:00
Andrew Bryson
f3594d5dd0 Fixed lap averages only working with lap button
Fixes bug 590.

Lap averages will now correctly reset on a new lap from an erg file.
2012-01-11 20:23:21 +00:00
Mark Liversedge
a3c75eff7d Fix Computrainer Manual Ergo Mode LOAD display
When working with a computrainer in manual ergo mode
the display does not update as the load is increased
and decreased.

Fixes #586.
2012-01-11 20:13:08 +00:00
Mark Liversedge
9f91617161 Further fixup for USB2 sticks
Added a usb_init() call prior to starting a workout, this
appears to clear state inside libusb.

Also added some commented code for displaying diagnostics
when sending/receiving ANT messages.

This should make the ANT+ connection more robust on first
use, since subsequent uses are now fine.

This may be related to the state the USB host controller (stick)
is left in after we first connect, more investigation is required.
2012-01-06 16:57:39 +00:00
Mark Liversedge
51dccacb52 Restore SpinScan
The recent commit for multi device support cleared
the spinscan data, breaking the plot updates. This update
retrieves the spinscan data if a computrainer has been
selected for the workout.
2012-01-06 09:47:21 +00:00
Mark Liversedge
f97e700ea1 Clear device list before reload on config change 2012-01-05 21:22:23 +00:00
Andrew Bryson
0e48e57c41 Reset the lap timer based on erg file
Resets the lap timer when we get to a new lap in a training plan.
Previously it would only reset when the user pressed lap

fixes Bug #576
2012-01-05 20:53:16 +00:00
Mark Liversedge
30f1113ac5 Add Multi-device support in Train View
It is now possible to select multiple devices to
workout with.

To enable multi-device support a new setting in
tools->options (preferences on Mac) allows the
user to enable multi-device selections (this just
enables the user to select more than one device
in the side bar).

When a workout is started the user can select which
devices will supply which data.

This enables ANT+ devices to override information
provided by Computrainers or Fortius devices.

Fixes #578.
2012-01-05 20:47:04 +00:00
Mark Liversedge
265e310a9c Fix nan/inf values for Virtual Speed. 2011-12-21 18:56:39 +00:00
Mark Liversedge
98e504e382 Virtual Speed
Tom Compton of AnalyticCycling.com has provided
a formula to calculate virtual speed based upon
slope, weight, power, cdA, crr and air density.

This is now implemented as 'Virtual Speed'.

It is expected that this new virtual speed will
be used to control streetview, video rendering
and future implementations of group riding over
a predefined course.

Fixes #527.
2011-12-21 17:22:37 +00:00