Re: Device Orientation API
Patryk Benderz schrieb: > [cut] > >> Basically, it's sending you a string whenever the orientation changes. Valid >> substrings contain "portrait", "landscape", "faceup", "facedown". >> > IMHO using integers where (x,y,z) are -1,0 or 1, would be better idea. > This way you could make mathematical operations on this. Or use a > conditions like: (x=1,y>=0,z<0). There is already some info about axis > on wiki somewhere > ... and for putting this together, one could make macro(tests) ot the integers: portrait := (x,y,z) =~ (90,0,270) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
[cut] > Basically, it's sending you a string whenever the orientation changes. Valid > substrings contain "portrait", "landscape", "faceup", "facedown". IMHO using integers where (x,y,z) are -1,0 or 1, would be better idea. This way you could make mathematical operations on this. Or use a conditions like: (x=1,y>=0,z<0). There is already some info about axis on wiki somewhere -- Patryk "LeadMan" Benderz Linux Registered User #377521 () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Email secured by Check Point ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
Hello. On Wed, 2009-09-09 at 16:32, Helge Hafting wrote: > Michael 'Mickey' Lauer wrote: > > > > I'm sketching a simple device orientation API for FSO. The purpose is to be > > informed about changes in the physical device orientation. My first take is > > at > > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD > > > > Basically, it's sending you a string whenever the orientation changes. > > Valid > > substrings contain "portrait", "landscape", "faceup", "facedown". > > Good idea. > I assume orientation changes is only reported to apps that actually ask > for them? So that the accelerometers can be turned off to save power > whenever no apps happen to be interested. Yup, that is what the resource system in FSO handles. Power up devices only if apps request them and save power when nothing uses them. regards Stefan Schmidt ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
Michael 'Mickey' Lauer wrote: > Hi folks, > > I'm sketching a simple device orientation API for FSO. The purpose is to be > informed about changes in the physical device orientation. My first take is > at > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD > > Basically, it's sending you a string whenever the orientation changes. Valid > substrings contain "portrait", "landscape", "faceup", "facedown". Good idea. I assume orientation changes is only reported to apps that actually ask for them? So that the accelerometers can be turned off to save power whenever no apps happen to be interested. And of course, apps that can't use the information shouldn't need to use the cpu time either. Helge Hafting ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Wednesday 09 September 2009 13:23:55 Nils Faerber wrote: > Michael 'Mickey' Lauer schrieb: > > Hi folks, > > > > I'm sketching a simple device orientation API for FSO. The purpose is to > > be informed about changes in the physical device orientation. My first > > take is at > > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesm > >artphone.Device.Orientation.html;hb=HEAD > > > > Basically, it's sending you a string whenever the orientation changes. > > Valid substrings contain "portrait", "landscape", "faceup", "facedown". > > > > Comments? > > Sind it will for sure be supposed to become an general interface I would > suggest not to use names which can be confusing (if landscape is the > native orientation it becomes messy) but rather use degrees, i.e. > "45", "90", "180", "270" > > Which represent the number of degrees turned from native device > orientation. Hmm, good point. Let me think about this. :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Tuesday 08 September 2009 00:57:50 Dan Staley wrote: > +1 for the proposed API. I'd love a dbus message to be sent on portrait > and landscape. > Though I think you would probably need portrait, reversePortrait, > landscape, and reverseLandscape (to specify which side of the device is > "up" in each mode) Right, a couple of people have reported that I've been missing the 3rd parameter, thanks guys! :) > However, I tend to think that this functionality probably wouldn't be as > suited to something like mokomaze. > More for applications that just want a few different positions to be > notified on. (Like the proposed few) > Applications that need finer granularity such as Mokomaze should probably > still read the accelerometers directly. Correct. dbus is still overhead, hence it would not be clever to just forward the raw values, especially since an application that needs raw values is almost always a full window, full concentration application -- hence not much value (sic!) in distributing the values to other applications at the same time. The accelerometers will also fit nicely into the FSO Resource system. Cheers, :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Tuesday 08 September 2009 01:18:32 Nicola Mfb wrote: > Nice! in the past I heard about accelges integration, something moving? Unfortunately not. This work is completely independent of accelges. I always hoped that Paul would help us integrating accelges into FSO, but that didn't quite happen. In order to do something meaningful with our accelerometers in the meantime, I decided to start with some simple algorithms that would at least cover some common cases like waking up / suspending on certain orientations or running an application or rotating the screen based on orientation. Once we have something simple going, we can eventually revisit accelges and its algorithms and integrate more complex processing into FSO. :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Mon, Sep 7, 2009 at 9:36 PM, Michael 'Mickey' Lauer wrote: > Hi folks, > > I'm sketching a simple device orientation API for FSO. The purpose is to be > informed about changes in the physical device orientation. My first take is at > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD > > Basically, it's sending you a string whenever the orientation changes. Valid > substrings contain "portrait", "landscape", "faceup", "facedown". > > Comments? Nice! in the past I heard about accelges integration, something moving? Regards Nicola ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Mon, Sep 7, 2009 at 6:41 PM, Denis Johnson wrote: > On Tue, Sep 8, 2009 at 7:44 AM, Rui Miguel Silva Seabra > wrote: > > On Mon, Sep 07, 2009 at 09:36:21PM +0200, Michael 'Mickey' Lauer wrote: > >> I'm sketching a simple device orientation API for FSO. The purpose is to > be > >> informed about changes in the physical device orientation. My first take > is at > >> > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD > >> > >> Basically, it's sending you a string whenever the orientation changes. > Valid > >> substrings contain "portrait", "landscape", "faceup", "facedown". > >> > >> Comments? > > > > I agree wholeheartedly. omnewrotate was only a way to do "rotation" > better than > > the alternatives, but such use of accelerometers is too shallow. > > > > IMHO it's better that the position is declared as sets of angles and that > > "portrait", et all be "aliases" for certan sets of angles within a > certain > > tolerance, that certain listening apps would only pay attention to. > > > > This way, perhaps, one could mix flexibility with ease? > > +1 > > Perhaps one should be able to define the sets and aliases and that a > set does not only include one axis, so that an alias such as > "top-left-down" are possible. > > Thinking further, is it likely for different apps to want to use > different resolutions so for example mokomaze will want pretty high > resolution but another app that starts up may request/ inject (my > term) an additional set/alias to be reported. > > cheers Denis > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > +1 for the proposed API. I'd love a dbus message to be sent on portrait and landscape. Though I think you would probably need portrait, reversePortrait, landscape, and reverseLandscape (to specify which side of the device is "up" in each mode) However, I tend to think that this functionality probably wouldn't be as suited to something like mokomaze. More for applications that just want a few different positions to be notified on. (Like the proposed few) Applications that need finer granularity such as Mokomaze should probably still read the accelerometers directly. Just my two cents though. Thanks Mickey! -Dan Staley ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Tue, Sep 8, 2009 at 7:44 AM, Rui Miguel Silva Seabra wrote: > On Mon, Sep 07, 2009 at 09:36:21PM +0200, Michael 'Mickey' Lauer wrote: >> I'm sketching a simple device orientation API for FSO. The purpose is to be >> informed about changes in the physical device orientation. My first take is >> at >> http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD >> >> Basically, it's sending you a string whenever the orientation changes. Valid >> substrings contain "portrait", "landscape", "faceup", "facedown". >> >> Comments? > > I agree wholeheartedly. omnewrotate was only a way to do "rotation" better > than > the alternatives, but such use of accelerometers is too shallow. > > IMHO it's better that the position is declared as sets of angles and that > "portrait", et all be "aliases" for certan sets of angles within a certain > tolerance, that certain listening apps would only pay attention to. > > This way, perhaps, one could mix flexibility with ease? +1 Perhaps one should be able to define the sets and aliases and that a set does not only include one axis, so that an alias such as "top-left-down" are possible. Thinking further, is it likely for different apps to want to use different resolutions so for example mokomaze will want pretty high resolution but another app that starts up may request/ inject (my term) an additional set/alias to be reported. cheers Denis ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Device Orientation API
On Mon, Sep 07, 2009 at 09:36:21PM +0200, Michael 'Mickey' Lauer wrote: > I'm sketching a simple device orientation API for FSO. The purpose is to be > informed about changes in the physical device orientation. My first take is > at > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD > > Basically, it's sending you a string whenever the orientation changes. Valid > substrings contain "portrait", "landscape", "faceup", "facedown". > > Comments? I agree wholeheartedly. omnewrotate was only a way to do "rotation" better than the alternatives, but such use of accelerometers is too shallow. IMHO it's better that the position is declared as sets of angles and that "portrait", et all be "aliases" for certan sets of angles within a certain tolerance, that certain listening apps would only pay attention to. This way, perhaps, one could mix flexibility with ease? Rui ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Device Orientation API
Hi folks, I'm sketching a simple device orientation API for FSO. The purpose is to be informed about changes in the physical device orientation. My first take is at http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD Basically, it's sending you a string whenever the orientation changes. Valid substrings contain "portrait", "landscape", "faceup", "facedown". Comments? :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community