nanogui: de-bouncing the keypad input


Previous by date: 15 May 2007 18:52:25 +0100 Re: Are Nano-X thread-safe?, Greg Haerr
Next by date: 15 May 2007 18:52:25 +0100 mouse error for sh4 target file system, Hou Xiang ZHU
Previous in thread:
Next in thread:

Subject: de-bouncing the keypad input
From: Kayla Bonham ####@####.####
Date: 15 May 2007 18:52:25 +0100
Message-Id: <1179250727.5379.43.camel@localhost>

I am writing GUI software for a control panel for an
embedded Linux device using Nano-X and FLTK on a 1/4 VGA
LCD touchpad device (no keyboard, no mouse, all we have
is the touchscreen).  A colleague has done the port of
the device drivers, and nano-X is compiled with NECMOUSE,
touchscreen_nec.h included by mou_touchscreen etc.

The GUI mainly uses vanilla, single-action "Fl_Button"
widgets in a simulated keypad layout, although there are
a couple of sliders that use continuous tracking of the
user's finger.  There is no visible mouse cursor needed,
and windows do not overlap (windows occupy entire screen).

I find that the recommended mouse driver command option
-R ("repeat mode") results in multiple button events being
generated for each finger press on a simulated button. (Duh!)

Why is -R so strongly recommended?  The comment in
gpm_mou.c says "Remember to start GPM with the -R flag
or it won't work. (gpm -R -t ps2)" ?

Something seems to be set wrong somewhere, because my virtual
buttons typically require two pokes of the finger (touch and
lift, then touch and lift again) to activate:  the first touch
and lift acts as a button down (which you can see in the visual
feedback provided by Fl_Button), and then the second touch and
lift provides the button up event, invoking the action associated
with the virtual button.  I would like one finger press and lift
action to invoke the button action.

Or, if you press and hold your finger down, it generates multiple
button clicks, which is not what I need either.  I made sure that
the widget type is the single-action Fl_Button, not Fl_Repeat_Button.

I was wondering if anyone on the list has done this style of
interface (single-click buttons on an LCD touchpad), and had
any recommendations at what level to "debounce" the mouse
events so that one poke of the finger yields one button event?
Thank you in advance!

Apart from that, nano-X and FLTK have been a pleasure to work
with, and the interface looks great so far (if I say so myself!)

-- Kayla



Previous by date: 15 May 2007 18:52:25 +0100 Re: Are Nano-X thread-safe?, Greg Haerr
Next by date: 15 May 2007 18:52:25 +0100 mouse error for sh4 target file system, Hou Xiang ZHU
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.