In training mode, calculations of speed using wheel size and RPM from
a speed sensor used integer division. This truncated all wheel
circumferences to an integral number of meters. 2100mm wheels were
treated as 2 meters and 1960mm wheels were treated as 1 meter,
effectively reducing calculated speeds by roughly 5% and 50%
respectively.
Fixes#585Fixes#651Fixes#669
.. 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.
Ensure the Kickr and BT40 devices can co-exist by
ignoring subtypes.
Also introduced a deviceFound signal so we can get a
device pairing page for BT40 (non-Kickr) devices.
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
Changed the WF API wrapper to return a sensor connection
descriptor (int) in the same way open/close system calls
return a file descriptor.
This means we will be able to setup multiple connections
at once .. but not neccessarily in separate threads.
No need to scan first, connect directly to
the previouslt paired device uuid.
By no longer scanning we can have multiple
threads connecting at once without conflicting
with each other.
The load setting was not working properly, this update
ensures the load is set 10 times a second, but will
generate errors even though the device claims to be
connected.
Also added a few new methods to get/singal connection
status in the code.
Fixed up the Kickr code to resend the load if the
user is generating more than 50% over the load or
is only generating 50% of the load.
This is in case the last message was not processed
for some reason (connection being established, or
noise).
A number of memory management errors fixed, no doubt there
are more lurking in there.
* CocoaInitializer now sets up an application wide NSAutoreleasePool
* Kickr now init/releases an NSAutoreleasePool for its thread
* Local autorelease pools in constructors etc have been removed
* Searchbox and Button no longer release in the constructor
The icon corruption seems to be improved (I think it is a memory
management issue) but has not been totally removed.
This finalises beta support for the Wahoo Kickr
using their WFConnector API for BTLE.
This support will only work on Mac OSX - pending
ANT+ support to be available and/or BTLE support
is made available on Windows and Linux.
Fixes#446.
.. connects and disconnects to the Kickr
.. gets instant telemetry
Still need to sort the other channels (are there
any?) and also set load and gradient.
Pretty close and need to then clean up the qDebug
messages and we have a first pass at Kickr support.
It was because the connector was still searching when
asked it to connect to a sensor. We now cancel any
search before attempting to connect.
But sadly, the connection is dropped and a bunch of
error messages popup about firmware.