Android OS Forum banner
1 - 20 of 250 Posts

·
TeamWin
Joined
·
131 Posts
I'm going to start a thread for further testing of the touchscreen developments that I and others on the CM team have been working on. I feel like we've reached the point where the more obvious stuff has been fixed and anything else that's new will require wider testing before pushing it into the CM repo. Differences in touchscreens, finger sizes, and usage patterns will need to be tested to ensure that any further updates work well in a wide variety of situations.

My source code is available here:
Dees_Troy's GitHub
You can also track the progress of the patches in CM here:
All of these patches have been accepted! All nightlies on/after 2012-02-29 will include these patches:
Patch for hover debounce
Patch to move digitizer power management out of liblights and into the touchscreen driver
Patch for tracking IDs in Gerrit
Power saving patch in Gerrit
Patch for binary to change touchscreen mode in Gerrit
Some thoughts on the touchscreen and development in this link.

Note, you can only install one driver at a time. They're listed newest to oldest. Newer versions will have all of the features found in previous versions unless otherwise noted in the feature list. There's no need to install an older version before installing a newer version. All versions are for CM9 Android 4.0 / ICS unless otherwise noted. All zips should be signed. Install via recovery / CWM just like any other zip. No wiping should be needed.

Download links and changelog:
NOTE: nightlies on/after 2012-02-29 will include all of the improvements found in v15!
Tracking IDs v15 for CM9 2012-02-28:
Bugfixes for hover debounce. The v14 version works fine, but the code wasn't working the way that I intended. This version provides the correct behavior.

Tracking IDs v14 for CM9 2012-02-27:
Changed hover debounce - it now doesn't start the hover debounce unless you hover for 30 cycles (about 0.3 seconds) which should smooth out slow scrolling a little bit. I also moved the power management of the digitizer into ts_srv and out of liblights. Liblights should just be for the screen / notification lights. The CM team originally located the digitizer power management in there in lieu of setting up communications between liblights and ts_srv. We're now able to use the same socket communications to determine when to turn the digitizer on/off as well as open & close the uart.

Tracking IDs v13 for CM9 2012-02-25:
Added a filter to debounce a "hover" after scrolling. If you scroll a little ways then hold your finger still, it will debounce to 2 pixels. This may make scrolling really slowly a little bit jumpy, but it will keep the screen from wiggling around if you hold your finger still after scrolling. This version also includes a newer version of ts_srv_set that can return the touchscreen mode that is currently in use. This will be needed for the new custom settings for the TouchPad that include the ability to change touchscreen modes.

Tracking IDs v12 for CM9 2012-02-16:
No changes to the way touch behaves. Updated the path for the socket to use what I believe it he proper location for a Unix socket. This also marks the unification of the finger and stylus versions of the driver and you can now choose which mode of operation you want on the fly. There is an additional binary included in this zip called ts_srv_set. Run it via adb or terminal emulator like so:
ts_srv_set S
The above command would set the touchscreen thresholds for stylus operation. Doing this:
ts_srv_set F
will set it back to finger mode. The setting will stick between reboots (yes, we're using a settings file of sorts -- a very basic one) but the setting will be wiped in a factory reset. The default setting is finger mode, so if you are a finger user, there is nothing that you need to do. This version also includes the power savings features from v11, of course. Settings for finger then stylus mode are unchanged, but as follows:
TOUCH_INITIAL_THRESHOLD 32 32
TOUCH_CONTINUE_THRESHOLD 26 16
TOUCH_DELAY_THRESHOLD 28 24
TOUCH_DELAY 5 2
If someone with some app development skills (someone who knows Java) wants to write an app or modify CM to change the setting in a GUI, I'll be happy to provide information on how to do so. Otherwise, you can set up something like GScript to make it easier to switch between modes.

Tracking IDs v11 for CM9 2012-02-15:
No changes to the way that touch itself behaves. I have added code to both liblights and the touchscreen driver so that liblights can tell the touchscreen driver when the screen turns off. The touchscreen driver will now close the uart connection that it uses to receive touchscreen data to save a little bit of battery power.

Tracking IDs v10 for CM9 2012-02-13 (Also available for CM7):
Some improvements in CPU utilization due to no longer needing to copy values from array to array. Increased some thresholds to help prevent the double-click issue that some people are reporting. Touch delay threshold is 28, touch delay count is 5 cycles, large area unpress at 22 and touch continue threshold at 26. This should bring this version more in line with the thresholds that we were using in v5. When my stylus comes, I'll start working on stylus operation in a separate branch to prevent work on stylus use from affecting finger use until I'm sure that I can get both types of use working well in the same driver.

Tracking IDs v9 2012-02-10:
Increased threshold for continuing an existing touch back to 20 to prevent some of the issues that users were reporting when lifting a finger off of the screen (and perhaps a few other odd behaviours). Some changes that slightly reduce CPU utilization and other changes to help pass the CM review process. The changes in v8 to help support stylus use somewhat hurt regular finger use and probably didn't help stylus use. I've decided not to work on stylus compatibility again until my stylus arrives.

Tracking IDs v8 2012-02-09:
Changes to the large area filter code to scan diagonal points. Reduced the threshold for continuing an existing touch to 16 to maybe help out stylus users.

Tracking IDs v7 2012-02-09:
Removed a feature that was part of large area filtering that was supposed to improve pinch distances that ended up causing problems with filtering the side of your thumb. Slightly increases minimum pinch distances, but pinch distances and performance are still comparable to webOS. Large area filtering is more accurate and tracks a better line when swiping. It's possible that these changes may also help tracking a straighter line with styluses. Some thresholds were tweaked slightly to work with these new changes.

Tracking IDs v6 2012-02-08:
This version is intended to improve support for styluses. I don't have a stylus, so it's hard for me to test to ensure proper operation. Also, different styluses will perform differently, so even if I had one, that doesn't mean that yours will work well. Describing the changes is going to take a bit, so bear with me. There are now several touch thresholds. First off, any touch that is over a value of 32 will be immediately reported. Any touch with a value over 24 but under 32 will only be reported if we see that touch repeated twice and thus won't be reported right away. This delay is very small as we get touch data 100 times per second. Any touch that has been reported will continue to be reported so long as it stays over a value of 20.

Tracking IDs v5 2012-02-07:
This is a very minor update. Changed touch threshold to 26 as I believe this more closely matches what HP used in webOS. Modified another threshold to improve large are filtering like the side of your thumb. Moved a block of code around to slightly improve CPU utilization when multiple touches are involved. Some code cleanup.

Tracking IDs v4 2012-02-06:
Improvements in a lot of areas, almost too numerous to mention. jyxent is responsible for most of this new code, I just cleaned it up a little bit. It should allow you to pinch closer. It tracks a better line for both small and large area touches. Improvements in CPU utilization. Also improved the impossibly large change filter to check previous distance and direction for better filtering (this is my other contribution). Touch threshold is back to 28 and debounce is now 10 pixels.

Tracking IDs v3 2012-02-04:
Significant reductions in CPU utilization. Many thanks to jyxent for his help in refactoring the tracking ID code! Also changed many of the floating point operations to integer operations. This version also finally makes some use of the tracking ID code. In the video at the bottom of this post, you could still get large touch changes to be reported as a swipe if you had an exra finger touching the screen. In this version, we're checking for large changes in touches for all touches.

Tracking IDs v2 2012-02-03:
Initial attempt at adding tracking IDs to the touchscreen driver. This probably won't improve anything for anyone, but it lays the groundwork for better operations in future versions. We now assign tracking IDs to each touch instead of letting the OS attempt to do it on its own. Tracking ID v1 was only released in IRC and was found to have an issue. Since only a couple of people tested it, I'm not posting it here. Also reduced the maximum touches that we track to 5 because Android doesn't seem to handle more than 5 properly anyway even though we're giving it the right tracking IDs. Increased the threshold for what is considered a valid touch from 28 to 36. This means that the driver is less sensitive. Lower sensitivity should allow you to pinch closer before the pinch counts as a single touch and reduce bouncing on a long press.

Debounce v2 2012-01-31:
Changed the threshold for what is considered a valid touch from 24 to 28.

Debounce v1 2012-01-30:
Added a debouncer to make it easier to long press. This version will report that your finger or thumb is in the same spot until you move at least 2 pixels in any direction. Some people reported difficulties with doing a long press, so I added a debouncer.

Thumb fix 2 2012-01-28:
Decreased thresholds for the large surface area filter to make it more aggressive. This version is more likely to report the side of your thumb as a single touch, but also more likely to report 2 fingers close together as a single touch. I realized after doing some testing on my phone that the first version wasn't being aggressive enough.

Thumb fix (original) 2012-01-27:
Filter for large surface area touches added, but thresholds set high, so not very aggressive at filtering large touches (e.g. the side of your thumb). On previous drivers, scrolling on a webpage with the side of your thumb would sometimes cause the page to zoom instead of scroll.
Minor re-factoring to other functions to make them more efficient.

Touchscreen fix for alpha0.5 (same driver as is in alpha0.6):
Fixed a problem where lighter swipes would sometimes be reported as touches and not swipes.
Lowered the threshold for what is considered a valid touch from 32 to 24.

alpha0.5:
The first thing that I set out to fix was the issue seen in this video:

If you simultaneously released with one finger and touched down in another spot with a different finger, the alpha0 driver would report that as a swipe. It was especially annoying if you used a keyboard like Swiftkey Tablet X and used the default gesture actions. A swipe left gesture is used to delete a word, so if you typed quickly on the keyboard, you'd frequently delete whole words. We fixed this with 2 changes:
1) Send a liftoff event if there's no valid touch data found in the touchscreen data buffer.
2) Add a filter to filter out large changes in touches.

alpha0:
Initial starting point for ICS.

A note about styluses: We are not targetting proper operation for styluses. That doesn't mean that we won't take a look, but not all styluses are the same and your stylus may not be compatible with the sensitivity of the TouchPad's touchscreen even if it works well with other devices. You may have to try several different ones before you find one that works well. If you have one that's working well with the newer drivers, feel free to post the make/model, where you bought it, and what driver you used so that others can find one that works well. Our goal is to get the touchscreen working well with fingers first. If you don't agree with that, you are welcome to download the source code and modify the driver to your heart's content.

Special thanks to the CM team for their great work on porting Android to the TouchPad. I could not have created the touchscreen driver myself. I am just modifying the fantastic work of others. All credit should go to them.

Power savings:
NOTE: You should not use this with any driver made on or after 2012-02-15 as the new driver does the same thing only better!
Power Savings v1 2012-02-07 :
I honestly don't really recommend using this as it can cause some compatiblity problems with some apps. This will stop your touchscreen driver when the display is off and restart it when the display turns back on. This does sometimes have a small side effect due to the fact that it recreates the touchscreen input device each time, but it should save a little battery by letting the TouchPad close the uart. If you don't like it & want to go back, use this:
Return to stock
 

·
Registered
Joined
·
110 Posts
definitely the best one so far out of everything since 0.5. no accidental double clicks or anything.

i'm not a big keyboard or terminal user so can't say much about rapid typing, but as far as swipes and such go this definitely has no "what-the..." moment.
 

·
Registered
Joined
·
7 Posts
A few weeks after buying the Touchpad I bought the Jot Pro stylus (no this is not a plug
), and have been wanting to effectively take notes with it on my tablet. But every app in Gingerbread was abysmal for note taking or the general response was poor. After the ICS update I was pleased to be able to use ICS apps for note taking (which worked alot better) but the response was even more terrible than in GB. My stylus stroke was spotty and would jump around and I had to write super slow to get readable notes. However, after flashing your work I was incredibly happy. The response and accuracy are spot on, and I can take notes at full handwriting speed with no issues. The combination of Asus SuperNote, the Jot Pro, and this patch is damn near perfect.

Thanks!
 

·
Registered
Joined
·
12 Posts
I been testing out the thumb fix 2. So far I'm liking it. It makes cm9 smoother sort of like iPad 2 smooth. Hopefully it will get even better. But right now I'm just enjoying this one. Thanks keep up the good work.
 

·
Registered
Joined
·
10 Posts

·
TeamWin
Joined
·
131 Posts
Discussion Starter · #11 ·
This is not related to HP touchpad, but Motorola Atrix have same problem. I saw your github and touchpad's touch driver was completely different from it of Atrix. Can you please do some mod for Atrix? Link is Atrix's touch driver source. https://github.com/Atrix-Dev-Team/kernel-moto-atrix4g/blob/CM_kernel/drivers/input/touchscreen/qtouch_obp_ts.c Ps. I'm also bought a used HP touchpad and it's comming day after tommorow. Looking forword to use this one
There's a lot more source code involved in the Atrix's driver, so it's hard to say if the same methods could easily be applied to the Atrix. I don't have an Atrix though, and it'd be very hard to develop for it without having a device in hand. I do have a Photon which is very similar, but the touchscreen on my Photon doesn't exibit the issues shown in your YouTube video.
 

·
Registered
Joined
·
44 Posts
Sorry but what was wrong with the touchscreen driver in cm7 that a new one was made for ics? Or is the cm7 one just not compatible with cm9.
 

·
Registered
Joined
·
44 Posts
All of the issues that I have documented in the original post were issues in CM7. Don't get me wrong, the original driver works, but my goal is to make it work better. The source code wasn't available publicly until ICS / CM9 was released.
Thanks for the info. i just wondered abou all the problems wih the touch after ics release, i didnt have with cm7 or just didnt notice them^^
I installed the debounce version 1 and it worked well for me during the last hour.the only problem i noticed is that if i type to fast android loose some letters even if i got a vibration as feedback,but this issue exist for me since first cm release for the touchpad,and im not the only one: url in next post, looks like i cant paste anything in the middle of a text within the browser on the touchpad...
Edit: i cant paste at all in this text field so pls google "typing in android xda" and click the first one.
 

·
Registered
Joined
·
10 Posts
There's a lot more source code involved in the Atrix's driver, so it's hard to say if the same methods could easily be applied to the Atrix. I don't have an Atrix though, and it'd be very hard to develop for it without having a device in hand. I do have a Photon which is very similar, but the touchscreen on my Photon doesn't exibit the issues shown in your YouTube video.
Thanks for your kind answer.
And yeah it is true that developing without device is extemely hard.
I hope you try when you have some spare time.
Anyway, thanks!
 

·
Registered
Joined
·
7 Posts
I was very tempted to post this on Dees_Troy's topic, but I was not sure if the included touchscreen modifications in the new alpha were authored by him, someone else, or if they had been modified from his source. After the .6 update the general feedback of the touchscreen is much better and more accurate, however the number of "phantom" inputs seems to have increased dramatically. For regular usage it seems to work very well, however when trying to take handwritten notes with a stylus the issue has hindered my experience.
The issue seems to appear in random usage, no specific gesture or stroke pattern seemed to trigger the issue, and the location seems to be random as well. What I mean by phantom inputs is that while I am writing, specifically on the lower half of the screen, I will get random clicks elsewhere that can wreak havoc on what I am trying to do. It may seem like a small inconvenience, but the best two note taking apps that I have found undergo great negative effects from this. SuperNote scales your text to size based on how "large" you write, and then fits it to a line. I write very small, and every few words I write I'll get a "phantom click" somewhere else on the screen which increases the boundaries of where I am writing causing the scaled version to be small and unreadable. On AntiPaper Notes, the phantom clicks interfere tremendously with the navigation controls and navigation mapping provided above and below where you are writing.

Below is a picture of average usage, circled are the "phantom" clicks, and no, my palm nor other body part is coming into contact with the screen. You can see how much this can effect the use. In AntiPaper Notes, several of the clicks would be in a "map" of your document causing your position to change and makes it almost unusable.

Any help? This was done on stock .6a but the same behavior exists in tenderloin-ts-thumb-fix2
 

·
TeamWin
Joined
·
131 Posts
Any help? This was done on stock .6a but the same behavior exists in tenderloin-ts-thumb-fix2
Try debounce v2. We've decreased the sensitivity for what's considered a valid touch.

On a side note, we've had a few reports of an interesting bug with the touchscreen. Toggle the screen off, then turn it back on, then press and hold in one spot for about 5 seconds. Eventually the touchscreen stops seeing your touch if you stay in one spot. This issue shows up in the raw data that we get from the touchscreen. We actually slowly stop seeing the touch completely. The issue stops showing up after about a minute of screen on time and won't reappear until you toggle the screen off/on again. This issue is also an issue in webOS. I don't think we're going to try to fix it. There won't be that many actual user scenarios where this issue shows up and it goes away after a minute. It probably makes pressing and holding harder though since the raw data that we get from the touchscreen is actually changing over the duration of the touch. You can see the issue in this video recorded by dalingrin:
 
1 - 20 of 250 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top