ANT.cpp now emits a signal for each ANTMessage
ANTlocalController wires up this signal to a slot in ANTLogger which
writes the message to antlog.bin
Signed-off-by: dhague <darren.hague@fortybeans.com>
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.
When working with ANT+ devices the load dial always
showed zero, because the ANT device was not updating
the realtime data with the desired load.
In addition, the target load telemetry always showed
watts even when working in slope mode (where it should
show the gradient).
Fixes#532.
The training view (aka realtime) is now configurable
allowing users to drag and drop appropriate charts
and dials onto the main view.
The controls for this view are static and comprise the
old controls with start/stop buttons, device selections etc.
I have removed deprecated code too, the following are removed
from the repository;
* ViewSelection
* RealtimeWindow
* TrainWindow
* TrainTabs
Fixes#290.
Second stage of development, refactored the quarqd sources and introduced
an ANTChannel and ANTMessage class.
This is a functional patch and should work with known ANT+ devices, but
has only been tested with a Garmin HR strap, GSC-10 dual speed/cadence
and SRM wireless cranks. It has only been tested with a first generation
Garmin ANT+ USB stick.
It *should* work with other devices (e.g. Powertap, Quarq) but this has
not been tested.
The configuration pane has not been fixed yet, so you can either add a
Native ANT+ device and leave the profile blank (it will autodiscover
whatever it can when you run) or you can copy the profile from a Quarqd
device and use that.
There are lots of bugs;
* Calibration is not supported, uses a static srm_offset
* Wheel circumference is fixed at 2100mm for speed calculations
* Timeouts are hit and miss and need to be completed
* Sensor loss / timeouts are not managed yet
* Burst data and Acks are not handled
* Device descriptions, versions and battery messages are not handled
Aside from the bugs above part 3 wil also need to include;
* Configuration screen fixups and device pairing
* Add a calibration button to the realtime window
Lastly, the refactoring of the quarqd code is incomplete, there is still
a need to use ANTMessage across the code, especially within the ANTChannel
code which still does a bit of decoding locally.
First stage of development, folding together the
quarqd sources and creating an ANT+ worker and controller
to work with realtime window.
The basic code is folded together and compiles fine. The next
step is to address the channel management code, device discovery
channel assignment and channel event handling. This will be pushed
as part of the next commit.
The third commit will need to fixup the configuration pages to
support selection of device/baudrate, fix native discovery/pairing
in config and lastly, fix a long standing issue with the config pane
to allow editing of existing device configurations.
This is NOT a functional patch yet, but compiles and runs fine. Committed
as a checkpoint before refactoring quarqd supplied code.