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