2010年12月27日 星期一

Android GPS porting HAL code - try to fix GPSStatus.nmea issue

AP declared nmeaListener = new GpsStatus.NmeaListener() to read the information of callback from JNI( Android GPS Interface Level, or called HAL)

HAL need to follow gps.h to implement callback function - gps_nmea_callback

You can follow this information from gps.h

/** Callback for reporting NMEA sentences. */
typedef void (* gps_nmea_callback)(GpsUtcTime timestamp, const char* nmea, int length);

/** GPS callback structure. */
typedef struct {
        gps_location_callback location_cb;
        gps_status_callback status_cb;
        gps_sv_status_callback sv_status_cb;
        gps_nmea_callback nmea_cb;
} GpsCallbacks;

First one is timestamp.
Second on is nmea that you open gps com port and read that information.
Third is the length of nmea.

mm
and 
make snod
generate new system.img

Run GPSDemo application then I can see the nmea on GPSDemo.

I post the information on android group developers.
http://groups.google.com/group/android-developers/browse_thread/thread/3bb4dd9070451df2?pli=1

透過Facebook分享

沒有留言: