Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
geoclue
geoclue
Commits
d0f27e51
Commit
d0f27e51
authored
Jul 11, 2007
by
Jussi Kukkonen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change current_position to just read from the gpsdata-struct (and not query gpsd)
parent
95b3f114
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
backend/position_gpsd/geoclue_position_server_gpsd.c
backend/position_gpsd/geoclue_position_server_gpsd.c
+14
-18
No files found.
backend/position_gpsd/geoclue_position_server_gpsd.c
View file @
d0f27e51
...
...
@@ -139,24 +139,20 @@ gboolean geoclue_position_service_provider(GeocluePosition *obj, char** name, GE
gboolean
geoclue_position_current_position
(
GeocluePosition
*
obj
,
gdouble
*
OUT_latitude
,
gdouble
*
OUT_longitude
,
GError
**
error
)
{
g_print
(
" Querying GPSD
\n
"
);
gps_query
(
obj
->
gpsdata
,
"w+x
\n
"
);
*
OUT_latitude
=
obj
->
gpsdata
->
fix
.
latitude
;
*
OUT_longitude
=
obj
->
gpsdata
->
fix
.
longitude
;
g_print
(
"Sending back %f %f
\n
"
,
*
OUT_latitude
,
*
OUT_longitude
);
//*OUT_latitude = obj->gpsdata->newdata.latitude;
//*OUT_longitude = obj->gpsdata->newdata.longitude;
// g_print("Sending back %f %f\n", *OUT_latitude, *OUT_longitude);
return
TRUE
;
/* if everything is fine, we can just read obj->gpsdata */
if
(
obj
->
gpsdata
->
status
&&
obj
->
gpsdata
->
online
&&
obj
->
gpsdata
->
fix
.
mode
>
1
&&
(
obj
->
gpsdata
->
set
&
(
LATLON_SET
|
ALTITUDE_SET
)))
{
*
OUT_latitude
=
obj
->
gpsdata
->
fix
.
latitude
;
*
OUT_longitude
=
obj
->
gpsdata
->
fix
.
longitude
;
g_debug
(
"Sending back %f %f"
,
*
OUT_latitude
,
*
OUT_longitude
);
return
TRUE
;
}
else
{
return
FALSE
;
}
}
gboolean
geoclue_position_current_position_error
(
GeocluePosition
*
obj
,
gdouble
*
OUT_latitude_error
,
gdouble
*
OUT_longitude_error
,
GError
**
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment