int serial_gps_init(GpsCallbacks* callbacks) {
    D("serial_gps_init");
    GpsState*  s = _gps_state;

    if (!s->init)
        gps_state_init(s, callbacks);

    if (s->fd < 0)
        return -1;

    return 0;
}
Пример #2
0
static int
qemu_gps_init(GpsCallbacks* callbacks)
{
    GpsState*  s = _gps_state;

    if (!s->init)
        gps_state_init(s, callbacks);

    if (s->fd < 0)
        return -1;

    return 0;
}
Пример #3
0
static int athr_gps_init(GpsCallbacks* callbacks)
{
    GpsState*  s = _gps_state;

	D("gps state initializing %d",s->init);

    s->callbacks = *callbacks;
    if (!s->init)
        gps_state_init(s);

	if(!g_gpscallback)
		g_gpscallback = callbacks;

    return 0;
}
Пример #4
0
static int
gps_init(GpsCallbacks* callbacks)
{
    GpsState*  s = _gps_state;
    s->callbacks = *callbacks;

    if (!s->init)
        gps_state_init(s);

    if (s->fd < 0)
        return -1;

    //s->callbacks = *callbacks;

    return 0;
}
Пример #5
0
static int
qemu_gps_init(GpsCallbacks* callbacks)
{
    GpsState*  s = _gps_state;

	callbacks->location_cb(NULL);

    s->callbacks = *callbacks;

    if (!s->init)
        gps_state_init(s, callbacks);

    if (s->fd < 0)
        return -1;

    return 0;
}