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.
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.
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.
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.