Re: N810, GPS and Java

2010-05-25 Thread W. de Hoog
Navit and Maemo Mapper both contain code to use gpsd. Did you already 
take a look at them?


still having some trouble trying to put together an interface to the GPS 
device

on the N810. Overall I need to retrieve the current location (not sure what
kind of data the GPS driver (or the gpsd) returns on the N810) that 
eventually

I can feed into Google Maps API (or something equivalent) to show me
my current location on a map.

If anyone has ventured along these paths and has some suggestions I 
would greatly
appreciate it. If existing apps are out there that can already performed 
these

operations it would even be better so that I don't re-invent the wheel.

Thanks and regards

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers



--
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


sdl application hangs on exit when compiled with g++

2010-01-02 Thread W. de Hoog
Hi,

While packaging an SDL application (for diablo) I noticed it could not 
cleanly exit.

After a lot of trial and error a small test program showed me that when 
compiled with gcc it exits cleanly but when comiled with g++ it hangs 
when waiting for the audio thread to exit.

Any clues on what I can do to fix this problem?

Some things I noticed:
* The SDL audio thread function does end but the pthread_join for it 
never ends.
* When I recompile SDL to use SDL_KillThread instead of SDL_WaitThread 
to wait for the end of the audio thread, it does get ended but then 
hangs on killing the timers.

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


xephyr and sdl key codes

2009-12-20 Thread W. de Hoog
Hi,

Recently I upgraded my debian machine + scratchbox + sdk for diablo (and 
added fremantle sdk). Something caused my SDL apps to stop having normal 
keyboard behaviour. It appeared SDL received unknown key codes for most 
of the keys.

All seems to go well when I add the '-kb' option when starting Xephyr. 
Does anybody have a clue what might have changed or is this normal 
behaviour?

regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PUSH N900 (Was Re: N900 usb host + power charge)

2009-09-21 Thread W. de Hoog
Hi,

 > http://wiki.github.com/keesj/push_nbutton
Nice idea using lego. Maybe you can hide a wiimote in it. Bluetooth, 
buttons, tilt sensor. See
http://konttoristhoughts.blogspot.com/2008/05/wiicontrol-for-nokia-n810-n800.html
for a start.

regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: detect window iconified/maximized in SDL

2009-03-31 Thread W. de Hoog
Hi,

> BTW. another, perhaps a simpler, way with SDL is to track the FocusOut
> and FocusIn events. I think our pre-installed games do that. So when
> your window has the focus, run it, otherwise keep it paused.
A problem seems to be that fullscreen SDL apps (like mine) do not get 
the FocusIn/Out Events. Also the Enter/LeaveNotify events are with 
xcrossing mode NotifyGrab/Ungrab and thus do not generate SDL events.

regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: osso display event callback not called back

2009-03-29 Thread W. de Hoog
> In my SDL app I set my callback using:
> 
>osso_hw_set_display_event_cb(osso_ctx, osso_cb_display_state, NULL);
> 
> Right after being set the callback is called with state OSSO_DISPLAY_ON.
> 
> When the display is dimmed, goes off or on again it is unfortunately not 
> called anymore. Does anybody know more about this?
I also tried to listen to the dbus myself which only started to work 
after I added this line in my SDL applications main loop:

  dbus_connection_read_write_dispatch(dbusCon, 0);

and when that worked it also made by registered callback being called.


regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: detect window iconified/maximized in SDL

2009-03-28 Thread W. de Hoog
Hi Kees,

 > Should we/I  start a small libsdl project on garage to address such 
issues?

I am all for these issues being addressed. But I ran out of ideas. As 
mailed previously the window manager seems to not notify every event (or 
not all info for the event) and I also tried to listen to all dbus 
signals but the sdl app does not seem to get them.

Tried it by creating an SDL thread that ran

   while(dbus_connection_read_write_dispatch(connection, -1));

or by calling dbus_connection_dispatch from the main loop. Still I do 
not get the on/dimmed/off events.

So yes I would like to work on a solution but I need ideas where to 
start looking.

regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: detect window iconified/maximized in SDL

2009-03-26 Thread W. de Hoog
Hi,

> Do you have a separate thread that listens on the libosso callback stuff?
> That could work also if it "locks up" the main loop when display is turned 
> off and
> (like your main thread) doesn't use SDL to wait for events.
I do not have a seperate thread for it. I did register my callback but 
as I mailed, it is not being called back when the display goes on or 
off. This is very weird and disappointing.

> You can in select() listen on that file descriptor.  You could look for an 
> example here:
> http://hg.berlios.de/repos/hatari/file/c6567e2a430d/src/control.c
Thanks for the link. However this seems a bit beyond my reach.


regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


osso display event callback not called back

2009-03-25 Thread W. de Hoog
Hi,

In my SDL app I set my callback using:

   osso_hw_set_display_event_cb(osso_ctx, osso_cb_display_state, NULL);

Right after being set the callback is called with state OSSO_DISPLAY_ON.

When the display is dimmed, goes off or on again it is unfortunately not 
called anymore. Does anybody know more about this?


regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: detect window iconified/maximized in SDL

2009-03-25 Thread W. de Hoog
Hi,

> BTW. another, perhaps a simpler, way with SDL is to track the FocusOut
> and FocusIn events. I think our pre-installed games do that. So when
> your window has the focus, run it, otherwise keep it paused.
When I listen to SDL_SYSWMEVENT I get xevent type 33 when I switch to my 
app or switch away from it (the app is fullscreen only). The data seems 
always to be 0 so I do not know if focus is in or out.

Code I use:

case SDL_SYSWMEVENT:
 printf("Xevent: %d:%d", event.syswm.msg->event.xevent.type, 
event.syswm.msg->event.xevent.xclient.format);
 printf(" %d:%d", 
event.syswm.msg->event.xevent.xclient.data.b[0], 
event.syswm.msg->event.xevent.xclient.data.s[0]);
 printf(" %d\n", 
event.syswm.msg->event.xevent.xclient.message_type);


output is:

Xevent: 33:8 0:0 327
Xevent: 33:8 0:0 327

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: detect window iconified/maximized in SDL

2009-03-25 Thread W. de Hoog
Hi,

> Note that it's not enough just to use SDL function to wait for events when 
> it's
> invisible / idle. SDL does 10Hz polling even when waiting for events which 
> will 
> drain battery pretty soon.  (I filed a bug about that for upstream SDL several
> years ago, it's still not fixed, but there's a broken patch available.)
That is sad. I was thinking of using an SDL semaphore in the main loop 
that is locked/unlocked when osso notifies of display on/off. This would 
not do much then I guess.


> Because of this, in my own SDL code I use select() when the process should
> be idle in RAM longer times without draining battery. You can get the SDL X
> socket file descriptor like this:
Please forgive my ignorence but I do not understand the link between 
select() and GetUISocket().


-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


detect window iconified/maximized in SDL

2009-03-24 Thread W. de Hoog
Hi,

I would like to detect when an SDL application gets iconified. Than I 
can pause it to save power. In theory the SDL_ACTIVEEVENT should be 
generated and event.active should give me the info I need however I do 
not get these type of events.

Anybody know of how to get the correct events or another way to detect 
the iconification?

regards,

-- 
Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


promoting dependencies (libraries)

2009-02-07 Thread W. de Hoog
Hi,

Currently I am trying to get a package I made (gnurobbo) into extras. It 
uses libsdl-ttf2.0 and libsdl-gfx1.2. I guess I can only promote 
gnurobbo if all of it's dependencies are promoted as well.

Does anybody know:
1. What happens if I promote gnurobbo without it's dependencies? 
(refused automatically?)
2. Who is allowed to promote libsdl-ttf2.0 and libsdl-gfx1.2?


Willem-Jan de Hoog
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers