[package] restore trimble support after update
[packages.git] / net / gpsd / patches / 101-trimble.patch
1 diff -urN gpsd-2.39/drivers.c gpsd-2.39.new/drivers.c
2 --- gpsd-2.39/drivers.c 2009-03-18 18:37:56.000000000 +0100
3 +++ gpsd-2.39.new/drivers.c     2009-07-29 00:22:54.000000000 +0200
4 @@ -165,9 +165,13 @@
5         /* probe for the FV-18 -- expect $PFEC,GPint followed by data */
6         (void)nmea_send(session, "$PFEC,GPint");
7         break;
8 +    case 3:
9 +       /* probe for the Trimble Copernicus */ 
10 +       (void)nmea_send(session->gpsdata.gps_fd, "$PTNLSNM,0139,01");
11 +       break;
12  #endif /* NMEA_ENABLE */
13  #ifdef EVERMORE_ENABLE
14 -    case 3:
15 +    case 4:
16         /* Enable checksum and GGA(1s), GLL(0s), GSA(1s), GSV(1s), RMC(1s), VTG(0s), PEMT101(1s) */
17         /* EverMore will reply with: \x10\x02\x04\x38\x8E\xC6\x10\x03 */
18         (void)gpsd_write(session,
19 @@ -175,31 +179,31 @@
20         break;
21  #endif /* EVERMORE_ENABLE */
22  #ifdef ITRAX_ENABLE
23 -    case 4:
24 +    case 5:
25         /* probe for iTrax, looking for "$PFST,OK" */
26         (void)nmea_send(session, "$PFST");
27         break;
28  #endif /* ITRAX_ENABLE */
29  #ifdef GPSCLOCK_ENABLE
30 -    case 5:
31 +    case 6:
32         /* probe for Furuno Electric GH-79L4-N (GPSClock); expect $PFEC,GPssd */
33         (void)nmea_send(session, "$PFEC,GPsrq");
34         break;
35  #endif /* GPSCLOCK_ENABLE */
36  #ifdef ASHTECH_ENABLE
37 -    case 6:
38 +    case 7:
39         /* probe for Ashtech -- expect $PASHR,RID */
40         (void)nmea_send(session, "$PASHQ,RID");
41         break;
42  #endif /* ASHTECH_ENABLE */
43  #ifdef UBX_ENABLE
44 -    case 7:
45 +    case 8:
46         /* probe for UBX -- query software version */
47         (void)ubx_write(session, 0x0au, 0x04, NULL, 0);
48         break;
49  #endif /* UBX_ENABLE */
50  #ifdef MKT3301_ENABLE
51 -    case 8:
52 +    case 9:
53         /* probe for MKT-3301 -- expect $PMTK705 */
54         (void)nmea_send(session, "$PMTK605");
55         break;