Getting ready for Rotate rewrite


So… following up on my patch for a better xrandr rotation on Rotate, I’ve been learning how to read the accelerometers, and it’s a lot of fun, actually. I’m so thrilled… I really missed programming :)

Now, the good news is that in a couple of days (hopefully) I’ll be posting a completely new Rotate. I’m collecting some positioning data from the second accelerometer, and right now I already know a few positions, at least my little test program is guessing some positions quite right…

s/guess position/libxrandr rotate/ and you get the new Rotate :)

All this without running the risk of seeing this software banned (like the iDictatorPhone), where it seems some programmer got his application banned on the iDictatorPhone because it competed with Mail.App. Nice one, Apple, you’re only proving us, Free Software activists, right. Again. :)

The following is the current output as I pick it up from the table and place it from turned up into turned down.

Postion (90,90,1026):  horizontal turnedUp
Postion (90,72,990):  horizontal turnedUp
Postion (36,54,990):  horizontal turnedUp
Postion (-36,36,990):  horizontal turnedUp
Postion (18,18,972):  horizontal turnedUp
Postion (18,936,0):  upsideDown
Postion (18,36,882):  horizontal turnedUp
Postion (36,36,900):  horizontal turnedUp
Postion (18,18,1008):  horizontal turnedUp
Postion (-36,1080,0):  upsideDown
Postion (-36,-36,1080):  horizontal turnedUp
Postion (72,1134,0):
Postion (54,18,1314):  horizontal
Postion (54,54,1386):  horizontal
Postion (18,144,1404):  horizontal
Postion (-36,198,1386):  horizontal
Postion (-72,234,1296):
Postion (-54,108,1152):  horizontal
Postion (-396,-72,936):  horizontal turnedUp
Postion (-864,-198,1080):  horizontal left turnedUp
Postion (-504,-36,918):  horizontal turnedUp
Postion (-504,54,1026):  horizontal turnedUp
Postion (-414,54,1098):  horizontal turnedUp
Postion (18,-54,774):  horizontal
Postion (234,-288,378):
Postion (180,-666,18):
Postion (414,-720,216):
Postion (-36,-1080,0):  vertical
Postion (90,-774,-72):
Postion (126,-270,-216):
Postion (234,702,360):
Postion (-360,378,-2304):
Postion (864,1170,-918):  right turnedDown
Postion (126,702,-1800):
Postion (288,558,-1494):
Postion (270,288,-1314):
Postion (54,108,-1206):  horizontal
Postion (108,162,-1098):  horizontal turnedDown
Postion (288,108,-882):  horizontal turnedDown
Postion (342,162,-792):  horizontal
Postion (270,72,-828):  horizontal turnedDown
Postion (306,36,-972):  horizontal turnedDown
Postion (306,90,-1188):  horizontal
Postion (270,324,-1332):
Postion (180,396,-1278):
Postion (126,450,-1386):
Postion (-36,522,-1674):
Postion (36,270,-1404):
Postion (180,90,-1080):  horizontal turnedDown
Postion (72,72,-1044):  horizontal turnedDown
Postion (54,90,-1044):  horizontal turnedDown
Postion (-18,72,-1080):  horizontal turnedDown
Postion (18,72,-1026):  horizontal turnedDown
Postion (18,36,-1080):  horizontal turnedDown
Postion (18,36,-1134):  horizontal
Postion (36,36,-1098):  horizontal turnedDown
Postion (54,36,-1098):  horizontal turnedDown
Postion (90,54,-1080):  horizontal turnedDown

, , ,

  1. #1 by Jakob Westhoff on 21 de Setembro de 2008 - 17:11

    You might want to take a look at the gestures application which was created during the last GSoC. (http://wiki.openmoko.org/wiki/Gesture). Maybe it is more wisely to make use of the dbus signals the gesture recognitition sends out, instead of implementing it all over again. I think it would be great to have a central daemon which detects all of the movement, which can be queried by any application to retrieve the requested information. The gestures application seems to be perfect for this. Furthermore it seems to be more future proof to me than letting every application implent the detections on their own.

    Nevertheless I am really looking forward to your rotation application. No matter what kind of detection scheme is used :) .

    grettings
    Jakob

  2. #2 by Rui Seabra on 21 de Setembro de 2008 - 17:43

    You are right, but I don’t run FSO. Are dbus signals sent on Om200x.y? I thought that was only in FSO, but maybe I understood wrongly?

    Since I need my OpenMoko as a daily usage phone and FSO isn’t ready enough yet (for me), for the moment Om200x.y where I’m coding…

  3. #3 by Rui Seabra on 21 de Setembro de 2008 - 17:45

    ITS ROTATING!

  4. #4 by Flyser on 21 de Setembro de 2008 - 18:33

    Sounds great :)
    please also consider cases when the freerunners angle to the earth is very low. eg if it is lying on a table or if you are using the freerunner while lying on the sofa/bed
    imho in such cases the rotation should be 0

  5. #5 by Jakob Westhoff on 22 de Setembro de 2008 - 4:41

    There should be no problem using dbus with 2007.x or 2008.x. The only thing you need to make sure is, that the dbus daemon is installed and running. There should be packages of it in the buildhost repositories. I don’t see any reason why it should not work, as dbus is only the message bus used. It is no speciality of the FSO image.

    greetings
    Jakob

  6. #6 by Rui Seabra on 22 de Setembro de 2008 - 6:22

    But the accelerometer data is being fed into the dbus system on those versions? I thought not.

  7. #7 by Jakob Westhoff on 22 de Setembro de 2008 - 16:22

    if the gestures daemon is installed and running. You can simple register to its dbus signals. Your application will then be notified if the orientation changes

    greetings
    Jakob

  8. #8 by Rui Seabra on 22 de Setembro de 2008 - 22:09

    Really? That would be nice, specially in terms of integration, I’ll have to check it out later…

  •  

    Setembro 2008
    S T Q Q S S D
    « Ago   Out »
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
  • Currently on Identi.ca...

    • ♺ @hook: #Microsoft - #Slovenian government agreement includes an anti-#FOSS clause! !FSFE 24 mins ago
    • Hoping to have cleared a lot of memory by zapping a whole lotta tabs in Firefox into appropriate bookmarks. 23 hrs ago
    • ♺ @mjvalente: What's the appeal of Game of Thrones? http://drp.ly/A2n73 via BBC #gameofthrones #tv 23 hrs ago
    • More updates...