mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
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.
This commit is contained in:
@@ -328,8 +328,24 @@ find_devices(char *result[], int capacity)
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
int count = 0;
|
||||
|
||||
// updated serial regexp to include many more serial devices, regardless of whether they are
|
||||
// relevant for PT downloads. The original list was rather restrictive in this respect
|
||||
//
|
||||
// To help decode this regexp;
|
||||
// /dev/cu.PL2303-[0-9A-F]+ - Prolific device driver for USB/serial device
|
||||
// /dev/ANTUSBStick.slabvcp - Silicon Labs Virtual Com driver for Garmin USB1 stick on a Mac
|
||||
// /dev/SLAB_USBtoUART - Silicon Labs Driver for USB/Serial
|
||||
// /dev/usbmodem[0-9A-F]+ - Usb modem module driver (generic)
|
||||
// /dev/usbserial-[0-9A-F]+ - usbserial module driver (generic)
|
||||
// /dev/KeySerial[0-9] - Keyspan USB/Serial driver
|
||||
// /dev/ttyUSB[0-9] - Standard USB/Serial device on Linux/Mac
|
||||
// /dev/ttyS[0-2] - Serial TTY, 0-2 is restrictive, but noone has complained yet!
|
||||
// /dev/ttyACM* - ACM converter, admittidly used largely for Mobiles
|
||||
// /dev/ttyMI* - MOXA PCI cards
|
||||
// /dev/rfcomm* - Bluetooth devices
|
||||
if (regcomp(®,
|
||||
"^(cu\\.(PL2303-[0-9A-F]+|SLAB_USBtoUART|usbmodem[0-9A-F]+|usbserial-[0-9A-F]+|KeySerial[0-9])|ttyUSB[0-9]|ttyS[0-2])$",
|
||||
"^(cu\\.(PL2303-[0-9A-F]+|ANTUSBStick.slabvcp|SLAB_USBtoUART|usbmodem[0-9A-F]+|usbserial-[0-9A-F]+|KeySerial[0-9])|ttyUSB[0-9]|ttyS[0-2]|ttyACM*|ttyMI*|rfcomm*)$",
|
||||
REG_EXTENDED|REG_NOSUB)) {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user