SOURCES: QLandkarte-Vista.patch (NEW) - support for eTrex Vista an...

bszx bszx at pld-linux.org
Sun Mar 25 12:22:37 CEST 2007


Author: bszx                         Date: Sun Mar 25 10:22:37 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- support for eTrex Vista and VistaCx

---- Files affected:
SOURCES:
   QLandkarte-Vista.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/QLandkarte-Vista.patch
diff -u /dev/null SOURCES/QLandkarte-Vista.patch:1.1
--- /dev/null	Sun Mar 25 12:22:37 2007
+++ SOURCES/QLandkarte-Vista.patch	Sun Mar 25 12:22:32 2007
@@ -0,0 +1,126 @@
+diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.cpp QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.cpp
+--- QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.cpp	2007-03-12 20:21:53.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.cpp	2007-03-24 20:34:45.000000000 +0100
+@@ -64,11 +64,11 @@
+     serial->open();
+     serial->syncup();
+ 
+-    if(strncmp(serial->getProductString().c_str(), "eTrex Legend", 12) != 0){
+-        throw exce_t(errSync,"No eTrex Legend unit detected, according to ProductString. Please retry to select other device driver.");
++    if(serial->getProductString().compare(0,devname.size(),devname) != 0){
++        throw exce_t(errSync,"No "+devname+" unit detected, according to ProductString. Please retry to select other device driver.");
+     }
+-    if(serial->getProductId() != GRMN_ETREX_LEGEND){
+-        throw exce_t(errSync,"No eTrex Legend unit detected, according to ProductId. Please retry to select other device driver.");
++    if(serial->getProductId() != devid){
++        throw exce_t(errSync,"No "+devname+" unit detected, according to ProductId. Please retry to select other device driver.");
+     }
+ 
+ }
+diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.h QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.h
+--- QLandkarte.2007.03.16.old/src/device/EtrexLegend/CDevice.h	2007-02-20 14:09:53.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/EtrexLegend/CDevice.h	2007-03-24 20:13:22.000000000 +0100
+@@ -33,6 +33,9 @@
+         public:
+             CDevice();
+             virtual ~CDevice();
++	    
++	    std::string devname;
++	    uint32_t devid;
+ 
+         private:
+             void _acquire();
+diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/EtrexLegend.pro QLandkarte.2007.03.16/src/device/EtrexLegend/EtrexLegend.pro
+--- QLandkarte.2007.03.16.old/src/device/EtrexLegend/EtrexLegend.pro	2007-03-04 11:56:33.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/EtrexLegend/EtrexLegend.pro	2007-03-24 20:41:51.000000000 +0100
+@@ -5,7 +5,7 @@
+ 
+ include(../../../common)
+ 
+-INSTALLS += target
++INSTALLS += target target2
+ target.path = $${QLANDKARTE_LIBDIR}
+ TARGETDEPS += ../../../src/device/libgarmin.a
+ LIBS += ../../../src/device/libgarmin.a
+@@ -21,3 +21,7 @@
+ HEADERS += CDevice.h
+ SOURCES += CDevice.cpp \
+            loader.cpp
++
++QMAKE_POST_LINK   = cd ${DESTDIR} && ln -sf ${TARGET} libEtrexVista.so
++target2.path      = $${QLANDKARTE_LIBDIR}
++target2.commands  = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVista.so
+diff -uNdr QLandkarte.2007.03.16.old/src/device/EtrexLegend/loader.cpp QLandkarte.2007.03.16/src/device/EtrexLegend/loader.cpp
+--- QLandkarte.2007.03.16.old/src/device/EtrexLegend/loader.cpp	2007-02-20 14:09:53.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/EtrexLegend/loader.cpp	2007-03-24 20:39:10.000000000 +0100
+@@ -36,5 +36,20 @@
+     if(EtrexLegend::device == 0){
+         EtrexLegend::device = new EtrexLegend::CDevice();
+     }
++    EtrexLegend::device->devname = "eTrex Legend";
++    EtrexLegend::device->devid = 411;
++    return EtrexLegend::device;
++}
++
++extern "C" Garmin::IDevice * const initEtrexVista(const char * version)
++{
++    if(strncmp(version,INTERFACE_VERSION,5) != 0){
++        return 0;
++    }
++    if(EtrexLegend::device == 0){
++        EtrexLegend::device = new EtrexLegend::CDevice();
++    }
++    EtrexLegend::device->devname = "eTrex Vista";
++    EtrexLegend::device->devid = 169;
+     return EtrexLegend::device;
+ }
+diff -uNdr QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/GPSMap60CSx.pro QLandkarte.2007.03.16/src/device/GPSMap60CSx/GPSMap60CSx.pro
+--- QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/GPSMap60CSx.pro	2007-03-24 20:07:46.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/GPSMap60CSx/GPSMap60CSx.pro	2007-03-24 20:44:37.000000000 +0100
+@@ -5,7 +5,7 @@
+ 
+ include(../../../common)
+ 
+-INSTALLS += target target2 target3
++INSTALLS += target target2 target3 target4
+ target.path = $${QLANDKARTE_LIBDIR}
+ TARGETDEPS += ../../../src/device/libgarmin.a
+ LIBS += ../../../src/device/libgarmin.a
+@@ -21,9 +21,13 @@
+ SOURCES += CDevice.cpp \
+            loader.cpp
+ 
+-QMAKE_POST_LINK   = cd ${DESTDIR} && ln -sf ${TARGET} libGPSMap60Cx.so && ln -sf ${TARGET} libEtrexVentureCx.so
++QMAKE_POST_LINK   = cd ${DESTDIR} && ln -sf ${TARGET} libGPSMap60Cx.so && ln -sf ${TARGET} libEtrexVentureCx.so \
++		     && ln -sf ${TARGET} libEtrexVistaCx.so
+ target2.path      = $${QLANDKARTE_LIBDIR}
+ target2.commands  = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libGPSMap60Cx.so
+ 
+ target3.path      = $${QLANDKARTE_LIBDIR}
+-target3.commands  = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVentureCx.so
+\ No newline at end of file
++target3.commands  = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVentureCx.so
++
++target4.path      = $${QLANDKARTE_LIBDIR}
++target4.commands  = cd ${INSTALL_ROOT}$${QLANDKARTE_LIBDIR} && ln -sf ${TARGET} libEtrexVistaCx.so
+diff -uNdr QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/loader.cpp QLandkarte.2007.03.16/src/device/GPSMap60CSx/loader.cpp
+--- QLandkarte.2007.03.16.old/src/device/GPSMap60CSx/loader.cpp	2007-03-03 17:00:24.000000000 +0100
++++ QLandkarte.2007.03.16/src/device/GPSMap60CSx/loader.cpp	2007-03-24 20:43:25.000000000 +0100
+@@ -67,3 +67,17 @@
+ 
+     return GPSMap60CSx::device;
+ }
++
++extern "C" Garmin::IDevice * const initEtrexVistaCx(const char * version)
++{
++    if(strncmp(version,INTERFACE_VERSION,5) != 0){
++        return 0;
++    }
++    if(GPSMap60CSx::device == 0){
++        GPSMap60CSx::device = new GPSMap60CSx::CDevice();
++    }
++    GPSMap60CSx::device->devname = "eTrex VistaCx";
++    GPSMap60CSx::device->devid   = 0x01a5;
++
++    return GPSMap60CSx::device;
++}
================================================================


More information about the pld-cvs-commit mailing list