Commit Graph

31 Commits

Author SHA1 Message Date
Rainer Clasen
5d1e67b5f5 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
356a80a448 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
53391f76fc Remove Boost Dependency - The Easy Bits
Replace boost stuff with QT or C++ equivalents
2012-12-27 17:04:36 +00:00
Alejandro Martinez
f770d6ea09 Enable DataProcessor Translation
Also includes download instructions translation
2012-12-08 12:37:01 -03:00
Rainer Clasen
30516c3b76 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
1b8933969a Download: indicate download stage
Indicate what part of download (preview/actual download) is ongoing.
2012-02-11 21:06:37 +01:00
Rainer Clasen
43dfc3eb85 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
af87c812ff 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
63a0216a2e 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
07e1007957 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
50fef04b75 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
16d7757411 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
e1f2128e27 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
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Sean Rhea
f323780848 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
5cd621f800 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
97156c3637 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
278fd14af7 add option to clear srm memory after download 2009-08-18 04:37:50 -07:00
Sean Rhea
83ce4d1f59 abstract instructions; use combo for port, too 2009-08-09 15:34:53 -07:00
Sean Rhea
5461e07fcd add combobox to select device type 2009-08-09 15:34:46 -07:00
Sean Rhea
502cb4b60f abstract Device to support multiple device types 2009-08-09 15:34:39 -07:00
Sean Rhea
9624cd03a9 move all PT-specific code out of DownloadRideDialog 2009-08-09 15:34:32 -07:00
Sean Rhea
a01bc21ece localize PT-specific code in DownloadRideDialog 2009-08-09 15:33:49 -07:00
Sean Rhea
f588082449 clean up headers 2009-08-09 15:33:41 -07:00
Sean Rhea
356ee341b2 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
563285ab9d move filename calculation to downloadClicked()
...in preparation for moving more of DownloadRideDialog into PowerTapDevice.
2009-08-09 15:33:23 -07:00
Sean Rhea
6dee00e5b8 move PT download code into PowerTapDevice.(h|cpp) 2009-08-09 15:33:16 -07:00
Sean Rhea
1c732ed2cc 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
9d22cc3dc8 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
9e4d237ce9 pop up a warning if we can't find libftd2xx 2009-01-24 20:09:13 +00:00
Sean C. Rhea
6e5487ca39 everything in one directory 2008-05-12 03:28:53 +00:00