... change storage format to .INI files (which is QTs cross-system format)
... differentiate between System, Global and Athlete specific settings
... store the Global Settings in the AthleteDirectory (root)
... store the Athlete specific Settings in the Athletes Names subdir /config
... migrate existing Settings from current location into new formats "on-the-fly"
.. introduce concept of configChanged(what) to
pass details of what config has been changed
.. fixed zones changes to re-read after write
to correct the save twice to get changes to
zones bug.
.. next parts need to spot changes (part 2) and
then action appropriately (part 3)
... create folder structure for existing and new athletes
... upgrade existing athlete to new structure when opening / incl.
logging and error handling
... convert any "Downloaded" file to .JSON directly - store source file
in /downloads
... convert any "Imported" file to .JSON directly - store source file in
/imports
.. added config and page decoding for Moxy
Next steps are (2) add telemetry to realtime data structure
and display on the realtime chart and telemetry
(3) add SmO2 and tHb to file format which means moving
away from powertap csv format (!)
... introduce new "home" Folder structure object representing the
previous flat-folder
... adjust relevant QDir home - access to use the sub-folder method of
the new object
Note: the new structure is not yet active ! - everything is written to
the main folder still
To Do:
... add upgrade procedure for existing folder content to merge to the
new folders
.. the code has been updated to support the Wahoo Kickr
via an ANT+ USB stick.
.. this requires the Kickr to be running a beta firmware
of version v1.3.15. This can only be loaded via the
Wahoo utility.
.. for those that have access to the beta firmware this
patch will work, for all others they will need to wait
for the formal release by Wahoo.
.. the code contains *lots* of debug and does not yet support
calibration and slope mode is largely untested.
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
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.
Further updates will need to;
- 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
Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
.. warnings from Xcode 4.6 (still some remaining)
.. and deprecated Quarqd code (we have native ANT now)
.. and MultiWindow deprecated (it isn't finished)
.. the code assumes the kickr connection will always work, even
when no BTLE hardware is present.
If no BTLE hardware is available then connections fail immediately
and so do attempts to find devices.
If BTLE hardware is available but the kickr connection cannot be
established in 30 seconds in train view then it returns an error.
Also added better device descriptions to check the device subtype
so we can identify stages, inride and kickr separately.
A few fixups for BT40 discovery, we now search for BT40
devices properly.
- delete BT40 properly
- scan for longer
- return count of total found
- a few fixups to logic in AddDeviceWizard
Now need to update the pair screen to let the user
select/deselect sensors that are part of this "device".
Then obviously update the BT40/Controller for runtime
activity (and filter out the RFLKT since it will have
its own device type.
Just a checkpoint before BT40 pair updates to connect with
each found sensor and display current data on the pair screen.
This is so the user can select the devices they want to be
included in this device definition (if they have lots of
BTLE devices).
I guess this is gonna mostly be dcrainmaker and wahoo employees!
To enable support of BTLE (BT 4.0 'smart') devices
as well as the Kickr.
Very basic skeleton code to get started. Will need
to;
- add a BTLE 'pair' in AddDeviceWizard
- use profile not portspec for the uuids
- filter out RFLKT and KICKR as they have their
own device types
- fixup BT40.cpp which is KICKR code in this commit
.. because it blocks the event loop that hosts the WF API
class. And we definitely want it to stay on the main event
loop along with the native WF classes and delegates.
Added virtual power calculations for a Minoura V100
with one selection for whichever gear it is set to.
Thanks to 'frenchman' on the slowtwitch forums for
working out the formulae.
A timing issue - when cancelling the background scan
it is possible for the next scan to be performed after
the controller has been deleted.
This is an edge condition and pretty rare, but since it
causes a crash pretty high impact.
The logic for the AddSearch page (which only appears
if the user did not have the device connected when the
initial scan is performed) would find the device and then
terminate without moving on to the final page.
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.