Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
gpsbabel
gpsbabel-wsg1000.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gpsbabel-wsg1000.patch of Package gpsbabel
Index: wbt-200.c =================================================================== RCS file: /cvsroot/gpsbabel/gpsbabel/wbt-200.c,v retrieving revision 1.13 diff -u -p -r1.13 wbt-200.c --- wbt-200.c 26 Jul 2007 19:22:34 -0000 1.13 +++ wbt-200.c 4 May 2008 09:00:56 -0000 @@ -93,7 +93,7 @@ static char *port; static char *erase; static enum { - UNKNOWN, WBT200, WBT201 + UNKNOWN, WBT200, WBT201, WSG1000 } dev_type = UNKNOWN; struct buf_chunk { @@ -338,6 +338,21 @@ static int wbt201_try() { return expect("@AL"); } +static int wsg1000_try() { + int rc; + + db(1, "Trying WSG 1000/G-Rays 2\n"); + + if ((rc = gbser_set_port(fd, WBT201BAUD, 8, 0, 1))) { + db(1, "Set baud rate to %d failed (%d)\n", WBT201BAUD, rc); + return 0; + } + + wr_cmdl("@AL,2,1"); + + return expect("@AL"); +} + static int guess_device() { int i; db(1, "Guessing device...\n"); @@ -348,6 +363,9 @@ static int guess_device() { if (wbt201_try()) { return WBT201; } + if (wsg1000_try()) { + return WSG1000; + } } return UNKNOWN; } @@ -838,8 +856,12 @@ static int wbt201_read_chunk(struct read } /* ack */ - rd_line(BUFSPEC(line_buf)); - return starts_with(line_buf, cmd_buf); + if (dev_type == WBT201){ + rd_line(BUFSPEC(line_buf)); + return starts_with(line_buf, cmd_buf); + } + + return 1; } static void wbt201_data_read(void) { @@ -970,6 +992,7 @@ static void data_read(void) { break; case WBT201: + case WSG1000: wbt201_data_read(); break;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor