Re: [PythonCE] reading GPS?

2008-07-11 Thread Justin Mitchell

Alex Mandel wrote:

Justin Mitchell wrote:

Alex Mandel wrote:

Justin Mitchell wrote:
Any suggestions on where to get started on reading GPS coordinates? 
Would these be read through the serial interface? I have a Motorola 
Q9C Smartphone.


Justin




Yes, do a search through the history of this list for ceserial to get 
the python wrapper around the com ports.


I'm actually working on a GPS tool based on this. I have a sample 
tool that logs anything over com port and specifically is aimed at 
parsing NMEA with a tcl/tk interface right now.


Ideally I just need to contact the ceserial author since the license 
is unclear and see about where we should post this stuff. Maybe a new 
sourceforge project?


Let me know if you need some examples,
Alex



Examples would be excellent!

Justin



I don't have my full svn of my project moved to a public website yet 
(actually only have the last checkout right now) but I can show you the 
example I used to figure out how to deal with the gps. This should get 
you started.


http://article.gmane.org/gmane.comp.python.windows-ce/1631/match=ceserial

More to come later I'm sure,
Alex



Thanks! I've been fooling around with that code, and am getting an 
exception in this function in ceserial.py:



def getCommTimeouts(self):
  """Get the comm timeouts."""
  timeouts = COMMTIMEOUTS()
  if not(windll.coredll.GetCommTimeouts(self.__handle,byref(timeouts))):
raise SerialException, windll.coredll.GetLastError()
  return timeouts


windll.coredll.GetLastError() print's "0", which isn't of much help! I'm 
not too familiar with the win32api. What is the proper way to print 
error messages?


I googled it, and found one other person who ran into the same problem, 
but did not resolve it.


I've looked through the MSDN docs, and the ceserial source, but I'm 
stuck. Any ideas?


Thanks again,
Justin

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] reading GPS?

2008-07-08 Thread Justin Mitchell



Christopher Fairbairn wrote:

Hi Justin,

On Wed  9/07/08 11:47 , Justin Mitchell [EMAIL PROTECTED] sent:
Any suggestions on where to get started on reading GPS coordinates? 
Would these be read through the serial interface? I have a Motorola Q9C 
Smartphone.


One approach (if you don't mind being Windows Mobile dependant) is to use ctypes
to interface to the GPS Intermediate Driver (documented on MSDN at
http://msdn.microsoft.com/en-us/library/ms850332.aspx).

This approach would take care of NEMA sentance parsing etc and give you a
structure with current lat/long and speed etc.

Alternatively you can also go the serial port route. In that case you can use 
the
GPS control panel applet to determine which COM port you should read from. See
http://blogs.conchango.com/kenibarwick/archive/2006/03/19/3119.aspx for more 
details.

Hope this helps,
Christopher Fairbairn
Microsoft MVP - Device Application Development
http://www.christec.co.nz/blog/



Thanks for the info. I think the serial approach would suit me better. 
However... I don't think the GPS control panel exists on my phone (there 
was no GPS Settings registry key). I wonder if MS removed it in WM 6.1.


Do you know if these settings can be specified manually?

Thanks!
Justin

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] reading GPS?

2008-07-08 Thread Justin Mitchell

Alex Mandel wrote:

Justin Mitchell wrote:
Any suggestions on where to get started on reading GPS coordinates? 
Would these be read through the serial interface? I have a Motorola 
Q9C Smartphone.


Justin




Yes, do a search through the history of this list for ceserial to get 
the python wrapper around the com ports.


I'm actually working on a GPS tool based on this. I have a sample tool 
that logs anything over com port and specifically is aimed at parsing 
NMEA with a tcl/tk interface right now.


Ideally I just need to contact the ceserial author since the license is 
unclear and see about where we should post this stuff. Maybe a new 
sourceforge project?


Let me know if you need some examples,
Alex



Examples would be excellent!

Justin

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


[PythonCE] reading GPS?

2008-07-08 Thread Justin Mitchell
Any suggestions on where to get started on reading GPS coordinates? 
Would these be read through the serial interface? I have a Motorola Q9C 
Smartphone.


Justin

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PPyGui SVN & PPyGui-win32

2008-07-08 Thread Justin Mitchell

Alexandre Delattre wrote:

 > Very nice! Will this work with WM5/WM6 Smartphones? I see that the
 > installer will not run, however I wonder if it can be installed 
manually.


 > -Justin


Currently some widgets are not usable on non-touchscreen smartphones, 
which from what I heard will make impossible to go through the installer.
However, while waiting for a better solution, you can copy the ppygui/ 
dir from the archive or svn to your \Program Files\Python25\Lib\ dir, 
and you'll be able to write some little apps that use only simpelest 
widgets.


Regards,
Alexandre



Works great! I've only tried Button, Label, Edit, but so far almost 
everything I've tried works.


A couple things though.

Is there any way to have two buttons on the bottom? As it is I can only 
use one button (on the left) and one menu (on the right). Or is there a 
way to change the text of the button after it has been displayed?


When printing times, is there any way to print the milliseconds? They do 
not show up when printing datetime.now() or time.time(). Milliseconds 
are displayed in PPyGui, but not on the smartphone.


Also, I don't believe focus() works on widgets. It works in PPyGui, but 
not on the phone.


Thanks!
Justin

___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce


Re: [PythonCE] PPyGui SVN & PPyGui-win32

2008-07-07 Thread Justin Mitchell
Very nice! Will this work with WM5/WM6 Smartphones? I see that the 
installer will not run, however I wonder if it can be installed manually.


-Justin


[EMAIL PROTECTED] wrote:

Hi all,

I'm pleased to announce that PocketPyGui development is now kindly 
hosted by Mirko "[EMAIL PROTECTED]"; Vogt :)


The svn repository host the latest version of PPygui as well as 3rd 
party apps and tools not published yet.

You can check it out by typing:

svn co https://svn.nanl.de/svn/ppygui/

and use "anonymous"/"anonymous" as user/password.

Especially, the repository contain the first version of the native 
PPygui win32 implementation,
which allow you to test and debug your PPygui apps directly from desktop 
Windows or with Linux through Wine.


As PPygui for win32 reuse 90 % of the wince implementation, this gives a 
fairly coherent and compatible environment for mobile apps development.
It is likely your existing apps will work out of the box, as it did for 
almost all of mine.


The only thing really missing now is gui.Html control, but it should not 
be to much hassle to implement it with comtypes and hopefully we can see 
it ported in a couple of days.


With very little effort you'll be able to make regular desktop gui 
applications, and reuse your components between classic and mobile 
versions of your app.


While PocketPyGui will remain focused on mobile devices, it'll be soon 
an alternative to create lightweight win32 applications that are easy to 
write and distribute.


As always, any contributions and feedbacks are welcome. Also, if you 
want to gain developer access to svn, feel free to mail me.


Regards,
Alexandre


___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce