| Reply | « Previous Thread | Next Thread » |
|
hi,
how block the main thread that this reading data from the GPS? thanks |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
|
Quote:
You asked the same thing in this thread and jethro.fn already aswered you ![]() BR, Rafael. |
|
hi,
ok, but where run the following code show a Application Closed: Py_num KERN-EXEC 0 Code:
import positioning
import socket
import appuifw
import time
import e32
import thread
import sysinfo
def startTracking():
print "2"
#positioning.set_requestors([{"type":"service", "format":"application","data":"WifeTracker"}])
print "3"
positioning.position(course=1,satellites=1, callback = locationCallback)
print "print positioning.position()"
print "4"
def testThread():
global lock
e32.ao_sleep(5)
startTracking()
lock.signal()
def locationCallback(event):
lock = thread.allocate_lock()
e32.ao_sleep(1)
position = event['position']
course = event['course']
satellites=event['satellites']
posTuple = (position['latitude'], position['longitude'],position['altitude'])
velocidad = course['speed']
rumbo = course['heading']
date = satellites['time']
la,lo,al = posTuple
lock.release()
e32.ao_sleep(10)
lat = '>R4'+','+str("%.5f"%la)+','+str("%.5f"%lo)+','+str("%.5f"%velocidad)+','+str("%.5f"%rumbo)
lock = e32.Ao_lock()
thread.start_new_thread(testThread,())
lock.wait()
|
|
Have you updated to the latest PyS60, version 1.4.5? It has some bugfixes concerning the positioning module:
Quote:
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Under what conditon will the MDL file be invoked? | wonz | General Symbian C++ | 1 | 2007-04-17 11:47 |
| 6600 gprs 发送大量rtp延时问题 | dicson_hu | Symbian | 9 | 2005-11-04 03:12 |
| Problem reading a data file | xcoutin | General Symbian C++ | 2 | 2003-08-20 18:54 |
| Reading chunks of data at a time | HenrikK | Mobile Java Networking & Messaging & Security | 1 | 2003-03-30 19:17 |
| Reading Data Messages from a Nokia 6210 | Pantelis | PC Suite API and PC Connectivity SDK | 0 | 2002-08-29 07:49 |