A while back I wrote a little script in Python to test some of the new features of the Openmoko Freerunner. Several people have requested the source code, so I’ve cleaned it up a bit and made it available here: http://folks.o-hand.com/thomas/openmoko/gta02.py
There are a couple of items on the todo list and I’m sure anyone with more decent Python skills than me could do a fair amount of cleaning up with it. However, it works and is useful at least as a demonstration.
It requires python and pygtk.
Hello Thomas, I wonder how well it works for you? The /dev/input/event[2|3] seem to be very picky about being opened and not being read immediately. I have patched neod which opens them by default for no reason in order to not open them and shortend the acell_cb timeout in gta02.py to 10ms (bad, dirty hack).
The real fun however is to call xrandr -o [0|1|2|3] instead of just changing the label to “portrait” or “landsacpe”.
Anyway, thanks a lot for this demo app.
Marcus, yeah I had similar problems with that, I just chose the one that gave me least problems 🙂
Hi Thomas,
I modified your script some and followed the suggestion by Marcus to use xrandr for screen rotations. I also knocked off one of the todo items so it now reads the LED status on startup. This was one of my first adventures with python, so you will have to forgive me if I made a total mess of things =)
I posted a diff up here http://jacobpeterson.org/gta02_7-23-08.diff
Thanks for the app, it is a nice place to start playing with the FreeRunner.