danx
|
2010-09-05
, 06:55
|
|
Posts: 304 |
Thanked: 20 times |
Joined on Jan 2010
@ irvine
|
#21
|
|
2010-09-05
, 06:56
|
|
Posts: 3,159 |
Thanked: 2,023 times |
Joined on Feb 2008
@ Finland
|
#22
|
|
2010-09-17
, 10:41
|
Posts: 12 |
Thanked: 5 times |
Joined on Mar 2010
|
#23
|
|
2010-11-01
, 11:29
|
|
Posts: 28 |
Thanked: 58 times |
Joined on Jan 2010
|
#24
|
The Following 14 Users Say Thank You to jvesiluoma For This Useful Post: | ||
|
2010-11-04
, 12:07
|
|
Posts: 28 |
Thanked: 58 times |
Joined on Jan 2010
|
#25
|
#!/usr/bin/python ## Base version from http://wiki.maemo.org/PyMaemo/Using_Location_API ## ## Modified by JMV ## Version 1.01 import location import gobject import time import sys xi = 1 def on_error(control, error, data): print "location error: %d... quitting" % error data.quit() def on_changed(device, data): global xi if not device: return if device.fix: xi = xi + 1 if device.fix[1] & location.GPS_DEVICE_LATLONG_SET: # print "http://maps.google.com/maps?f=q&source=s_q&hl=fi&geocode=&q=E%f,+N%f&sll=37.0625,-95.677068&sspn=53.696917,114.169922&ie=UTF8&z=17""><b>maps.google.com</A>" % device.fix[4:6] sys.stdout.write('<A href="http://maps.google.com/maps?f=q&source=s_q&hl=fi&geocode=&q=E%f' % device.fix[5]) sys.stdout.write(',+N%f&sll=37.0625,-95.677068&sspn=53.696917,114.169922&ie=UTF8&z=17""><b>maps.google.com</A>' % device.fix[4]) print "" #V1.0 print "http://maps.google.com/maps?f=q&source=s_q&hl=fi&geocode=&q=E%f" % device.fix[5], #V1.0 print ",+N%f&sll=37.0625,-95.677068&sspn=53.696917,114.169922&ie=UTF8&z=17""><b>maps.google.com</A>" % device.fix[4] print "altitude = %f" % device.fix[7] print "horizontal accuracy: %f meters" % (device.fix[6] / 100) print "Satellites in view: %d, in use: %d" % (device.satellites_in_view, device.satellites_in_use) if xi == 10: loop.quit() def on_stop(control, data): print "quitting" data.quit() def start_location(data): data.start() return False loop = gobject.MainLoop() control = location.GPSDControl.get_default() device = location.GPSDevice() control.set_properties(preferred_method=location.METHOD_USER_SELECTED, preferred_interval=location.INTERVAL_10S) #control.set_properties(preferred_method=location.METHOD_AGNSS, # preferred_interval=location.INTERVAL_1S) control.connect("error-verbose", on_error, loop) device.connect("changed", on_changed, control) control.connect("gpsd-stopped", on_stop, loop) gobject.idle_add(start_location, control) loop.run()
The Following 2 Users Say Thank You to jvesiluoma For This Useful Post: | ||
|
2010-11-04
, 14:14
|
Posts: 185 |
Thanked: 62 times |
Joined on Sep 2010
@ Veitshöchheim, Germany
|
#26
|
|
2010-11-04
, 14:21
|
Posts: 185 |
Thanked: 62 times |
Joined on Sep 2010
@ Veitshöchheim, Germany
|
#27
|
|
2010-11-04
, 18:09
|
Posts: 185 |
Thanked: 62 times |
Joined on Sep 2010
@ Veitshöchheim, Germany
|
#28
|
|
2010-11-05
, 07:11
|
|
Posts: 28 |
Thanked: 58 times |
Joined on Jan 2010
|
#29
|
ok second issue solved.. had to start the server first (thought its going to start automatically) with the command "lighttpd -f /etc/lighttpd.conf"
next problem: always when i click on a menu, it wants to download the php file
okay got that php to work with this help: http://talk.maemo.org/showthread.php?t=62575
now everything works so far, the server, the php and i can access it. now, the major problem. the script doesnt work. i get "Parse error: syntax error, unexpected T_STRING in /wwwPHP/htdocs/messages.php on line 1" and so on. some functions like lock and ps-x work but not the calls, messages, front-cam (gives 404), contact and almost everything else on the commands page
|
2010-11-05
, 07:31
|
Posts: 185 |
Thanked: 62 times |
Joined on Sep 2010
@ Veitshöchheim, Germany
|
#30
|