Commit Graph

36 Commits

Author SHA1 Message Date
Mark Liversedge
77278b2ed1 A lot less assert
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.

By 3.1 we will have eradicated assert from the code.
2013-08-04 11:06:07 +01:00
Mark Liversedge
8df5cf8778 A little less MainWindow.h
.. slowy removing it everywhere.
2013-07-18 09:37:32 +01:00
Mark Liversedge
47814846d9 MainWindow Refactor Part 3 of 5
Slowly migrating code  and data from the MainWindow
class to Athlete and Context classes.

This update moves the ride and interval lists and
data structures from MainWindow to Athlete.
2013-07-13 19:46:03 +01:00
Mark Liversedge
0fcbbe1b77 Refactor MainWindow Part 2 of 5
Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).

We no longer pass around a MainWindow pointer to children
but pass a context instead.

There are still a few pieces left in MainWindow that need
to move to a better place;
    * Setting/clearing filter selection
    * Working with Intervals
    * Adding/Deleting Rides
    * Save on Exit

As mentioned previously there are lots of other parts to
this refactor left to do;
    * break MainWindow Gui elements into Toolbar and Views

    * migrate from RideItem and Ridelist to ActivityCollection
      and Activity classes that are not tied into gui elements.

    * introduce Application Context and AthleteCollection
2013-07-11 14:02:02 +01:00
Mark Liversedge
d95a03ed2f Code Cleanup: Device Downloading
.. all comments are suggestions not mandatory and we have a feature
request system for that.
2013-02-11 14:12:41 +00:00
Rainer Clasen
a2af765f31 Remove Boost - SrmDevice
converted SrmDevice to use signals instead of callback.
Also add missing erase connections.

Signed-off-by: Andy Bryson <agbryson@gmail.com>
2012-12-29 18:32:22 +00:00
Andy Bryson
be7b9f44bb Remove Boost Dependency - Devices
All devices no longer need boost (use signals and slots instead), other
than SRM.
2012-12-29 18:32:22 +00:00
Andy Bryson
ff546e8471 Remove Boost Dependency - The Easy Bits
Replace boost stuff with QT or C++ equivalents
2012-12-27 17:04:36 +00:00
Alejandro Martinez
374129e007 Enable DataProcessor Translation
Also includes download instructions translation
2012-12-08 12:37:01 -03:00
Rainer Clasen
c82455be75 Download: remeber last used device/port
last used Device/Port ist now remembered and automatically selected on
next download.

closes #683
2012-05-04 21:01:22 +02:00
Rainer Clasen
6ff7a5e148 Download: indicate download stage
Indicate what part of download (preview/actual download) is ongoing.
2012-02-11 21:06:37 +01:00
Rainer Clasen
1490102e8d Device: allow status updates from all methods
turned statusCallback into a member of Device (instead of a parameter to
download() and preview(). This allows all methods to access it, directly
and provide better feedback during open/close/erase.
2012-02-11 15:07:31 +01:00
Rainer Clasen
8718e144c0 DownloadDialog: handle unset/invalid timestamps
the bad timestamp initialization in PowerTapDevice showed a lack of
error handling.

This patch makes the DownloadDialog handle bad timestamps more graceful.
Actually it falls back to the current time and allows for later fixing.
2011-07-28 22:45:55 +02:00
Rainer Clasen
61ade35920 download: port list comfort
if the devices have a way to identify which CommPort they support and if
CommPorts are just for this device, this is now taken into account for the
port combo box:

Unsupported ports (i.e. currently D2xx for srm) aren't shown for the
selected device type.

Serial ports that are hard-wired to a certain device type (like built in
USB2Serial adapters in PC6/7) aren't offered for other devices, as well.

As a temporary hack, this PCV claims /dev/cu.*PL2303 to be "his". Of
course this has to go, if/when we start supporting other devices with
built in prolific usb2serial adapter or native serial interface (that
might get connected to a prolific adapter).

If we find a way to gather more details for the available ports, we can
extend this quite easily. Possible ideas:
 - hald (obsolete)
 - libudev (linux specific)
 - kdelibs solid (linux specific?)
2011-07-25 17:05:32 +02:00
Rainer Clasen
4213cf0041 Download: made status text scrollable
Previous commits turned the status/"Instructions" label into a log. This
allows to show a lot more information that simplify troubleshooting
download issues.

To make it behave a bit more as expected, this change turns the label
into a readonly QTextEdit.
2011-07-24 17:14:48 +02:00
Rainer Clasen
9c3bab727c allow download of multiple files - for PC7
The new powercontrols have a lot more memory and they allow you to
selectively download the recorded "rides". Looking at srmwin, this seems
to be the suggested way of operation. (i.e. record multiple workouts,
download only the "new" ones).

Furthermore, the SRM file format has some limits (timespan, total number
of records), that make it inapropriate to store "all rides" into one file
and split it later.

So download now
- tries to get a list of rides of the device
  - if it gets any, the user can get prompted to choose which to download.
- let device download (selected/all) rides, split if necessary and return
  a list with tmp filename, start time, file extension.
- download dialog builds new filename based on time, prompts user for
  overwriting when file exists and renames file.

The download Dialog now stays open, so user can read the status messages
and click "cleanup". This avoids many of the anoying message boxes we had
in the Srm download.

Cleanup's user interaction (confirmation, errors) was moved from the
individual device to DownloadDialog, as well.
2011-07-24 16:58:50 +02:00
Rainer Clasen
dbfbe50df6 split Device class to allow keeping download state
right now there's just one object for each Device type througout the whole
app. This forbids keeping actual state in the Device object during
download/cleanup.

This patch puts the list of supported Devices into a seperate class.
Actual Device objects are now created dynamically.

This is necessary for the upcoming Download changes.
2011-07-24 15:47:28 +02:00
Rainer Clasen
0b4d46cdfe CommPort: keep device names seperate
CommPort::name used to prefix the actual device name/path with the actual
device type to make it unique. This is used in DownloadRideDialog to map
the device dropdown list to the actual device.

This patch seperates name + device type to make the hack in SrmDevice a
bit less ugly: srmio doesn't use the built in CommPort abstraction and
needs the unmodified device names. This is still ugly, but I can't come up
with anything better (... for now).
2011-07-24 13:46:47 +02:00
Mark Liversedge
805e74de5a Inital V3 Branch 2010-12-30 17:35:23 +00:00
Sean Rhea
ebac18144a fix FTDI required for SRM download bug
GC supports two download port types: serial ports and D2XX.  Before, if
either of these failed to load, the download dialog wouldn't show either
port type.  With this patch, if both fail, GC displays a warning, but if
either one succeeds, GC will proceed with only that port type.  This
change should fix the problem that users were having to download and
install both the FTDI drivers and the PL2303 ones in order to download
from the SRM PCV.
2010-02-06 11:38:57 -08:00
Sean Rhea
3b0c4e635e add Erase Ride(s) button to download dialog
This is a workaround for the SRM erase bug.  It gives the user a way to
try erasing the device's memory without re-downloading a ride.
2010-02-06 11:38:56 -08:00
Sean Rhea
f655ce066e auto-select SRM for downloads
Hack: SRM PCV download cables use the PL2203 chipset.  If the
first device name contains "PL2303", then, we're probably dealing
with an SRM, so go ahead and select the SRM device.  Generalize?
2009-12-17 11:36:19 -05:00
Sean Rhea
5c0ad5da25 add option to clear srm memory after download 2009-08-18 04:37:50 -07:00
Sean Rhea
9e765525dd abstract instructions; use combo for port, too 2009-08-09 15:34:53 -07:00
Sean Rhea
e2e4513647 add combobox to select device type 2009-08-09 15:34:46 -07:00
Sean Rhea
47cdc3b62d abstract Device to support multiple device types 2009-08-09 15:34:39 -07:00
Sean Rhea
d8b7aceb1e move all PT-specific code out of DownloadRideDialog 2009-08-09 15:34:32 -07:00
Sean Rhea
9138f98b1d localize PT-specific code in DownloadRideDialog 2009-08-09 15:33:49 -07:00
Sean Rhea
25156c263c clean up headers 2009-08-09 15:33:41 -07:00
Sean Rhea
6881b6f7c0 move calc of d/l status str to PowerTapDevice
...thereby making DownloadRideDialog a little more device-agnostic.
2009-08-09 15:33:35 -07:00
Sean Rhea
c64fae5165 move filename calculation to downloadClicked()
...in preparation for moving more of DownloadRideDialog into PowerTapDevice.
2009-08-09 15:33:23 -07:00
Sean Rhea
9e7de150e9 move PT download code into PowerTapDevice.(h|cpp) 2009-08-09 15:33:16 -07:00
Sean Rhea
d898b6831b rename Device to CommPort
I hate to change so many lines of code just for a little rename, but I want to
distinguish between "devices", like the PowerTap and SRM, and "communications
ports", like the serial port and the native D2XX drivers.  This work is in
preparation for adding direct download support for the SRM.
2009-08-09 10:01:00 -07:00
Justin F. Knotzke
621521a89c Thanks to Ned Harding, Golden Cheetah now support Ant+ Sport. Thanks Ned. Much appreciated.
J
2009-03-18 17:59:46 +00:00
Sean C. Rhea
5353db25df pop up a warning if we can't find libftd2xx 2009-01-24 20:09:13 +00:00
Sean C. Rhea
31b2633496 everything in one directory 2008-05-12 03:28:53 +00:00