Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. Holger's qtopia repo: Changes to 'master' ([EMAIL PROTECTED])
   2. r4407 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
   3. r4408 - trunk/src/target/opkg/libopkg ([EMAIL PROTECTED])
   4. org.openmoko.zecke.april-update:
      45783a6c8bda4dbae7ddfda0b24df2699006bf9a ([EMAIL PROTECTED])
   5. org.openmoko.zecke.april-update:
      45783a6c8bda4dbae7ddfda0b24df2699006bf9a ([EMAIL PROTECTED])
   6. r4409 - in developers/alphaone/u-blox: . libubx
      libubx/include    libubx/src ([EMAIL PROTECTED])
--- Begin Message ---
 src/build/bin/configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

New commits:
commit 622dbc69985bf08393d499a9635dab19ba932f99
Author: Holger Freyther <[EMAIL PROTECTED]>
Date:   Tue Apr 29 12:39:39 2008 +0200

    [build] Do not force -no-qdbus. For some people this option is "sticky" 
which makes them "stinky"
        Even if supplied -dbus on the command line, Qt for the target was 
configured
        with -no-qdbus.




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-29 13:53:22 +0200 (Tue, 29 Apr 2008)
New Revision: 4407

Modified:
   trunk/src/target/opkg/libopkg/opkg.c
Log:
opkg: prevent segfault if option is not found


Modified: trunk/src/target/opkg/libopkg/opkg.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg.c        2008-04-29 01:40:56 UTC (rev 
4406)
+++ trunk/src/target/opkg/libopkg/opkg.c        2008-04-29 11:53:22 UTC (rev 
4407)
@@ -295,7 +295,7 @@
 void
 opkg_set_option (opkg_t *opkg, char *option, void *value)
 {
-  int i = 0;
+  int i = 0, found = 0;
   opkg_option_t *options;
 
   opkg_assert (opkg != NULL);
@@ -311,11 +311,18 @@
   {
     if (strcmp (options[i].name, option) == 0)
     {
+      found = 1;
       break;
     }
     i++;
   }
 
+  if (!found)
+  {
+    /* XXX: Warning: Option not found */
+    return;
+  }
+
   /* set the option */
   switch (options[i].type)
   {




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2008-04-29 16:10:00 +0200 (Tue, 29 Apr 2008)
New Revision: 4408

Modified:
   trunk/src/target/opkg/libopkg/Makefile.am
Log:
opkg: clean up libopkg Makefile.am a bit


Modified: trunk/src/target/opkg/libopkg/Makefile.am
===================================================================
--- trunk/src/target/opkg/libopkg/Makefile.am   2008-04-29 11:53:22 UTC (rev 
4407)
+++ trunk/src/target/opkg/libopkg/Makefile.am   2008-04-29 14:10:00 UTC (rev 
4408)
@@ -1,15 +1,10 @@
 
-ALL_CFLAGS=-g -O -Wall -Werror -DHOST_CPU_STR=\"@[EMAIL PROTECTED]" [EMAIL 
PROTECTED]@ -DLIBDIR=\"@[EMAIL PROTECTED]" -DOPKGLIBDIR=\"@[EMAIL PROTECTED]" 
-DDATADIR=\"@[EMAIL PROTECTED]" -I$(top_srcdir)
+ALL_CFLAGS=-Wall -Werror -DHOST_CPU_STR=\"@[EMAIL PROTECTED]" [EMAIL 
PROTECTED]@ -DLIBDIR=\"@[EMAIL PROTECTED]" -DOPKGLIBDIR=\"@[EMAIL PROTECTED]" 
-DDATADIR=\"@[EMAIL PROTECTED]" -I$(top_srcdir)
 
 libopkg_includedir=$(includedir)/libopkg
-
 libopkg_include_HEADERS= opkg.h
 
-libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
 
-# make sure we only export symbols that are for public use
-libopkg_la_LDFLAGS = -export-symbols-regex "^opkg_.*"
-
 opkg_core_sources = args.c args.h \
                    user.c user.h 
 opkg_libcore_sources = args.c args.h libopkg.c libopkg.h\
@@ -35,12 +30,16 @@
                    sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
                    xregex.c xregex.h xsystem.c xsystem.h
 
+lib_LTLIBRARIES = libopkg.la
 libopkg_la_SOURCES = \
        $(opkg_libcore_sources) \
        $(opkg_cmd_sources) $(opkg_db_sources) \
        $(opkg_util_sources) $(opkg_list_sources)
 
 libopkg_la_CFLAGS = $(ALL_CFLAGS) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) 
$(GPGME_CFLAGS)
-lib_LTLIBRARIES = libopkg.la
+libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
+# make sure we only export symbols that are for public use
+libopkg_la_LDFLAGS = -export-symbols-regex "^opkg_.*"
 
 
+




--- End Message ---
--- Begin Message ---
revision:            45783a6c8bda4dbae7ddfda0b24df2699006bf9a
date:                2008-04-29T13:27:04
author:              [EMAIL PROTECTED]
branch:              org.openmoko.zecke.april-update
changelog:
scenarios: Update to the latest version in svn

manifest:
format_version "1"

new_manifest [5eb80888d214d3ba7fca7ae91457fb0086a6b28b]

old_revision [7dbd13bb8c12c7cc4e290ef6f353ecfdc83e9e19]

patch "conf/distro/include/sane-srcrevs.inc"
 from [c7c38d09ee4de83612cd24a21e437e813f306295]
   to [4822c7c14b601ac8c659d7dc94d8c97c68f37204]
#
#
# patch "conf/distro/include/sane-srcrevs.inc"
#  from [c7c38d09ee4de83612cd24a21e437e813f306295]
#    to [4822c7c14b601ac8c659d7dc94d8c97c68f37204]
#
============================================================
--- conf/distro/include/sane-srcrevs.inc        
c7c38d09ee4de83612cd24a21e437e813f306295
+++ conf/distro/include/sane-srcrevs.inc        
4822c7c14b601ac8c659d7dc94d8c97c68f37204
@@ -87,7 +87,7 @@ SRCREV_pn-openmoko-agpsui ?= "7"
 SRCREV_pn-osb-nrcit ?= "125"
 SRCREV_pn-osb-nrcore ?= "126"
 SRCREV_pn-openmoko-agpsui ?= "7"
-SRCREV_pn-openmoko-alsa-scenarios ?= "4317"
+SRCREV_pn-openmoko-alsa-scenarios ?= "4406"
 SRCREV_pn-openmoko-appearance ?= "3262"
 SRCREV_pn-openmoko-appmanager ?= "1851"
 SRCREV_pn-openmoko-appmanager2 ?= "3442"

--- End Message ---
--- Begin Message ---
revision:            45783a6c8bda4dbae7ddfda0b24df2699006bf9a
date:                2008-04-29T13:27:04
author:              [EMAIL PROTECTED]
branch:              org.openmoko.zecke.april-update
changelog:
scenarios: Update to the latest version in svn

manifest:
format_version "1"

new_manifest [5eb80888d214d3ba7fca7ae91457fb0086a6b28b]

old_revision [7dbd13bb8c12c7cc4e290ef6f353ecfdc83e9e19]

patch "conf/distro/include/sane-srcrevs.inc"
 from [c7c38d09ee4de83612cd24a21e437e813f306295]
   to [4822c7c14b601ac8c659d7dc94d8c97c68f37204]
#
#
# patch "conf/distro/include/sane-srcrevs.inc"
#  from [c7c38d09ee4de83612cd24a21e437e813f306295]
#    to [4822c7c14b601ac8c659d7dc94d8c97c68f37204]
#
============================================================
--- conf/distro/include/sane-srcrevs.inc        
c7c38d09ee4de83612cd24a21e437e813f306295
+++ conf/distro/include/sane-srcrevs.inc        
4822c7c14b601ac8c659d7dc94d8c97c68f37204
@@ -87,7 +87,7 @@ SRCREV_pn-openmoko-agpsui ?= "7"
 SRCREV_pn-osb-nrcit ?= "125"
 SRCREV_pn-osb-nrcore ?= "126"
 SRCREV_pn-openmoko-agpsui ?= "7"
-SRCREV_pn-openmoko-alsa-scenarios ?= "4317"
+SRCREV_pn-openmoko-alsa-scenarios ?= "4406"
 SRCREV_pn-openmoko-appearance ?= "3262"
 SRCREV_pn-openmoko-appmanager ?= "1851"
 SRCREV_pn-openmoko-appmanager2 ?= "3442"

--- End Message ---
--- Begin Message ---
Author: alphaone
Date: 2008-04-29 22:52:55 +0200 (Tue, 29 Apr 2008)
New Revision: 4409

Added:
   developers/alphaone/u-blox/libubx/
   developers/alphaone/u-blox/libubx/AUTHORS
   developers/alphaone/u-blox/libubx/ChangeLog
   developers/alphaone/u-blox/libubx/Makefile.am
   developers/alphaone/u-blox/libubx/NEWS
   developers/alphaone/u-blox/libubx/README
   developers/alphaone/u-blox/libubx/autogen.sh
   developers/alphaone/u-blox/libubx/configure.in
   developers/alphaone/u-blox/libubx/include/
   developers/alphaone/u-blox/libubx/include/Makefile.am
   developers/alphaone/u-blox/libubx/include/libubx.h
   developers/alphaone/u-blox/libubx/libubx.pc.in
   developers/alphaone/u-blox/libubx/src/
   developers/alphaone/u-blox/libubx/src/Makefile.am
   developers/alphaone/u-blox/libubx/src/libubx.c
   developers/alphaone/u-blox/libubx/src/ubx-parse.c
   developers/alphaone/u-blox/libubx/src/ubx-parse.h
Log:
* Started working on libubx, a library to generate and parse UBX packets


Added: developers/alphaone/u-blox/libubx/AUTHORS
===================================================================
--- developers/alphaone/u-blox/libubx/AUTHORS                           (rev 0)
+++ developers/alphaone/u-blox/libubx/AUTHORS   2008-04-29 20:52:55 UTC (rev 
4409)
@@ -0,0 +1 @@
+Daniel Willmann <[EMAIL PROTECTED]>

Added: developers/alphaone/u-blox/libubx/ChangeLog
===================================================================
--- developers/alphaone/u-blox/libubx/ChangeLog                         (rev 0)
+++ developers/alphaone/u-blox/libubx/ChangeLog 2008-04-29 20:52:55 UTC (rev 
4409)
@@ -0,0 +1,3 @@
+2008-04-29     Daniel Willmann <[EMAIL PROTECTED]>
+
+       * *: Start libubx, a library to generate and parse UBX packets

Added: developers/alphaone/u-blox/libubx/Makefile.am
===================================================================
--- developers/alphaone/u-blox/libubx/Makefile.am                               
(rev 0)
+++ developers/alphaone/u-blox/libubx/Makefile.am       2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,7 @@
+SUBDIRS =                              \
+       include                         \
+       src
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libubx.pc
+

Added: developers/alphaone/u-blox/libubx/NEWS
===================================================================

Added: developers/alphaone/u-blox/libubx/README
===================================================================

Added: developers/alphaone/u-blox/libubx/autogen.sh
===================================================================
--- developers/alphaone/u-blox/libubx/autogen.sh                                
(rev 0)
+++ developers/alphaone/u-blox/libubx/autogen.sh        2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -x
+
+aclocal
+libtoolize --force
+autoheader
+automake --add-missing
+autoconf configure.in > configure
+chmod +x configure


Property changes on: developers/alphaone/u-blox/libubx/autogen.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/alphaone/u-blox/libubx/configure.in
===================================================================
--- developers/alphaone/u-blox/libubx/configure.in                              
(rev 0)
+++ developers/alphaone/u-blox/libubx/configure.in      2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,43 @@
+AC_PREREQ(2.52)
+
+AC_INIT(libubx, 0.1, [EMAIL PROTECTED])
+AM_INIT_AUTOMAKE([subdir-objects])
+AM_MAINTAINER_MODE
+
+AM_CONFIG_HEADER(config.h)
+
+dnl
+dnl Require programs
+dnl
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+dnl
+dnl Required headers
+dnl
+AC_HEADER_STDC
+
+dnl
+dnl Checks for typedefs, structures, and compiler characteristics.
+dnl
+AC_HEADER_TIME
+
+dnl
+dnl Checks for library functions.
+dnl
+
+dnl
+dnl Make sha1.c happy on big endian systems
+dnl
+AC_C_BIGENDIAN
+
+CFLAGS="-Wall $CFLAGS"
+
+AC_OUTPUT([
+Makefile
+libubx.pc
+include/Makefile
+src/Makefile
+])

Added: developers/alphaone/u-blox/libubx/include/Makefile.am
===================================================================
--- developers/alphaone/u-blox/libubx/include/Makefile.am                       
        (rev 0)
+++ developers/alphaone/u-blox/libubx/include/Makefile.am       2008-04-29 
20:52:55 UTC (rev 4409)
@@ -0,0 +1,5 @@
+libubxinclude_HEADERS = \
+                                                                               
                libubx.h
+libubxincludedir = $(includedir)/libubx
+
+#libdiversity_xmpp_backend_la_LIBADD =

Added: developers/alphaone/u-blox/libubx/include/libubx.h
===================================================================
--- developers/alphaone/u-blox/libubx/include/libubx.h                          
(rev 0)
+++ developers/alphaone/u-blox/libubx/include/libubx.h  2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,97 @@
+#ifndef _LIBUBX_H_
+#define _LIBUBX_H_
+
+#include <stdint.h>
+
+#define UBX_SYNC1 0xb5
+#define UBX_SYNC2 0x62
+
+typedef enum {
+       UBX_CL_NAV = 0x01,
+       UBX_CL_RXM = 0x02,
+       UBX_CL_INF = 0x04,
+       UBX_CL_ACK = 0x05,
+       UBX_CL_CFG = 0x06,
+       UBX_CL_UPD = 0x09,
+       UBX_CL_MON = 0x0a,
+       UBX_CL_AID = 0x0b,
+       UBX_CL_TIM = 0x0d,
+       UBX_CL_USR = 0x40
+} ubx_class;
+
+typedef enum {
+       UBX_ID_ACK = 0x01,
+       UBX_ID_NACK = 0x00,
+       UBX_ID_ALM = 0x30,
+       UBX_ID_DATA = 0x10,
+       UBX_ID_EPH = 0x31,
+       UBX_ID_HUI = 0x02,
+       UBX_ID_INI = 0x01,
+       UBX_ID_REQ = 0x00,
+       UBX_ID_ANT = 0x13,
+       UBX_ID_CFG = 0x09
+} ubx_id;
+
+typedef struct {
+       uint8_t cls;
+       uint8_t id;
+       uint16_t length;
+       uint8_t ck_a;
+       uint8_t ck_b;
+} ubx_hdr;
+
+typedef struct {
+       ubx_hdr *header;
+       void *payload;
+} ubx_msg;
+
+typedef struct {
+       uint32_t svid;
+       uint32_t week;
+       uint32_t dwrd0;
+       uint32_t dwrd1;
+       uint32_t dwrd2;
+       uint32_t dwrd3;
+       uint32_t dwrd4;
+       uint32_t dwrd5;
+       uint32_t dwrd6;
+       uint32_t dwrd7;
+} ubx_msg_aid_alm;
+
+typedef struct {
+       uint32_t svid;
+       uint32_t how;
+       uint32_t sf1d0;
+       uint32_t sf1d1;
+       uint32_t sf1d2;
+       uint32_t sf1d3;
+       uint32_t sf1d4;
+       uint32_t sf1d5;
+       uint32_t sf1d6;
+       uint32_t sf1d7;
+       uint32_t sf2d0;
+       uint32_t sf2d1;
+       uint32_t sf2d2;
+       uint32_t sf2d3;
+       uint32_t sf2d4;
+       uint32_t sf2d5;
+       uint32_t sf2d6;
+       uint32_t sf2d7;
+       uint32_t sf3d0;
+       uint32_t sf3d1;
+       uint32_t sf3d2;
+       uint32_t sf3d3;
+       uint32_t sf3d4;
+       uint32_t sf3d5;
+       uint32_t sf3d6;
+       uint32_t sf3d7;
+} ubx_msg_aid_eph;
+
+/*m Returns 1 if the checksum matches, otherwise zero
+ * If the checksum fields are both zero calculates it */
+uint8_t checksum(ubx_hdr *header, uint8_t *msg);
+
+uint16_t ubx_msg_encode(ubx_hdr *header, uint8_t *msg, uint8_t **data);
+ubx_msg *ubx_msg_decode(uint16_t length, uint8_t *data);
+
+#endif /* _LIBUBX_H_ */

Added: developers/alphaone/u-blox/libubx/libubx.pc.in
===================================================================
--- developers/alphaone/u-blox/libubx/libubx.pc.in                              
(rev 0)
+++ developers/alphaone/u-blox/libubx/libubx.pc.in      2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,11 @@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+
+Name: libubx
+Description: libubx
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lubx
+Cflags: -I${includedir}/libubx

Added: developers/alphaone/u-blox/libubx/src/Makefile.am
===================================================================
--- developers/alphaone/u-blox/libubx/src/Makefile.am                           
(rev 0)
+++ developers/alphaone/u-blox/libubx/src/Makefile.am   2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,9 @@
+INCLUDES = -I${top_srcdir}/include
+
+lib_LTLIBRARIES = libubx.la
+
+libubx_la_SOURCES =    \
+       libubx.c \
+       ubx-parse.c
+
+#libdiversity_xmpp_backend_la_LIBADD =

Added: developers/alphaone/u-blox/libubx/src/libubx.c
===================================================================
--- developers/alphaone/u-blox/libubx/src/libubx.c                              
(rev 0)
+++ developers/alphaone/u-blox/libubx/src/libubx.c      2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,90 @@
+#include <libubx.h>
+#include "ubx-parse.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+/* Returns 1 if the checksum matches, otherwise zero
+ * If the checksum fields are both zero calculates it */
+uint8_t checksum(ubx_hdr *header, uint8_t *msg)
+{
+       uint8_t ck_a = 0, ck_b = 0;
+       uint16_t *len = &header->length;
+
+       ck_a += header->cls;
+       ck_b += ck_a;
+       ck_a += header->id;
+       ck_b += ck_a;
+       ck_a += ((uint8_t *)len)[0];
+       ck_b += ck_a;
+       ck_a += ((uint8_t *)len)[1];
+       ck_b += ck_a;
+
+       if ((ck_a == header->ck_a)&&(ck_b == header->ck_b)) {
+               return 1;
+       }
+       else if ((header->ck_a == 0)&&(header->ck_b == 0)) {
+               header->ck_a = ck_a;
+               header->ck_b = ck_b;
+       }
+       return 0;
+}
+
+uint16_t ubx_msg_encode(ubx_hdr *header, uint8_t *msg, uint8_t **data)
+{
+       uint8_t *temp;
+       *data = malloc(header->length + 8);
+       if (!*data)
+               return 0;
+
+       checksum(header, *data);
+       temp = *data;
+       *temp++ = UBX_SYNC1;
+       *temp++ = UBX_SYNC2;
+       // Copy the header
+       // XXX: Handle Endianess
+       memcpy(temp, header, 4);
+       temp += 4;
+       // And the message
+       memcpy(temp, msg, header->length);
+       temp += header->length;
+       *temp++ = header->ck_a;
+       *temp++ = header->ck_b;
+       return header->length + 8;
+}
+
+ubx_msg *ubx_msg_decode(uint16_t length, uint8_t *data)
+{
+       ubx_hdr *header;
+       ubx_msg *msg;
+
+       if ((data[0] != UBX_SYNC1) || (data[1] != UBX_SYNC2)
+                       || (length < 8))
+               return 0;
+
+       data += 2;
+       header = malloc(sizeof(ubx_hdr));
+       header->cls = *data++;
+       header->id = *data++;
+       header->length = (uint16_t)*data;
+       data += 2;
+
+       if (length < header->length + 8)
+               return 0;
+
+       header->ck_a = data[header->length];
+       header->ck_b = data[header->length+1];
+
+       if (!checksum(header, data)) {
+               free (header);
+               return 0;
+       }
+
+       /* Now we know the packet is valid and complete */
+       msg = malloc(sizeof(ubx_msg));
+       msg->header = header;
+
+       msg->payload = ubx_parse_msg(header->cls, header->id, header->length, 
data);
+
+       return msg;
+}

Added: developers/alphaone/u-blox/libubx/src/ubx-parse.c
===================================================================
--- developers/alphaone/u-blox/libubx/src/ubx-parse.c                           
(rev 0)
+++ developers/alphaone/u-blox/libubx/src/ubx-parse.c   2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,147 @@
+#include <libubx.h>
+#include <ubx-parse.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+void *ubx_parse_aid_msg(uint8_t id, uint16_t length, uint8_t *data)
+{
+       switch (id) {
+               case UBX_ID_ALM:
+                       if (length == 0) {
+                               return 0;
+                       } else if (length == 1) {
+                               ubx_msg_aid_alm *msg;
+                               msg = malloc(sizeof(ubx_msg_aid_alm));
+                               msg->svid = data[0];
+                               return msg;
+                               } else {
+                               ubx_msg_aid_alm *msg;
+                               if (length >= 8) {
+                                       msg = malloc(sizeof(ubx_msg_aid_alm));
+                                       msg->svid = (uint32_t)*data;
+                                       data += 4;
+                                       msg->week = (uint32_t)*data;
+                                       data += 4;
+                               }
+                               if (length == 40) {
+                                       msg->dwrd0 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd1 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd2 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd3 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd4 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd5 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd6 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->dwrd7 = (uint32_t)*data;
+                               }
+                               return msg;
+                       }
+                       break;
+               case UBX_ID_EPH:
+                       if (length == 0) {
+                               return 0;
+                       } else if (length == 1) {
+                               ubx_msg_aid_eph *msg;
+                               msg = malloc(sizeof(ubx_msg_aid_eph));
+                               msg->svid = data[0];
+                               return msg;
+                               } else {
+                               ubx_msg_aid_eph *msg;
+                               if (length >= 8) {
+                                       msg = malloc(sizeof(ubx_msg_aid_eph));
+                                       msg->svid = (uint32_t)*data;
+                                       data += 4;
+                                       msg->how = (uint32_t)*data;
+                                       data += 4;
+                               }
+                               if (length == 104) {
+                                       msg->sf1d0 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d1 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d2 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d3 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d4 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d5 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d6 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf1d7 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d0 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d1 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d2 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d3 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d4 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d5 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d6 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf2d7 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d0 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d1 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d2 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d3 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d4 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d5 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d6 = (uint32_t)*data;
+                                       data += 4;
+                                       msg->sf3d7 = (uint32_t)*data;
+                               }
+                               return msg;
+                       }
+                       break;
+               default:
+                       printf("Unknown AID message (0x%x), length %d", id, 
length);
+                       break;
+       }
+       return 0;
+}
+
+
+void *ubx_parse_msg(uint8_t cls, uint8_t id, uint16_t length,
+               uint8_t *data)
+{
+       switch (cls) {
+               case UBX_CL_NAV:
+//                     return ubx_parse_nav_msg(id, length, data);
+                       break;
+               case UBX_CL_AID:
+                       return ubx_parse_aid_msg(id, length, data);
+                       break;
+                       /* Fall through */
+               case UBX_CL_RXM:
+               case UBX_CL_INF:
+               case UBX_CL_ACK:
+               case UBX_CL_CFG:
+               case UBX_CL_UPD:
+               case UBX_CL_MON:
+               case UBX_CL_TIM:
+               case UBX_CL_USR:
+               default:
+                       printf("Unknown UBX message class (0x%x, 0x%x), length 
%d", cls, id, length);
+                       break;
+       }
+       return 0;
+}

Added: developers/alphaone/u-blox/libubx/src/ubx-parse.h
===================================================================
--- developers/alphaone/u-blox/libubx/src/ubx-parse.h                           
(rev 0)
+++ developers/alphaone/u-blox/libubx/src/ubx-parse.h   2008-04-29 20:52:55 UTC 
(rev 4409)
@@ -0,0 +1,10 @@
+#ifndef _UBX_PARSE_H_
+#define _UBX_PARSE_H_
+
+#include <libubx.h>
+
+void *ubx_parse_aid_msg(uint8_t id, uint16_t length, uint8_t *data);
+void *ubx_parse_msg(uint8_t cls, uint8_t id, uint16_t length,
+               uint8_t *data);
+
+#endif /* _UBX_PARSE_H_ */




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to