|
Subject: [patch] Holux M-241 to disable CMD_LOG_ENABLE Newsgroups: gmane.comp.hardware.gps.gpsbabel.devel Date: 2008-05-28 14:18:38 GMT (1 year, 5 weeks, 1 day, 13 hours and 45 minutes ago) Dear gpsbabel development discussion list; I'm new to this list, and would like to send a patch to fix unwanted behavior of gpsbabel I've seen when using with Holux M-241 logger. I've tried to get tracklog from my M-241 logger by latest gpsbabel (as of today, from CVS repository). Everything works fine, except that after finishing gpsbabel M-241 starts logging (a small runner icon is shown on the display). Apparently this is not what I want. After some investigations, this is because that gpsbabel issues CMD_LOG_ENABLE to M-241, and that's why M-241 starts logging. Attached file is a patch to disable issuing CMD_LOG_ENABLE iff the logger is Holux M-241. Tested with my M-241 (firmware version 1.11), and gpsbabel running on my Windows Vista SP1 PC. Are there any M-241 users? Would you please try to test this patch and see nothing is broken? Thanks in advance, -- Makoto Matsushita
? config.status.lineno
Index: mtk_logger.c
===================================================================
RCS file: /cvsroot/gpsbabel/gpsbabel/mtk_logger.c,v
retrieving revision 1.6
diff -u -r1.6 mtk_logger.c
--- mtk_logger.c 14 May 2008 15:54:55 -0000 1.6
+++ mtk_logger.c 28 May 2008 13:51:36 -0000
@@ -384,7 +384,8 @@
do_cmd(CMD_LOG_ERASE, "PMTK001,182,6", 30);
gb_sleep(100*1000);
- do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
+ if ( ! is_m241 )
+ do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
return 0;
}
@@ -498,8 +499,10 @@
fclose(dout);
dbg(2, "\n");
- i = do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
- dbg(3, " ---- LOG ENABLE ----%s\n", i==0?"Success":"Fail");
+ if ( ! is_m241 ) {
+ i = do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
+ dbg(3, " ---- LOG ENABLE ----%s\n", i==0?"Success":"Fail");
+ }
if ( line != NULL )
xfree(line);
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gpsbabel-code mailing list http://www.gpsbabel.org Gpsbabel-code <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gpsbabel-code |
|
|