mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
This patch adds support for the Garmin USB2 stick using libusb-win library. Instructions are included in gcconfig.pri.in for configuring and installing the neccessary libs. To enable support for USB1 and USB2 support in the same binary stubs are created when UsbXpress/Libusb are not available and the device i/o attempts to use USB2 before falling back to USB1. Since I was also in the middle of some coding changes I merged my developments (Mark) with Darren's patch whilst fixing it up for commit, namely: 1. the configuration screen no longer demands a COMx port when using Native ANT+ on Windows. 2. new signals in ANTChannel notify the ANT class when info is stale or lost (but they are not used at present). 3. The previous debug messages have been removed, although new debug messages are added for stale/drop/timeout signals.
66 lines
2.2 KiB
C++
66 lines
2.2 KiB
C++
/*
|
|
* Copyright (c) 2009 Mark Liversedge (liversedge@gmail.com)
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc., 51
|
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
|
|
// Lists all the device types supported
|
|
|
|
#ifndef _GC_DeviceTypes_h
|
|
#define _GC_DeviceTypes_h 1
|
|
#include "GoldenCheetah.h"
|
|
|
|
#include <QList>
|
|
|
|
#define DEV_PT 0x0001
|
|
#define DEV_SRM 0x0002
|
|
#define DEV_CT 0x0010
|
|
#define DEV_ANTPLUS 0x0020 // Quarqd ANT+ device
|
|
#define DEV_NULL 0x0040
|
|
#define DEV_ANTLOCAL 0x0080 // Local ANT+ device
|
|
#define DEV_GSERVER 0x0100 // NOT IMPLEMENTED IN THIS RELEASE XXX
|
|
#define DEV_GCLIENT 0x0200 // NOT IMPLEMENTED IN THIS RELEASE XXX
|
|
|
|
#define DEV_QUARQ 0x01 // ants use id:hostname:port
|
|
#define DEV_SERIAL 0x02 // use filename COMx or /dev/cuxxxx
|
|
#define DEV_TCP 0x03 // tcp port is hostname:port NOT IMPLEMENTED IN THIS RELEASE
|
|
#define DEV_USB 0x04 // use filename COMx or /dev/cuxxxx
|
|
|
|
class DeviceType
|
|
{
|
|
public:
|
|
int type; // type specifier - not sure if neccessary
|
|
int connector; // is it a serial or tcp device?
|
|
char *name; // narrative name
|
|
bool realtime; // can it do realtime
|
|
bool download; // can it do download?
|
|
};
|
|
|
|
class DeviceTypes
|
|
{
|
|
public:
|
|
DeviceTypes();
|
|
~DeviceTypes();
|
|
|
|
QList<DeviceType> Supported; // all the supported types in a list
|
|
QList<DeviceType> getList(); // returns a list of the supported device types
|
|
|
|
DeviceType getType(int); // return all details for type x
|
|
};
|
|
|
|
#endif // _GC_DeviceTypes_h
|
|
|