summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Joseph Hwang [Wed, 5 Sep 2012 08:11:31 +0000 (16:11 +0800)]
Set the application name
This CL sets the application name so that it is easier to look up
mtplot in the window manager.
BUG=chromium:216295
TEST=Follow steps below:
$ mtplot -d :0
$ DISPLAY=:0 xwininfo -root -tree
It would show something like
0x600001 "mtplot": () 1280x800+0+0 +0+0
rather than
0x600001 (has no name): () 1280x800+0+0 +0+0
Change-Id: Ifd8de8b72e566d31eb98c4e8f4c96c83084b7d68
Reviewed-on: https://gerrit.chromium.org/gerrit/32219
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
Joseph Hwang [Wed, 5 Sep 2012 03:49:20 +0000 (11:49 +0800)]
Take a screenshot with a keystroke
Take a screenshot with the key 's'. The screenshot image is saved
in the specified directory if '-o' option is used. The intermediate
directories will be created automatically. If no directory is
specified, the default directory '/tmp' is used to save the
screenshot image file.
BUG=chromium:211799
TEST=Start mtplot on a chromebook. Perform the following two tests:
Test 1: Press 's' and check the file "/tmp/mtplot_xxxx.png",
where xxxx is the system current time.
$ mtplot -d :0
Test 2: Press 's' and check the file "/tmp/a/b/c/mtplot_xxxx.png".
$ mtplot -d :0 -o /tmp/a/b/c
CQ-DEPEND=I08d5a88726ec38589538aec0e4e90bfd7a293238
Change-Id: I973fa58aed85fd87ca0df6ea5217ef9bce91559d
Reviewed-on: https://gerrit.chromium.org/gerrit/32206
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Queue: Joseph Shyh-In Hwang <josephsih@chromium.org>
Charlie Mooney [Tue, 26 Mar 2013 15:43:25 +0000 (08:43 -0700)]
Adding an option to quit mtplot from gui
You used to only be able to quit mtplot from the terminal you started it
from or by sending it a signal with "kill." Usually this is fine but if
you happen to start it from in a shell on the device (like you got to
your shell through crosh) then it's a pain to have to ssh in, or go to
VT2 and find the pid, etc.
This patch just checks to see if you've pressed "q" while it's checking
other keystrokes and returns out of the main loop if you have. So now
you can hit 'q' to quit if the graphical window is in focus.
BUG=chromium:222056
TEST=manual, gmerged and ran on a Chromebook
Change-Id: Iebf5bfe93f34949900595ef572c778ff027a81d9
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46518
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Andrew de los Reyes [Fri, 16 Nov 2012 19:20:02 +0000 (11:20 -0800)]
Option to preserve aspect ratio.
Some devices, like the Logitech T400 Zone Touch Mouse, have touch
surfaces with very different aspect ratios than the screen, which can
make visualizing the events more difficult.
With this patch, the aspect ratio is preserved, and events are drawn
on the center of the screen.
BUG=chromium-os:36445
TEST=Tested that toggling worked correctly with both the Logitech T620
and T400 touch mice.
Change-Id: Ia1f7cf4000de139c9227e0aaa508104eace5d988
Reviewed-on: https://gerrit.chromium.org/gerrit/38211
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Joseph Hwang [Mon, 20 Aug 2012 08:25:06 +0000 (16:25 +0800)]
Add a geometry command line option
When mtplot was launched, it always occupied the whole screen. This
patch provides a geometry command line option to modify the window
size and the window offset.
BUG=chromium-os:33669
TEST=Type the following command on a chrome machine, and see its
window size is smaller than the screen size.
$ mtplot -d :0 -g 600x400+100+60
Change-Id: I4c3bfc23ad561199c19bb68c4a65328eb3b3db48
Reviewed-on: https://gerrit.chromium.org/gerrit/30846
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Andrew de los Reyes [Wed, 25 Jul 2012 22:50:14 +0000 (15:50 -0700)]
mtplot: clickclear option to toggle clearing on click
Sometimes you don't want the screen to clear on click. With this
change, you can tap 'c' or use a command line arg.
BUG=chromium-os:32964
TEST=tested on device w/ both toggle key and short/long command line
args
Change-Id: I75564c2277282408c807e4beafde036515715f19
Reviewed-on: https://gerrit.chromium.org/gerrit/28435
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Chung-yih Wang [Mon, 23 Jul 2012 09:11:42 +0000 (17:11 +0800)]
Rename semi_mt_device with single_pressure_device
As we have new kernel driver for Cr-48 touchpads, there is no need for
semi-mt specific handling. Instead, we still keep the handling of
ABS_PRESSURE for other single-pressure devices.
BUG=chromium-os:32681
TEST=on device; test if mtplot works on Cr-48
Change-Id: Id8892bbd009824542480c6fcf9708c903b1ce3c0
Reviewed-on: https://gerrit.chromium.org/gerrit/28163
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
Yufeng Shen [Wed, 20 Jun 2012 23:10:05 +0000 (19:10 -0400)]
Add support for Apple Magic Trackpad
Apple Magic Trackpad can track individual touch contact but
its driver follows MT-A protocol instead of MT-B protocol.
Specifically, the driver reports event ABS_MT_TRACKING_ID as
the indication of state machine change, instead of reporting
ABS_MT_SLOT event.
This CL makes mtplot work with Apple Magic Trackpad by:
1. Current slot is updated with new ABS_MT_TRACKING_ID.
2. 0 touch major value means current slot (touch contact) is
removed.
3. Use a touch_major value for drawing since the touchpad
does not report pressure value.
BUG=chromium-os:29435
TEST=Connect Stumpy with Apple Magic Trackpad and check that
mtplot works.
Change-Id: Iea827ff36590b7edf9602ca6a3db60c00f0efc66
Daniel Kurtz [Mon, 9 Apr 2012 08:36:17 +0000 (16:36 +0800)]
Fix PKG_CHECK_MODULES name
BUG=none
TEST=builds clean with message:
checking for X11... yes
Change-Id: I7d174680be0283df6d3c40449871342e2a6e0dfe
Daniel Kurtz [Mon, 9 Apr 2012 08:18:51 +0000 (16:18 +0800)]
Add default true persist option to display positions with persistence
Setting --persist=0 will cause only the current detected contact positions
to be plotted. This behavior can be toggled at run time by pressing the
'p' key.
BUG=chromium-os:29063
TEST=mtplot --persist=1 # shows persistent dots
TEST=mtplot --persist=0 # does not show persistent dots
Change-Id: I1d70dd89e8880423a26fae4534c01ec7a0658d1e
Daniel Kurtz [Mon, 9 Apr 2012 08:18:17 +0000 (16:18 +0800)]
Refactor --monotonic option and make it on by default
Also:
* use the shorter "monontonic" variable name
* make options global
* remove unused option_index
* add help text
BUG=none
TEST=mtplot --monotonic # Enables monotonic timestamps
TEST=mtplot --monotonic=1 # Enables monotonic timestamps
TEST=mtplot --monotonic=0 # Disables monotonic timestamps
TEST=mtplot -m=0 # Disables monotonic timestamps
TEST=mtplot -m 1 # Enables monotonic timestamps
# Note: "mtplot --monotonic 1" doesn't work
Change-Id: I3ab40c615cf5c763bf1971889d9e461e9a1df657
Daniel Kurtz [Fri, 6 Apr 2012 09:08:24 +0000 (17:08 +0800)]
Pressing ESC key clears screen
BUG=chromium-os:29062
TEST=Draw on screen using touch device. Press ESC key. Screen is erased.
Change-Id: I0c43f6020feaefb27cd27ed57411d98ab7405983
Daniel Kurtz [Mon, 9 Apr 2012 08:17:39 +0000 (16:17 +0800)]
Refactor: Move Usage closer to options and main()
Also notify user of unknown option characters.
BUG=none
TEST=mtplot -q should show error message and Usage information.
Change-Id: I2a12accf886c8ecad23624e4357f8c9937c95e3c
Daniel Kurtz [Thu, 16 Feb 2012 17:29:59 +0000 (01:29 +0800)]
Add --monotonic option
Setting this option configures the kernel to timestamp input events using
CLOCK_MONOTONIC instead of CLOCK_REALTIME.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:26493
TEST=mtplot => input events use wall clock timestamps
mtplot --monotonic => input events use monotonic timestamps, iff
supported by the kernel.
mtplot --monotonic => if kernel dosen't support monotonic timestamps,
a warning message is printed, and realtime timestamps are used.
Change-Id: I7a4e02989b733b8f569672cb4d0589b972777b14
Chung-yih Wang [Fri, 16 Dec 2011 08:09:01 +0000 (16:09 +0800)]
Add semi-mt support.
Kernel drivers for 'semi-mt' devices, such as the Synaptics profile
sensor, do not provide a pressure value with their semi-mt slots.
Instead, they report a single pressure value via ABS_PRESSURE. So, if
the device's INPUT_PROP_SEMI_MT bit is set we use the ABS_PRESSURE value
to set the height/width of all plotted circles.
BUG=chromium-os:24277
TEST=mtplot
And see if the touch events could be drawn on Cr-48.
Change-Id: I4c3d564fc7fd902b7cdae0ac5850730f07ffde86
Daniel Kurtz [Wed, 23 Nov 2011 11:20:59 +0000 (19:20 +0800)]
Use device advertised ABS_MT_SLOT range to initialize mt_slot array
Using a fixed constant number of slots was not smart. Some devices
may use more than 10 which could cause mtplot to SEGV crash.
For instance, the latest cyapa driver can use up to 16 slots, one for
each slot reported by its firmware.
As a side affect, we separate the number of colors from the number of
slots. Colors are chosen based on the tracking ID anyway, not the slot
ID.
BUG=chromium-os:23389
TEST=Use mtplot on tegra2_kaen with latest cyapa driver
Drumroll many times.
See no crashes.
Change-Id: I9af291a2ffed2c3fce2d53d4db2def53adf0f9f4
Daniel Kurtz [Thu, 6 Oct 2011 09:45:09 +0000 (17:45 +0800)]
Disable cros license check
mtplot is GPLv2 licensed, but we still want all the other submit checks.
BUG=none
TEST=repo upload mtplot
=> No errors about incorrect license.
Change-Id: I5f50dce643f9ca4278aeaf4494cbb1ec4539cb8a
Daniel Kurtz [Thu, 6 Oct 2011 02:58:10 +0000 (10:58 +0800)]
Force mtplot window to full screen
Ideally, this could be overridden with a command line flag specifying a
custom window size, but I'll save that for a future commit.
BUG=chromium-os:21288
TEST=launch mtplot on chromium-os machine with no window-manager
-> it should launch the mtplot window fullscreen
Change-Id: I6285f68c9ecb58a15c28a856fdafa4422bade031
Daniel Kurtz [Fri, 2 Sep 2011 06:17:27 +0000 (14:17 +0800)]
Fix typo in Grabbed device warning message
BUG=none
TEST=Read message displayed when trying to run mtplot using a device that
has been grabbed by an X input driver.
Change-Id: I5a4abcffd35621ec87b516974a00a50129bffa46
Daniel Kurtz [Thu, 1 Sep 2011 09:11:29 +0000 (17:11 +0800)]
Process resize events
Use select to listen for both input events and X events.
Resize events are sent as ConfigureNotify events, which includes the
new size. This new size is stored in w_width & w_height, which are
already being used to scale the touch dots appropriately.
BUG=chromium-os:19918
TEST=Build install on a Chromebook. No change in behavior.
Build and install on Ubuntu. Resizing window should resize touch dots.
Change-Id: I1c3e6cc510e7104f404c6f4ec6d8fa8e44317af9
Daniel Kurtz [Thu, 1 Sep 2011 06:23:19 +0000 (14:23 +0800)]
Remove unneeded dependencies
In particular, remove false dependency on /X11/extensions/Xrandr.h
BUG=chromium-os:19879
TEST=Builds cleanly in a fresh chroot for a given board:
(0) ./setup_board --board=${B} --force
(1) emerge-${B} mtplot
Change-Id: Ie34ade16a870c8fd6da066b801ea1926480ea6e8
Daniel Kurtz [Thu, 25 Aug 2011 09:41:00 +0000 (17:41 +0800)]
Add Makefile.am, configure.ac and autogen.sh
Add files to build mtplot using autotools
BUG=chromium-os:19380
TEST=./autogen.sh
./configure
make all
make install
Change-Id: I27a3dfa6f5d2cd39894f3f4fb37d3db9c4489744
Daniel Kurtz [Thu, 25 Aug 2011 09:39:09 +0000 (17:39 +0800)]
Add mtplot.c source code - Initial version
mtplot is a little debug utility that helps visualize raw input events
emitted by linux multi-touch type B input device drivers.
BUG=chromium-os:19380
TEST=compile, test using touchpad with multitouch type B kernel driver
Change-Id: Ic4e2e221a71ce90b0df600656dd0707e5977e827
Daniel Kurtz [Mon, 22 Aug 2011 07:34:04 +0000 (15:34 +0800)]
Add COPYING
Since parts of mtplot are derived from evtest the derived work is also
licensed under GPLv2.
BUG=chromium-os:19380
TEST=none
Change-Id: Ibad96c20590bdf9632f3460b77a42b856f6b628f
Daniel Kurtz [Fri, 19 Aug 2011 07:31:14 +0000 (15:31 +0800)]
Initial commit, add .gitignore