Commit Graph

9 Commits

Author SHA1 Message Date
Dave Waterworth
789074cede More Fortius Fixes
Including:
   * Fixed a type with slope mode updating the wrong byte array
   * Transposed bytes in the definition of the erg and slope messages
   * Added power smoothing

Note:
   It appears the Fortius is supplying torque not power, some more
   testing is being performed but expect to see an update shortly
   once this has been fully tested.
2013-07-15 08:34:09 +01:00
Dave Waterworth
a0f206c015 Fix Tacx Fortius Device Support
Multiple fixups for Tacx Support -- as a result the support
is now pencilled in for full support in 3.0 SP1.

Fixes #24.
2013-07-09 11:02:42 +01:00
Mark Liversedge
caec4ee0fe Code Cleanup: Remove #if 0 code
As a personal habit I tend to use the C pre-processor to
comment out code blocks I don't want to remove. This is in
case the code will be required in the future.

I think it is now safe to say the code commented out is not
required -- most of it is legacy and marks the transition from
earlier designs or legacy code.

I've done this in one big commit since in theory it has no
functional change, and in future can look in this commit for any
code we may want to reinstate.
2013-02-11 15:00:00 +00:00
Mark Liversedge
3ca7f1a5d2 Add Device Wizard
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.
2012-01-21 20:28:33 +00:00
Ilja Booij
bde74df0c8 Fix Heartrate support for Tacx Fortius
The heartrate value is present in byte 13 of the
received data.

Fixes #555.
2011-12-29 22:07:41 +00:00
Mark Liversedge
d59ed3fa3f remove debug from Fortius.cpp. 2011-12-21 16:33:05 +00:00
Mark Liversedge
5c7f618a85 Fix Fortius Power Smoothing
Recent fixups introduced a delay of 50ms when
reading from the Fortius controller to avoid
interrupt write errors.

The smoothing of power data was not adjusted to
take into account the reduced frequency of
telemetry updates.

We now smooth at 16hz not 60hz.
2011-12-21 16:16:37 +00:00
Mark Liversedge
4b9a618859 Tacx Fortius fixes for Mac OSX
Under Mac OSX the Tacx Fortius support needed
a few minor tweaks;

* sleep 60ms between read/write operations to
  avoid interrupt errors

* clear_halt on read/write endpoints before
  attempting to read/write to the device

* remove the errant usb_reset which really should
  not have been called in LibUsb since it deletes
  the device structure(!)

The LibUsb class has been modified to clear_halt
when opening ANT devices too -- since regression
testing on Mac showed that a) you need the latest
drivers to work with a USB2 stick on Lion (64bit)
and it now appears to mandate a clear_halt when
opening the device (but this may be related to the
Garmin ANT agent leaving it in an unknown state).
2011-12-17 12:31:25 +00:00
Mark Liversedge
abfcf078fc Tacx Fortius Support
Initial support for Tacx Fortius devices.

Note this requires libusb support to be present and will
work on Linux, Mac and Windows.

The handlebar buttons up/down will increase/decrease the
load/intensity in a similar fashion to the +/- keys on
the Computrainer controller.

The cancel button will stop a workout and the enter key
is used to mark a lap.

Slope and Ergo modes are supported, but we do not set the
brake at all if the speed is below 10kph, this is to
ensure it does not get burnt out when users 'grind'.

SPECIAL NOTE:

   The Fortius handlebar controller is a Ez-Usb device
   and requires firmware to be loaded when it is connected.
   Since this is copyrighted by Tacx BV we do not distribute
   it, instead, when the user sets up a Fortius device they
   must also provide the file. Full instructions on how this
   should be done are given when configuring the device.

Additionally, for Linux users udev rules should be added to
ensure that the USB devices are accessible to non-root users.

Fixes #538.
2011-12-12 17:26:59 +00:00