please note that gps_qemu.c is only used for GPL emulation within the
Android emulation (i.e. it is never used on a real device).
that's why there is little point in checking the checksum here, since all
the messages sent to it are normally generated by the emulator program
(for details, see the do_gps_XXX functions in
external/qemu/android_console.c)

(well, you can attach an external GPS unit to the emulator with the -gps
<device-file> command on Linux, but I'm unsure that much people
have tried that).

If you feel this is important, please feel free to provide a patch for
review to r.android.com (and please modify the android_console.c to generate
a correct checksum too)

regards

On Thu, Jan 15, 2009 at 3:59 AM, Michael Caughey <mich...@caughey.com>wrote:

>  I'm not quite sure how to tell the version of the code I pulled down.  I
> can tell you I pulled it down this evening.
>
> I was looking at the gps_qemu.c file to see how the checksum was handled.
> It appears that the only place there is any reference to the checksum is in
> the nmea_tokenizer_init method, where is simply chopped off and ignored.
> Line 64 contains the comment to this affect and lines 65-67 contain the
> code.
>
> There maybe something about the hardware that insures that only correct
> messages are sent and therefore in an effort to optimize the code the
> checksum is ignored.  I would have expected that to be in the comments if it
> was the case.  I'm not sure I have run into such a case.
>
> I do have the code in c for determining the validity of the message based
> on the checksum and would be happy to contribute a fix if such a fix is
> deemed required or useful.  The fix doesn't just impact making the checksum
> validation, as an invalid check means an error condition from the routine
> which would have to be handled.
>
> I thought I'd run this by you all since I'm new here as a comment rather
> than a bug.
>
> Thanks,
> Michael
>
> "In the beginner's mind there are many possibilities. In the expert's mind
> there are few."
> -Shunryu Suzuki
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to