121 |
} |
} |
122 |
|
|
123 |
float map_gps_get_eph(map_context_t *context) { |
float map_gps_get_eph(map_context_t *context) { |
124 |
if(context->gps.set & FIX_LATLON_SET) |
if(context->gps.set & FIX_HERR_SET) |
125 |
return context->gps.fix.eph; |
return context->gps.fix.eph; |
126 |
|
|
127 |
return NAN; |
return NAN; |
898 |
#endif |
#endif |
899 |
|
|
900 |
gtk_timeout_remove(context->handler_id); |
gtk_timeout_remove(context->handler_id); |
|
gps_unregister_callback(appdata->gps_state, gps_callback); |
|
901 |
|
|
902 |
if(context->caches_displayed) { |
if(context->caches_displayed) { |
903 |
g_free(context->caches_displayed); |
g_free(context->caches_displayed); |
944 |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
945 |
#endif |
#endif |
946 |
|
|
947 |
|
gps_register_callback(context->appdata->gps_state, |
948 |
|
LATLON_CHANGED | HERR_CHANGED | TRACK_CHANGED, |
949 |
|
gps_callback, context); |
950 |
|
|
951 |
map_setup(context); |
map_setup(context); |
952 |
return FALSE; |
return FALSE; |
953 |
} |
} |
970 |
context->handler_id = 0; |
context->handler_id = 0; |
971 |
#endif |
#endif |
972 |
|
|
973 |
|
gps_unregister_callback(context->appdata->gps_state, gps_callback); |
974 |
|
|
975 |
return FALSE; |
return FALSE; |
976 |
} |
} |
977 |
|
|
1103 |
|
|
1104 |
/* install handler for timed updates of the gps button */ |
/* install handler for timed updates of the gps button */ |
1105 |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
context->handler_id = gtk_timeout_add(1000, map_gps_update, context); |
|
gps_register_callback(appdata->gps_state, LATLON_CHANGED | HERR_CHANGED, |
|
|
gps_callback, context); |
|
1106 |
|
|
1107 |
#if MAEMO_VERSION_MAJOR == 5 |
#if MAEMO_VERSION_MAJOR == 5 |
1108 |
/* prevent some of the main screen things */ |
/* prevent some of the main screen things */ |