Re: [debian] No right click with tslib 0.0.5-1+fso1

2009-03-10 Thread Sebastian Ohl
Hi,
On Tue, 2009-03-10 at 14:12 -0500, Daniel Benoy wrote:
 Is the source available?  (or can you make it available?)
as it found its way into debian you can simply download the source from
unstable repository. 

http://packages.debian.org/sid/xserver-xorg-input-tslib

regards
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [Debian] Launch openmoko-panel-plugin functions from .desktop files?

2009-03-08 Thread Sebastian Ohl
Hi,
On Sun, 2009-03-08 at 15:55 +0100, Marcel wrote:
 Since illume doesn't provide a systray (and the screen's too slim for all the 
 icons anyway), I'm looking for a way to for example launch the usb-mode- or 
 the shutdown/suspend/wifi(on|off)-panel by hand from some .desktop icon 
 instead of the (unavailable) systray symbol. I had a look at the code but I 
 don't really understand what launches what and when there... As of writing 
 this, I remember some of that must be possible through mdbus calls, but does 
 frameworkd provide functions for switching usb host/client mode? (Okay, I 
 could find that out myself, API docs ftw...)
 But the question stays the same: Can I somehow launch these nice panels 
 manually?
i don't know if i am understanding you correctly: you want to start only
a part of opp without haveing a systray application running, right?
first of all you can disable the icons you don't want to have in opp so
there should be no need to strip opp down to what you wanne use. second
the initialization of the icons are mainly done in the StatusIcon object
of the opp code. if you want to add icons to an other environment than
systray, you may want to change this code. we are always happy to
receive patches to enhance opp. but may be the easyest was to achive
your goal is to find/write a systray application for illume.

-- 
Regars
 Sebastian Ohl

 --
 Sebastian Ohl  sebast...@ohl.name
 Kurzekampstr. 14   Tel +49 531 7998221
 D-38104 Braunschweig   Mobil +49 172 1837678


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [debian] No right click with tslib 0.0.5-1+fso1

2009-02-24 Thread Sebastian Ohl
Hi,
On Tue, 2009-02-24 at 14:14 +0100, kimaidou wrote:
 Any application for testing the right-click ?
xev should do the trick. it not a very useful application(at least not
for things other than debugging). 

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [debian] No right click with tslib 0.0.5-1+fso1

2009-02-22 Thread Sebastian Ohl
Hi,

i just updated the rightclick patch to the newest tslib debian package.
for me it works just fine. i also fixed the initialization of the
pointer device(thanks to Daniel) so it should also work with other
windowmanagers than xfce (at least fluxbox works now). 

the new packages can be downloaded from
http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-3.1
+fso1_armel.deb

to get it working just follow the instructions under
http://wiki.openmoko.org/wiki/Debian#With_fbdev_driver_from_xserver-xorg
and don't forget to change your device specification.

regards
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [debian] No right click with tslib 0.0.5-1+fso1

2009-02-22 Thread Sebastian Ohl
Hi,
On Sun, 2009-02-22 at 17:06 +0100, Michele Renda wrote:
 On 22/02/2009 11:37, Sebastian Ohl wrote:
  the new packages can be downloaded from
  http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-3.1
  +fso1_armel.deb
 The url seem to be not running. I was trying to update: 
 http://wiki.openmoko.org/wiki/Debian
my fault. cutpaste is not good.

try
http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-3.1_armel.deb

regards
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


[debian] openmoko-panel-plugin v0.6

2008-11-20 Thread Sebastian Ohl
Hi everyone,

after some work we are happy to release a new version of the
openmoko-panel-plugin (0.6). the openmoko-panel-plugin is a gtk based
plugin for the nice bars in common windowmanagers like xfce or gnome. it
shows you status' of i.e. your battery or your gps and i.e. handles
keyboard applications. 

Changelog:
 porting the software to fso framework milestone 4

this is just a porting release. new features will arrive as soon as
chris merged his new module structure with the new release.

it can be downloaded from our project page:
https://projects.openmoko.org/projects/panel-plugin/
or via the pkg-fso debian repository (apt-get install
openmoko-panel-plugin)

i hope that all your problems with the old version and the new milestone
now vanished.

regards
 sebastian




___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [debian] openmoko-panel-plugin 0.5

2008-11-08 Thread Sebastian Ohl
Hi,

On Fri, 2008-11-07 at 10:15 -0500, Stefan Monnier wrote:
 BTW, I also noticed that the USB icon (and corresponding control
 panel) disappeared here.  Is that intentional?
The usb icon vanished because we don't get it working as indented. You still
can't switch the usb modes... but sudo should be a good solution the
deal with the permission problems. may be next version...

  i also would like to be able to un-/lock screen with power-button ..
  but actually i don't know how to disable touch so it doesn't emmit
  events .. anyone some ideas ?
xscreensaver oder xlock should do the trick. when the powerbutton becomes 
more configurable it should be easy to alter the behavoir to lock the
screen.
regards
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [debian] openmoko-panel-plugin 0.5

2008-11-06 Thread Sebastian Ohl
On Wed, 2008-11-05 at 17:02 -0500, Stefan Monnier wrote:
 - The GPS off icon doesn't use the read slashed circle contrary to
   all others.
yes i think this can be updated to have to same impression on every
icon.

 - The tooltips seems to only say on or off, so they really are
   useless (if not harmful) since that info is already given by the icon.
   So most of those tootips should be removed, or replaced with something
   useful (e.g. wifi network to which we're connected, whether we're
   connected to the internet, status of the battery, number of GPS
   satellites in view, ...).
the information presented by the tooltips depends on the information
provied by the frameworkd(we don't share every info at this time). i
think after redesigning the software, we are now able to provide more
features(information).

  *   power:
  * on short press: for now nothing happens
  * on longer press (2 sec) window with buttons opens:
  *   suspend (functional)
  *   shutdown (for now non-functional)
  *   close (closes window)
  This is a really nice feature but it collides with the zhone power
  button behaviour. When i run zhone and press the power button for 2s my
i think making the button behavior configurable should do the trick. so
everyone can decide which program should handle the button.

regards
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: debian mailing list confusion, Was: openmoko-panel-plugin: patch and bug

2008-11-05 Thread Sebastian Ohl
Hi,

On Mon, 2008-11-03 at 15:18 +0100, Joachim Breitner wrote:
 I consider pkg-fso to be strictly related to Debian _packaging_
 issues.
 In that sense, the mail was sent appropriately (as it was a request for
 inclusion in Debian), but a separate release-announcement for the
 general audience to smartphone-userland would have been good, I guess.
yes, it would have been, but the idea to post to the pkg-fso list first
was to stop distributing the packages via my own page but through the
pkg-fso repo. so i planed to post a announcement after the upload to the
pkg-fso repo. 
-- 
regards
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


[debian] openmoko-panel-plugin 0.5

2008-11-05 Thread Sebastian Ohl
Hi folks,

after the confusion on the last few days now i am happy to announce a
new version of the openmoko-panel-plugin. the panel-plugin is a little
peace of software to show and modify you the state of the hardware in
you freerunner(i.e. gsm, gps ...). it should work with any gtk based
windowmanager (i.e. xfce). 

you should now simply get the new version(0.5) through the debian
repository(apt-get install openmoko-panel-plugin) or via
http://pkg-fso.alioth.debian.org/debian/pool/main/o/openmoko-panel-plugin/

Changelog:
   * this is a complete rewrite of the software. now it is much
 cleaner and better to extend
   * changed the distribution from unstable to pkg-fso
   * new battery-icons
   * extended suspend-behaviour:
   *   on suspend: turning off wifi, bt, gps and sending
dbus.preparesuspend
   * to gsm
   *   on resume: restoring previous power-state of wifi, bt, gps
   * and sending dbus.prepareresume to gsm
   * enabled shutdown-button in power-button-window
   * new high-contrast version
   * added configWriter to save changed configs to ~/.panel-pluginrc
   * added config-area for selection of active icons
   *   (order of icons is planned but not implemented yet)
   * added new 'icon' for button-handling:
   *   aux:
   * on short press: keyboard-toggle
   * on longer press (2 sec) window (for now only with
close-button) opens
   *   power:
   * on short press: for now nothing happens
   * on longer press (2 sec) window with buttons opens:
   *   suspend (functional)
   *   shutdown (for now non-functional)
   *   close (closes window)
   * added entries for buttons (aux, power)
   * config-window
   * some more gsmIcon updates:
   *   corrected dbus-callback-function-header
   *   added location area code (if available from dbus)
   *   now choosing right icon for gsm turned off
   *   corrections to gsmStatus-update work properly
   *   added some try-blocks around file-io to prevent IO-timeouts
killing
   * main-thread
   * added battery-notification
   * update to BatteryWindow to reduce resource-usage when BatteryWindow
inactive
   * extended BatteryIcon to show more battery-status in a window and
setup
   *   chargingMode (100, 500, 1000mA)
   * added BrightnessIcon and corrected some threading-related stuff
   * hold the aux button for more than 2 seconds to enable/disable
keyboard
   * extended GSM-Icon to show network-status
   *   (un)registered
   *   provider
   *   signal-strength
   *   cellid
   * for tooltip and notification
   * made notification optional - when python-pynotify is installed
   * keyboard icon

-- 
regards
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: openmoko-panel-plugin: patch and bug

2008-11-03 Thread Sebastian Ohl
Hi,

On Sun, 2008-11-02 at 12:33 +0100, arne anka wrote:
 after a few minutes the polling of at least the battery state stops --  
 little investigation shows an exception, because the dbusgsmstate dict  
 seems not to contain the key registration
 --- oldStuff/openmoko-panel-plugin  2008-10-25 23:11:43.0 +0200
 +++ /usr/bin/openmoko-panel-plugin  2008-11-02 12:23:07.0 +0100
 @@ -650,7 +650,7 @@
   try:
   self.dbusgsmstate =  
 Interface(self.resources_proxy[GSMVALS],  
 org.freesmartphone.GSM.Network).GetStatus()
   except:
 -self.dbusgsmstate = {}
 +self.dbusgsmstate = {u'registration':'n/a'}
 
   try:
   self.brightness =  
 dbus_object.device_display_iface.GetBrightness();
thanks for the bug report. but i think it is against the old version.
there have been a new version of the panel-plugin(since friday) which is
waiting to get uploaded to the fso repository. but it have been
suspended until frameworkd milestone 4 have been released. it is a
complete rewrite of the plugin to cleanup most of the code.

pl. try http://www.ohli.de/download/openmoko-panel-plugin_0.5-1_all.deb
and tell us weather your problem vanished(i hope so).

also we now have a bug tracking system on
https://projects.openmoko.org/projects/panel-plugin/ 

cu 
 sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


[debian] openmoko-panel-plugin 0.4

2008-09-24 Thread Sebastian Ohl
Hi gents,

some words of what this is(as it produced some confusion last time:
The openmoko-panel-plugin is a gtk based plugin that draws the
powerstate of some FR hardware devices(i.e. gsm, gps) to a gtk based
panel. theses panels are used i.e. in xfce4. so you can enable or
disable the state of your gps receiver.

See a screenshot here: http://www.ohli.de/download/openmoko-panel.png


i just uploaded a new release (0.4) to my server. it can be downloaded
from:
http://www.ohli.de/download/openmoko-panel-plugin_0.4-1_all.deb
http://www.ohli.de/download/openmoko-panel-plugin_0.4-1_amd64.changes
http://www.ohli.de/download/openmoko-panel-plugin_0.4-1.diff.gz
http://www.ohli.de/download/openmoko-panel-plugin_0.4-1.dsc
http://www.ohli.de/download/openmoko-panel-plugin_0.4.orig.tar.gz

Changelog:
  * fixed many debianizing errors. 
  * adding more dependencies
  * fixed problems with different versions on my laptop :-(
  * the menu entry should reappear
  * click opens a context menu to toggle the powerstate
  * removed some icons until they are finaly working

the credit for the code changed goes to morlac.

thank you for the big feature requests in the last mails. some of them 
are already integrated into the code. but the code needs a big cleanup. 
so please be patient. i think i will need a weekend to integrate all your 
suggestions *g*  

Cu
 Sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


new version of the openmoko-panel-plugin 0.3

2008-09-18 Thread Sebastian Ohl
Hi everyone,

here is a new version of the panel plugin. 

Changelog:
usb mode icons and dialog
gsm strength view

it can be downloaded from:
http://www.ohli.de/download/openmoko-panel-plugin_0.3-1_all.deb
http://www.ohli.de/download/openmoko-panel-plugin-0.3-1.diff.gz
http://www.ohli.de/download/openmoko-panel-plugin-0.3.orig.tar.gz

Cu
 Sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: New tslib xsrelease with right click

2008-08-29 Thread Sebastian Ohl
Hi,

On Fri, 2008-08-29 at 18:54 +0200, Andre Roth wrote:
 this works nicely for xfce, however using fluxbox nothing happens. 
 a right click over X11vnc shows the fluxbox menu. 
 does the right click somehow depend on the window manager ?
no the right click does not depend on the window manager. but there
reports on strange behavior on other systems than the FR. may be that
are the same reasons. i will test this myself. may be i find the reason
why it don't do. may be it is because when you put the stylus down a
left down event is produced until some time a left up and than a right
down event is generated. can you please try this sequence via x11vnc?

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


New tslib xsrelease with right click

2008-08-28 Thread Sebastian Ohl
Hi,

there is a new upstream release in the debian repository. so here is a
new package with the right click by tap+hold patch. it can be downloaded
from http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-1
+fso1_armel.deb . you also have to change your pointercal file because
the package is now based on the new debian package. just download it
from http://pkg-fso.alioth.debian.org/freerunner/pointercal-fso and save
it to /etc/pointercal .

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


tslib xserver input driver debian packge, addition

2008-08-28 Thread Sebastian Ohl
Hi,

with the new package the second patch is also added to the package. this
patch makes it necessary to add a new line to your xorg.conf. 

Option  EmulateRightButton1

just add it to you InputDevice section. Without this line the old
behavior of the tslib driver is restored - this means no right click
 
-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-27 Thread Sebastian Ohl
Hi,

On Tue, 2008-08-26 at 18:07 -0700, C R McClenaghan wrote:
 Having started it from the application menu (at first was missing  
 python-gtk2) I see only GSM and WiFI icons - no batery, GPS or BT?  
 What else do I need to do to get all?
first, i will take a look a the package dependencies. for the battey etc. 
you may have to many other icons in your panel. the pager applet took a 
lot of space. if there are too many the openmoko panel plugin starts to move
to the right out of the window. but thats no problem with the plugin but
with the plugin mechanism. so try to remove i.e. the pager or make the
tasklist plugin a litte bit smaller.

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-27 Thread Sebastian Ohl
Hi,

On Wed, 2008-08-27 at 17:43 +0200, Christian Adams wrote:
 i am running [EMAIL PROTECTED] with xdm/xfce/sebastians tslib-patch and  
 visible cursor on 8G sandisk-SD.
 simple clicks are no problem, but right-click is a little bit tricky  
 sometimes due to the cursor jiggling around the steady stylus aprox  
 5px ..
yes there is a threshold where the curser has to stay for a while. it is
4px (as in libgtkstylus).

 has someone an idea to stop this jiggling somehow?
to workaround this by using a higher threshold is no solution. but you
can add a filter plugin to tslib or choose different parameters. there
is already a tslib filter plugin to reduce noise from a touchscreen.

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-27 Thread Sebastian Ohl
Hi,

On Wed, 2008-08-27 at 19:29 +0200, Christian Adams wrote:
 and how would i add a filter plugin to tslib?
 i found nothing apropirate on a quick-search ..
http://svn.berlios.de/viewcvs/tslib/trunk/tslib/README?rev=26view=markup

more documentation can be found in the sourcecode of the filter (some
dirs up). they are doing no magic here. may be a more sophisticated
filter(i.e. kalman- or paticlefilter) may be better. the plugin
structure is quite easy but currently i don't have time to code one.
hopefully your problems will be solved by the already available filters.

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-24 Thread Sebastian Ohl
Hi,

xaos x and I finished our efforts to create a panel plugin to show you
the power states of the FR hardware components without using zhone. it
should be usable in any gtk based panel (i.e. xfce or gnome) and its
based on the frameworkd dbus infrastructure. with this plugin you can
not just show but also disable or enable the hardware components by
clicking on the icons. the battery state is also displayed.

you can get a debianized version from
http://www.ohli.de/download/openmoko-panel-plugin_0.1-1_all.deb or the
source from
http://www.ohli.de/download/openmoko-panel-plugin_0.1-1.tar.gz

-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-24 Thread Sebastian Ohl
On Sun, 2008-08-24 at 19:06 +0200, arne anka wrote:
 uhm, how does one use it?
It should appear somewhere in your windowmanagers application menu(in
xfce in submenu other) or you can start it on a console
via /usr/bin/openmoko-panel-plugin 
-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-20 Thread Sebastian Ohl
Hi,
On Wed, 2008-08-20 at 21:25 +0200, Michele Renda wrote:
 Network manager doesn't show the network traffic, but permit to
 open/close the connection.
i'm managing my wifi connections with wifi-radar. it works very well but
you have to do some changes to the source because some of the options
set by wifimanager will fail with the openmoko wifi card.
-- 
Yours
 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Customize Debian image in a mini desktop

2008-08-20 Thread Sebastian Ohl
Hi,

On Wed, 2008-08-20 at 14:39 -0400, xaos x wrote:
 I'm currently finishing up a battery power python app for any of the system 
 trays (GNOME, XFCE, etc) so you can see battery power when zhone is either 
 not open, or minimized. I plan on adding phone network status and other 
 information to it as well. I'll post the link here when I'm finished.
i'm currently doning the same but it's only a xfce panel plugin so you
can't use it for gnome etc. my program can currently show the status of
the gps,gsm,bt devices. so i did it the other way around. may be we
should combine our afforts so we get a faster solution. i think my next
step would be to build an app to enable or disable the gpsco hardware.

Yours 
 Sebastian Ohl


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Right mouse button xorg-input-tslib patch (tap+hold)

2008-08-17 Thread Sebastian Ohl
Hi,

On Sat, 2008-08-16 at 18:06 +0200, Sebastian Ohl wrote:
 as i told joachim, i will think about that. i cannot be so hard to
 implement the logic, but the hard part would be to get it stable(not in
 the way of code quality but in to get deterministic bias free results)
second try. now it you don't need the aux key anymore. just tap for .5
seconds in the same region (+-4px) to produce a right button click. the
main advantage is that this patch is hardware indendent, so it can be
included in any phone distro not just the openmoko ones. 

the only thing i don't like about is that there is no visual
timeout(on my motorola ming there is a circle drawing around my curser
while the timeout exprires). does anyone have any idea how to accomplish
that? i don't have enough expriance in xorg driver programming and the
docs are not very helpful(at least the ones i found).

Sebastian

--- xf86-input-tslib-0.0.4/src/tslib.c	2007-10-19 10:59:29.0 +
+++ xf86-input-tslib-0.0.4.b3/src/tslib.c	2008-08-16 22:42:55.0 +
@@ -50,6 +50,8 @@
 #include mipointer.h
 
 #include tslib.h
+#include sys/time.h
+#include time.h
 
 #ifdef XFree86LOADER
 #include xf86Module.h
@@ -57,21 +59,28 @@
 
 #define TSLIB_DEV_DEFAULT /dev/event0
 
-#define MAXBUTTONS 1
+#define MAXBUTTONS 2
+#define TIME23RDBUTTON 0.5
+#define MOVEMENT23RDBUTTON 4
 
 #define DEFAULT_HEIGHT		240
 #define DEFAULT_WIDTH		320
 
 enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 };
 
+enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4 };
+
 struct ts_priv {
 	XISBuffer *buffer;
 	struct tsdev *ts;
-	int lastx,lasty,lastp;
+	int lastx,lasty;
 	int screen_num;
 	int rotate;
 	int height;
 	int width;
+	enum button_state state;
+	struct timeval button_down_start;
+	int button_down_x,button_down_y;
 };
 
 static const char *DEFAULTS[] = {
@@ -118,12 +127,25 @@
 	return TRUE;
 }
 
+struct timeval TimevalDiff(struct timeval a, struct timeval b)
+{
+	struct timeval t;
+	t.tv_sec = a.tv_sec-b.tv_sec;
+	t.tv_usec = a.tv_usec - b.tv_usec;
+	if (t.tv_usec  0) {
+		t.tv_sec--;
+		t.tv_usec += 100;
+	}
+	return t;
+}
+
 static void ReadInput (LocalDevicePtr local)
 {
 	struct ts_priv *priv = (struct ts_priv *) (local-private);
 	struct ts_sample samp;
 	int ret;
 	int x,y;
+	struct timeval now;
 
 	ret = ts_read(priv-ts, samp, 1);
 
@@ -134,6 +156,9 @@
 
 //	ErrorF(%ld.%06ld: %6d %6d %6d\n, samp.tv.tv_sec, samp.tv.tv_usec, samp.x, samp.y, samp.pressure);
 
+	gettimeofday(now, NULL);
+	struct timeval pressureTime = TimevalDiff(now,priv-button_down_start);
+
 	if(samp.pressure) {
 		int tmp_x = samp.x;
 		
@@ -161,18 +186,78 @@
 
 		xf86PostMotionEvent (local-dev, TRUE, 0, 2,
 x, y);
+	} 
 
+	/* button pressed state machine
+ 	 * if pressed than press button 1, start timer and remember the tab position
+	 * if pressed longer than TIME23RDBUTTON and it is not moved more than MOVEMENT23RDBUTTON release button 1 and click button 3
+	 * if still pressed do nothing until the pressure is released
+	 */
+	//ErrorF(%d\t,priv-state);
+	switch (priv-state) {
+		case BUTTON_NOT_PRESSED :
+			if (samp.pressure) {
+priv-button_down_start = now;
+priv-button_down_y = samp.y;
+priv-button_down_x = samp.x;
+priv-state = BUTTON_1_PRESSED;
+//ErrorF(b1 down);
+xf86PostButtonEvent(local-dev, TRUE,
+	priv-state, TRUE, 0, 2,
+	priv-lastx,
+	priv-lasty);
+			}
+			break;
+		case BUTTON_1_PRESSED :
+			if (samp.pressure) {	
+//ErrorF(%d %d ,pressureTime.tv_sec,pressureTime.tv_usec);
+if double)pressureTime.tv_sec)+(((double)pressureTime.tv_usec)*1e-6)  TIME23RDBUTTON) 
+   (abs(priv-lastx-priv-button_down_x)  MOVEMENT23RDBUTTON 
+abs(priv-lasty-priv-button_down_y)  MOVEMENT23RDBUTTON))
+{
+	//ErrorF(b1 up);
+	xf86PostButtonEvent(local-dev, TRUE,
+		priv-state, FALSE, 0, 2,
+		priv-lastx,
+		priv-lasty);
+	priv-state = BUTTON_3_CLICK;
+	//ErrorF(b3 down);
+	xf86PostButtonEvent(local-dev, TRUE,
+		priv-state, TRUE, 0, 2,
+		priv-lastx,
+		priv-lasty);
+} 
+if (abs(priv-lastx-priv-button_down_x)  MOVEMENT23RDBUTTON ||
+abs(priv-lasty-priv-button_down_y)  MOVEMENT23RDBUTTON) {
+	priv-button_down_start = now;
+	priv-button_down_y = samp.y;
+	priv-button_down_x = samp.x;
+	//ErrorF(b1 state reset);
+}
+			} else {
+//ErrorF(b1 up);
+xf86PostButtonEvent(local-dev, TRUE,
+	priv-state, FALSE, 0, 2,
+	priv-lastx,
+	priv-lasty);
+priv-state = BUTTON_NOT_PRESSED;
+			}
+			break;
+		case BUTTON_3_CLICK :
+			//ErrorF(b3 up);
+			xf86PostButtonEvent(local-dev, TRUE,
+priv-state, FALSE, 0, 2,
+priv-lastx,
+priv-lasty);
+			priv-state = BUTTON_3_CLICKED;
+			break;
+		case BUTTON_3_CLICKED :
+			if (!samp.pressure) {
+//ErrorF(b3 free);
+priv-state = BUTTON_NOT_PRESSED;
+			}
+			break;
 	}
-
-	if(priv-lastp

Re: Debian help - XFCE

2008-08-17 Thread Sebastian Ohl
Hi,

On Sun, 2008-08-17 at 16:39 +0200, Michele Renda wrote:
 I hope the patch for the left click arrive fast to Debian!
until then you can install is yourself (its the tab+hold version)
http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.4-5
+fso2_armel.deb

 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Debian - alsa sound ?

2008-08-17 Thread Sebastian Ohl
Hi,

i tried to turn my gta02 into a musicplayer on the debian distro. does
anyone managed to get any sound out of it ? i see that the alsa modules
are loaded and the alsamixer says every volume value is at its maximum.
so what am i doing wrong by calling mpg321 file.mp3 . the player says
it is playing but there is no sound not from the speaker nor from a
headset i pluged in.

any suggestions what i'm doing wrong?

Sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Debian help - XFCE

2008-08-17 Thread Sebastian Ohl
Hi,

On Sun, 2008-08-17 at 18:15 +0200, arne anka wrote:
 thanks for the fast work -- but it seems to damage calibration.
 in the upper left corner stylus and pointer are at the same position, but  
 the more i go towards lower right, the greater the gap betwen the pointer  
 position and the position i tap.
 when in the lower right corner, the pointer is at maybe 2/3.
i had the same problems. simply download
http://pkg-fso.alioth.debian.org/freerunner/pointercal and cat it again
in /etc/pointercal. i don't know why there is a version for fso and
non-fso ... i thought that the calibration data should be independent of
the framework.

Sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Debian help - XFCE

2008-08-17 Thread Sebastian Ohl
Hi,

On Sun, 2008-08-17 at 18:04 +0200, Michele Renda wrote:
 The easist way is this: open a terminal and write:
apt-get install gdm should also do the trick. if you have only one user
on your phone you can enable autologin in gdm and so i boots directly
into xfce (or your favorite window manager)

Sebastian


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Right mouse button tslib patch

2008-08-16 Thread Sebastian Ohl
Hi everyone,

after having installed the debian distro. i noticed that there is no
right mouse button. so many standard applications aren't usable
because they depend on it(i tried to add an applet to my xfce panel..).
so i created a patch to the xorg tslib input driver. once installed you
can press the aux button on your openmoko and than tap on the screen and
i will be recognized as right button click. i attached the patch but i
hope that it will be included in the standard package so everyone have
not to compile is by them self.

 Sebastian Ohl
--- xf86-input-tslib-0.0.4.orig/debian/patches/02_leftbutton-emulation.diff
+++ xf86-input-tslib-0.0.4/debian/patches/02_leftbutton-emulation.diff
@@ -0,0 +1,105 @@
+--- xf86-input-tslib-0.0.4/src/tslib.c	2007-10-19 10:59:29.0 +
 xf86-input-tslib-0.0.4.2bnt/src/tslib.c	2008-08-16 13:38:06.0 +
+@@ -55,9 +55,12 @@
+ #include xf86Module.h
+ #endif
+ 
++/* openmoko second mouse button emulation */
++#include dbus/dbus.h
++
+ #define TSLIB_DEV_DEFAULT /dev/event0
+ 
+-#define MAXBUTTONS 1
++#define MAXBUTTONS 2
+ 
+ #define DEFAULT_HEIGHT		240
+ #define DEFAULT_WIDTH		320
+@@ -72,6 +75,8 @@
+ 	int rotate;
+ 	int height;
+ 	int width;
++DBusConnection *dbus;
++	unsigned char secondbutton;
+ };
+ 
+ static const char *DEFAULTS[] = {
+@@ -168,7 +173,7 @@
+ 		priv-lastp = samp.pressure;
+ 
+ 		xf86PostButtonEvent(local-dev, TRUE,
+-			1, !!samp.pressure, 0, 2,
++			(priv-secondbutton?3:1), !!samp.pressure, 0, 2,
+ 			priv-lastx,
+ 			priv-lasty);
+ 	}
+@@ -274,6 +279,44 @@
+ }
+ 
+ /*
++ * button_switch_filter --
++ *
++ * called when a dbus event occured. used for detection of aux button preasure 
++ */
++static DBusHandlerResult
++button_switch_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
++{
++	struct ts_priv *priv = (struct ts_priv *) (user_data);
++	/* A signal from the bus saying we are about to be disconnected */
++	if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, Disconnected)) {
++		/* set to first button because getting stuck in the second is not so cool */
++		priv-secondbutton = 0;
++		/* We have handled this message, don't pass it on */
++		return DBUS_HANDLER_RESULT_HANDLED;
++	} 
++	/* A signal from the bus saying an input event occured */
++	else if (dbus_message_is_signal(message, org.freesmartphone.Device.Input, Event)) {
++		DBusError error;
++		const char *key;
++		const char *state;
++		dbus_error_init (error);
++		if (dbus_message_get_args(message, error, DBUS_TYPE_STRING, key, DBUS_TYPE_STRING, state, DBUS_TYPE_INVALID)) {
++			/* ErrorF(Input event received: %s=%s\n, key, state); */
++			if (strncmp(key,AUX,3) == 0) {
++// this is threadsafe because it is only a small basic type is set
++priv-secondbutton = (strncmp(state,pressed,7)==0) ||
++			(strncmp(state,held,4)==0);
++			}
++		} else {
++			ErrorF(Input event received, but error getting message: %s\n, error.message);
++			dbus_error_free (error);
++		}
++		return DBUS_HANDLER_RESULT_HANDLED;
++	}
++	return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++}
++
++/*
+  * xf86TslibInit --
+  *
+  * called when the module subsection is found in XF86Config
+@@ -284,6 +327,7 @@
+ 	struct ts_priv *priv;
+ 	char *s;
+ 	InputInfoPtr pInfo;
++	DBusError dberror;
+ 
+ 	priv = xcalloc (1, sizeof (struct ts_priv));
+ if (!priv)
+@@ -361,6 +405,17 @@
+ 
+ 	pInfo-fd = ts_fd(priv-ts);
+ 
++	dbus_error_init (dberror);
++	priv-dbus = dbus_bus_get (DBUS_BUS_SYSTEM, dberror);
++	if (!priv-dbus) {
++		ErrorF(Failed to connect to the D-BUS daemon: %s, dberror.message);
++		dbus_error_free (dberror);
++		return NULL; 
++	}
++	dbus_bus_add_match (priv-dbus, interface='org.freesmartphone.Device.Input', dberror);
++	dbus_connection_add_filter (priv-dbus, button_switch_filter, priv, NULL);
++	priv-secondbutton = 0;
++		
+ 	/* Mark the device configured */
+ 	pInfo-flags |= XI86_CONFIGURED;
+ 
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Right mouse button tslib patch

2008-08-16 Thread Sebastian Ohl
Hi again,

i forgot the patches to the configure script. as the input driver now
needs a dbus connection the libs have to be added to the configure
script.

sebastian

On Sat, 2008-08-16 at 16:54 +0200, Sebastian Ohl wrote:
 Hi everyone,
 
 after having installed the debian distro. i noticed that there is no
 right mouse button. so many standard applications aren't usable
 because they depend on it(i tried to add an applet to my xfce panel..).
 so i created a patch to the xorg tslib input driver. once installed you
 can press the aux button on your openmoko and than tap on the screen and
 i will be recognized as right button click. i attached the patch but i
 hope that it will be included in the standard package so everyone have
 not to compile is by them self.
 
  Sebastian Ohl
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

--- xf86-input-tslib-0.0.4.orig/configure.ac
+++ xf86-input-tslib-0.0.4/configure.ac
@@ -71,7 +71,7 @@
 XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, xorg-server xproto dbus-1 $REQUIRED_MODULES)
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 CFLAGS=$CFLAGS $XORG_CFLAGS ' -I$(top_srcdir)/src'
--- xf86-input-tslib-0.0.4.orig/configure
+++ xf86-input-tslib-0.0.4/configure
@@ -20245,12 +20245,12 @@
 pkg_cv_XORG_CFLAGS=$XORG_CFLAGS
 else
 if test -n $PKG_CONFIG  \
-{ (echo $as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \xorg-server xproto \$REQUIRED_MODULES\) 5
-  ($PKG_CONFIG --exists --print-errors xorg-server xproto $REQUIRED_MODULES) 25
+{ (echo $as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \xorg-server xproto dbus-1 \$REQUIRED_MODULES\) 5
+  ($PKG_CONFIG --exists --print-errors xorg-server xproto dbus-1 $REQUIRED_MODULES) 25
   ac_status=$?
   echo $as_me:$LINENO: \$? = $ac_status 5
   (exit $ac_status); }; then
-  pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags xorg-server xproto $REQUIRED_MODULES 2/dev/null`
+  pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags xorg-server xproto dbus-1 $REQUIRED_MODULES 2/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20263,12 +20263,12 @@
 pkg_cv_XORG_LIBS=$XORG_LIBS
 else
 if test -n $PKG_CONFIG  \
-{ (echo $as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \xorg-server xproto \$REQUIRED_MODULES\) 5
-  ($PKG_CONFIG --exists --print-errors xorg-server xproto $REQUIRED_MODULES) 25
+{ (echo $as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \xorg-server xproto dbus-1 \$REQUIRED_MODULES\) 5
+  ($PKG_CONFIG --exists --print-errors xorg-server xproto dbus-1 $REQUIRED_MODULES) 25
   ac_status=$?
   echo $as_me:$LINENO: \$? = $ac_status 5
   (exit $ac_status); }; then
-  pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs xorg-server xproto $REQUIRED_MODULES 2/dev/null`
+  pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs xorg-server xproto dbus-1 $REQUIRED_MODULES 2/dev/null`
 else
   pkg_failed=yes
 fi
@@ -20287,14 +20287,14 @@
 _pkg_short_errors_supported=no
 fi
 if test $_pkg_short_errors_supported = yes; then
-	XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors xorg-server xproto $REQUIRED_MODULES`
+	XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors xorg-server xproto dbus-1 $REQUIRED_MODULES`
 else
-	XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors xorg-server xproto $REQUIRED_MODULES`
+	XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors xorg-server xproto dbus-1 $REQUIRED_MODULES`
 fi
 	# Put the nasty error message in config.log where it belongs
 	echo $XORG_PKG_ERRORS 5
 
-	{ { echo $as_me:$LINENO: error: Package requirements (xorg-server xproto $REQUIRED_MODULES) were not met:
+	{ { echo $as_me:$LINENO: error: Package requirements (xorg-server xproto dbus-1 $REQUIRED_MODULES) were not met:
 
 $XORG_PKG_ERRORS
 
@@ -20305,7 +20305,7 @@
 and XORG_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
  5
-echo $as_me: error: Package requirements (xorg-server xproto $REQUIRED_MODULES) were not met:
+echo $as_me: error: Package requirements (xorg-server xproto dbus-1 $REQUIRED_MODULES) were not met:
 
 $XORG_PKG_ERRORS
 
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Right mouse button tslib patch

2008-08-16 Thread Sebastian Ohl
Hi,

On Sat, 2008-08-16 at 23:36 +0200, Holger Freyther wrote:
 Never, ever, put that into tslib. That belongs into X or even the clients. 
 One 
 wants to indicate that the press was taken into account and provide visual 
 feedback... And to provide that within tslib it would need to open a X 
 display connection...and things would get even more messy.
thats right. my fault. i chose the subject of this thread a little bit
wrong. the patch is againts the xorg tslib input module not against
tslib it self. tslib is for reading and transforming the touchscreen raw
data only. actually there isn't even a datastruction for mouse buttons
in tslib...

 Sebastian Ohl



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: order from pulster

2008-07-22 Thread Sebastian Ohl
Hi,
On Mon, 2008-07-21 at 12:16 +0200, Daniel Selinger wrote:
 Can any of you, who ordered about the same time, confirm this lack of
 info, or is it just me?
I have had the same problems. but i finally got my freerunner until i
called the store at it hotline. two days later i got my phone.

-- 
Yours
 Sebastian Ohl




___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community