| Reply | « Previous Thread | Next Thread » |
|
Hi,
I'm trying to developp an API to the lbs services to use the N95 internal GPS device. My first version of the extension is located here (mercurial repository) : https://air.mosomuso.com/pubhg/pyext/ It returns lat, lon, alt, accuracy (hor, vert) and name of the module used but it requires a DevCert signature with Location capabilities. I'm looking forward to get advices or comments. I didn't integrate it to location extension, but it would be logical to do it. And, also, I'm trying to make it non-blocking, but I don't find how to do it, Python crashes when I just make a Positioner.NotifyPositionUpdate(PosInfo, Status) without waiting for the Async call to return. I'm not experienced with Symbian programming and I may not well understanding how it goes on. I also looking to make it coherant with the functionning of lbs (updates, returning or not a position if the GPS is online or if the value is old...) Thanks |
|
|
|
Quote:
I'm using the same thing based on an example of the module ext/location of PyS60. I was wondering if it was possible to do something like : * Do the request * returns with value None (no value available) * The request finishes and the value is updated in the object * the next call returns the actual value and a new request is issued. What would be better is : A timer that refreshes the value every 10 seconds, and the accessor only returns the value present in the object (with optionnaly a timestamp to evaluate the accuracy of the value returned) I tried to do that but Python crashes... no idea what I was doing wrong. => can I just bypass the CActiveSchedulerWait::Start not to wait the response to come ? Code I took from the asynccallhandler.cpp file in PyS60 ext/location folder: Code:
iWait=new (ELeave) CActiveSchedulerWait; Code:
this->iPositioner.NotifyPositionUpdate(posInfo, status); this->SetActive(); this->iWait->Start(); status=this->iStatus; |
|
Note that you must always release the interpreter lock before entering the Active Scheduler and reacquire it upon return. In the above code you must do:
Code:
PyEval_SaveThread(); this->iWait->Start(); PyEval_RestoreThread(PYTHON_TLS->thread_state); |
|
Quote:
So it is done but a little bit before and after this code block. Christophe Berger |
|
Yes, these two calls do the same thing.
|
|
If you wonder how to do async callbacks in pys60 from c++ to python code, look the code of e32.ao_sleep. Tell if you have problems.
|
| simo.salminen |
| View Public Profile |
| Find all posts by simo.salminen |
|
Hello
I've writed two simple App which can perhaps give you so tricks to use the LBS API : http://www.newlc.com/playing-n95 and http://www.newlc.com/playing-n95-use...pi-and-so-more perhaps it can helps -- MarCo |
| marciallus |
| View Public Profile |
| Find all posts by marciallus |
|
Hi,
Quote:
Thank you Christophe Berger |
|
Does it work with E90?
|
|
It should work with the E90 as it runs the same system/version as the N95 which I used to test it.
Christophe Berger |
|
I comitted a new version of the gps_location module, it now uses active object but still has problems. If someone wants to review the code it will be appreciated.
mercurial repository : https://air.mosomuso.com/pubhg/pyext/ I comitted an other module to perform wlan scanning, it returns data about seen wlan networks (SSID, BSSID, Rx Level...) but uses an API from the Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, MR, Version 4 (http://forum.nokia.com/info/sw.nokia...Pack1.zip.html) please feel free to test it. Christophe Berger |
|
Quote:
Christophe Berger |
|
Quote:
Code:
import positioning pos = positioning.position() I love high level programming languages like Python for series 60. :-) |
|
Quote:
hi marco , i have got a problem here. i build your application example at newLC. i sent it to my phone but when i try to install it it gives me error like "Required application access not guaranteed" (phone is NOKIA N95) how can i solve this? |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| PC Suite error: (Code: Init IMediaControl2) HELP?! | chunkyspudmonkey | General Discussion | 29 | 2008-06-30 12:47 |
| GPS on N95 | kvr0 | General Symbian C++ | 0 | 2007-05-11 11:22 |
| Nokia N95 - does the GPS application have an API | hagana | Mobile Java Networking & Messaging & Security | 2 | 2007-05-05 11:42 |
| Accessing the N95 GPS | snogge | General Discussion | 2 | 2007-02-11 22:11 |
| N95 GPS/Location API | DavidJN | Mobile Java General | 1 | 2006-10-17 23:38 |