]>
Commit | Line | Data |
---|---|---|
86e35a10 | 1 | diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.cpp QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.cpp |
2 | --- QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.cpp 2007-03-12 20:21:53.000000000 +0100 | |
3 | +++ QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.cpp 2007-03-24 20:34:45.000000000 +0100 | |
4 | @@ -64,11 +64,11 @@ | |
5 | serial->open(); | |
6 | serial->syncup(); | |
7 | ||
8 | - if(strncmp(serial->getProductString().c_str(), "eTrex Legend", 12) != 0){ | |
9 | - throw exce_t(errSync,"No eTrex Legend unit detected, according to ProductString. Please retry to select other device driver."); | |
10 | + if(serial->getProductString().compare(0,devname.size(),devname) != 0){ | |
11 | + throw exce_t(errSync,"No "+devname+" unit detected, according to ProductString. Please retry to select other device driver."); | |
12 | } | |
13 | - if(serial->getProductId() != GRMN_ETREX_LEGEND){ | |
14 | - throw exce_t(errSync,"No eTrex Legend unit detected, according to ProductId. Please retry to select other device driver."); | |
15 | + if(serial->getProductId() != devid){ | |
16 | + throw exce_t(errSync,"No "+devname+" unit detected, according to ProductId. Please retry to select other device driver."); | |
17 | } | |
18 | ||
19 | } | |
20 | diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.h QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.h | |
21 | --- QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.h 2007-02-20 14:09:53.000000000 +0100 | |
22 | +++ QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.h 2007-03-24 20:13:22.000000000 +0100 | |
23 | @@ -33,6 +33,9 @@ | |
24 | public: | |
25 | CDevice(); | |
26 | virtual ~CDevice(); | |
27 | + | |
28 | + std::string devname; | |
29 | + uint32_t devid; | |
30 | ||
31 | private: | |
32 | void _acquire(); | |
33 | diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/EtrexLegend.pro QLandkarte.2007.03.16/src/device/EtrexLegend/EtrexLegend.pro | |
34 | --- QLandkarte.2007.03.16.old/src/device/EtrexLegend/EtrexLegend.pro 2007-03-04 11:56:33.000000000 +0100 | |
35 | +++ QLandkarte.2007.03.16/src/device/EtrexLegend/EtrexLegend.pro 2007-03-24 20:41:51.000000000 +0100 | |
36 | @@ -5,7 +5,7 @@ | |
37 | ||
38 | include(../../../common) | |
39 | ||
40 | -INSTALLS += target | |
41 | +INSTALLS += target target2 | |
42 | target.path = $${QLANDKARTE_LIBDIR} | |
43 | TARGETDEPS += ../../../src/device/libgarmin.a | |
44 | LIBS += ../../../src/device/libgarmin.a | |
45 | @@ -21,3 +21,7 @@ | |
46 | HEADERS += CDevice.h | |
47 | SOURCES += CDevice.cpp \ | |
48 | loader.cpp | |
49 | + | |
50 | +QMAKE_POST_LINK = cd ${DESTDIR} && ln -sf ${TARGET} libEtrexVista.so | |
51 | +target2.path = $${QLANDKARTE_LIBDIR} | |
52 | +target2.commands = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVista.so | |
53 | diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/loader.cpp QLandkarte.2007.03.16/src/device/EtrexLegend/loader.cpp | |
54 | --- QLandkarte.2007.03.16.old/src/device/EtrexLegend/loader.cpp 2007-02-20 14:09:53.000000000 +0100 | |
55 | +++ QLandkarte.2007.03.16/src/device/EtrexLegend/loader.cpp 2007-03-24 20:39:10.000000000 +0100 | |
56 | @@ -36,5 +36,20 @@ | |
57 | if(EtrexLegend::device == 0){ | |
58 | EtrexLegend::device = new EtrexLegend::CDevice(); | |
59 | } | |
60 | + EtrexLegend::device->devname = "eTrex Legend"; | |
61 | + EtrexLegend::device->devid = 411; | |
62 | + return EtrexLegend::device; | |
63 | +} | |
64 | + | |
65 | +extern "C" Garmin::IDevice * const initEtrexVista(const char * version) | |
66 | +{ | |
67 | + if(strncmp(version,INTERFACE_VERSION,5) != 0){ | |
68 | + return 0; | |
69 | + } | |
70 | + if(EtrexLegend::device == 0){ | |
71 | + EtrexLegend::device = new EtrexLegend::CDevice(); | |
72 | + } | |
73 | + EtrexLegend::device->devname = "eTrex Vista"; | |
74 | + EtrexLegend::device->devid = 169; | |
75 | return EtrexLegend::device; | |
76 | } | |
77 | diff -uNdr QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/GPSMap60CSx.pro QLandkarte.2007.03.16/src/device/GPSMap60CSx/GPSMap60CSx.pro | |
78 | --- QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/GPSMap60CSx.pro 2007-03-24 20:07:46.000000000 +0100 | |
79 | +++ QLandkarte.2007.03.16/src/device/GPSMap60CSx/GPSMap60CSx.pro 2007-03-24 20:44:37.000000000 +0100 | |
80 | @@ -5,7 +5,7 @@ | |
81 | ||
82 | include(../../../common) | |
83 | ||
84 | -INSTALLS += target target2 target3 | |
85 | +INSTALLS += target target2 target3 target4 | |
86 | target.path = $${QLANDKARTE_LIBDIR} | |
87 | TARGETDEPS += ../../../src/device/libgarmin.a | |
88 | LIBS += ../../../src/device/libgarmin.a | |
89 | @@ -21,9 +21,13 @@ | |
90 | SOURCES += CDevice.cpp \ | |
91 | loader.cpp | |
92 | ||
93 | -QMAKE_POST_LINK = cd ${DESTDIR} && ln -sf ${TARGET} libGPSMap60Cx.so && ln -sf ${TARGET} libEtrexVentureCx.so | |
94 | +QMAKE_POST_LINK = cd ${DESTDIR} && ln -sf ${TARGET} libGPSMap60Cx.so && ln -sf ${TARGET} libEtrexVentureCx.so \ | |
95 | + && ln -sf ${TARGET} libEtrexVistaCx.so | |
96 | target2.path = $${QLANDKARTE_LIBDIR} | |
97 | target2.commands = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libGPSMap60Cx.so | |
98 | ||
99 | target3.path = $${QLANDKARTE_LIBDIR} | |
100 | -target3.commands = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVentureCx.so | |
101 | \ No newline at end of file | |
102 | +target3.commands = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVentureCx.so | |
103 | + | |
104 | +target4.path = $${QLANDKARTE_LIBDIR} | |
105 | +target4.commands = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVistaCx.so | |
106 | diff -uNdr QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/loader.cpp QLandkarte.2007.03.16/src/device/GPSMap60CSx/loader.cpp | |
107 | --- QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/loader.cpp 2007-03-03 17:00:24.000000000 +0100 | |
108 | +++ QLandkarte.2007.03.16/src/device/GPSMap60CSx/loader.cpp 2007-03-24 20:43:25.000000000 +0100 | |
109 | @@ -67,3 +67,17 @@ | |
110 | ||
111 | return GPSMap60CSx::device; | |
112 | } | |
113 | + | |
114 | +extern "C" Garmin::IDevice * const initEtrexVistaCx(const char * version) | |
115 | +{ | |
116 | + if(strncmp(version,INTERFACE_VERSION,5) != 0){ | |
117 | + return 0; | |
118 | + } | |
119 | + if(GPSMap60CSx::device == 0){ | |
120 | + GPSMap60CSx::device = new GPSMap60CSx::CDevice(); | |
121 | + } | |
122 | + GPSMap60CSx::device->devname = "eTrex VistaCx"; | |
123 | + GPSMap60CSx::device->devid = 0x01a5; | |
124 | + | |
125 | + return GPSMap60CSx::device; | |
126 | +} |