summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-12-26 17:45:54 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-12-26 17:45:54 +0000
commit84b97dd1ea4b674455092a7e2f0ba3fc10f9de70 (patch)
treeee87694b09d48986ca763c73d765c63346f3b457 /firmware
parent4fe6963e4044fd25e5c6b14dea31b0e0b60910c6 (diff)
downloadrockbox-84b97dd1ea4b674455092a7e2f0ba3fc10f9de70.tar.gz
rockbox-84b97dd1ea4b674455092a7e2f0ba3fc10f9de70.zip
fuze+: remove two_finger pseudo touchpad button because it was unrealiable, update keymap to remove akward mappings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31444 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c44
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/button-target.h5
2 files changed, 6 insertions, 43 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
index 0250d276d9..a723ce89ba 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
@@ -200,8 +200,6 @@ static struct button_area_t button_areas[] =
#define RMI_INTERRUPT 1
static int touchpad_btns = 0;
-static bool two_fingers_mode = 0;
-static int button_delay = 0;
static long rmi_stack [DEFAULT_STACK_SIZE/sizeof(long)];
static const char rmi_thread_name[] = "rmi";
static struct event_queue rmi_queue;
@@ -265,45 +263,11 @@ static void rmi_thread(void)
int absolute_y = u.s.absolute.y_msb << 8 | u.s.absolute.y_lsb;
int nr_fingers = u.s.absolute.misc & 7;
- /* Handle the single vs two fingers event considering the following issues:
- - When they are two fingers on the touchpad the signal often
- switch between 1 and 2 fingers. We use the bool
- two_fingers_mode to "lock" the two fingers's signal
- as long as the user doesn't release the touchpad
- - User can hit the device at first with only one finger while
- trying to do a double fingers's touch. In order to "smooth"
- the signal, we set a delay on single finger so that user as
- time to actually touch with 2 finger if he meant to.
- */
- switch(nr_fingers)
- {
- case 2:
- /* enter two fingers mode */
- two_fingers_mode = 1;
- touchpad_btns = BUTTON_TWO_FINGERS;
- break;
- case 1:
- /* Ignore any touch when in two fingers mode */
- if (two_fingers_mode)
- touchpad_btns = BUTTON_TWO_FINGERS;
- else
- {
- if(button_delay > 2)
- touchpad_btns = find_button(absolute_x, absolute_y);
- else
- button_delay++;
- }
- break;
- case 0:
- /* reset two fingers mode and delay */
- two_fingers_mode = 0;
- button_delay = 0;
- touchpad_btns = 0;
- break;
- default:
- break;
- }
+ if(nr_fingers == 1)
+ touchpad_btns = find_button(absolute_x, absolute_y);
+ else
+ touchpad_btns = 0;
/* enable interrupt */
imx233_setup_pin_irq(0, 27, true, true, false, &rmi_attn_cb);
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
index 2e5e6c157c..1536dbe1ab 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h
@@ -42,13 +42,12 @@ bool button_debug_screen(void);
#define BUTTON_BACK 0x00000200
#define BUTTON_BOTTOMLEFT 0x00000400
#define BUTTON_BOTTOMRIGHT 0x00000800
-/* Touch the touchpad with two fingers */
-#define BUTTON_TWO_FINGERS 0x000001000
+
#define BUTTON_MAIN (BUTTON_VOL_UP|BUTTON_VOL_DOWN|BUTTON_POWER|BUTTON_LEFT| \
BUTTON_UP|BUTTON_RIGHT|BUTTON_DOWN|BUTTON_SELECT| \
BUTTON_PLAYPAUSE|BUTTON_BACK| \
- BUTTON_TWO_FINGERS|BUTTON_BOTTOMRIGHT|BUTTON_BOTTOMLEFT)
+ BUTTON_BOTTOMRIGHT|BUTTON_BOTTOMLEFT)
#define BUTTON_REMOTE 0