Search This thread

djsky2011

Senior Member
May 12, 2011
1,106
1,225
London
I am truly sorry about this.....

@djsky , does the patch work ?

@jusada thank you , you're a pal :)

Sent from my GT-S5830 using XDA App

Hey no problem dude, hopefully he hasn't put waylander off, we need his powerful system and kernel knowledge for compiling, it does it really quick :eek:

found the source of the error tho:

Code:
            // Old touchscreen sensors need to send a fake BTN_TOUCH (BTN_LEFT)

            if (rawEvent->scanCode == ABS_MT_TOUCH_MAJOR) {

                z_data = rawEvent->value;
                touched = (0 != z_data);
            }
            else if (rawEvent->scanCode == ABS_MT_POSITION_Y) {

                RawEvent event;
                memset(&event, 0, sizeof(event));
                event.when = rawEvent->when;
                event.deviceId = rawEvent->deviceId;
                event.scanCode = rawEvent->scanCode;

                event.type = rawEvent->type;
                event.value = rawEvent->value;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                /* Pressure on contact area from ABS_MT_TOUCH_MAJOR */
                event.type = rawEvent->type;
                event.scanCode = ABS_MT_PRESSURE;
                event.value = z_data;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                event.type = EV_KEY;
                event.scanCode = BTN_TOUCH;
                event.keyCode = BTN_LEFT;
                event.value = touched;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                [B]LOGD("Fake event sent, touch=%d !", touched);[/B]
            }
            else
#endif //LEGACY_TOUCHSCREEN
            {
                // just send the rawEvent
                for (size_t i = 0; i < numMappers; i++) {
                     mapper = mMappers[i];
                     mapper->process(rawEvent);
                }
            }
        }
}
 
Hey no problem dude, hopefully he hasn't put waylander off, we need his powerful system and kernel knowledge for compiling, it does it really quick :eek:

found the source of the error tho:

Code:
            // Old touchscreen sensors need to send a fake BTN_TOUCH (BTN_LEFT)

            if (rawEvent->scanCode == ABS_MT_TOUCH_MAJOR) {

                z_data = rawEvent->value;
                touched = (0 != z_data);
            }
            else if (rawEvent->scanCode == ABS_MT_POSITION_Y) {

                RawEvent event;
                memset(&event, 0, sizeof(event));
                event.when = rawEvent->when;
                event.deviceId = rawEvent->deviceId;
                event.scanCode = rawEvent->scanCode;

                event.type = rawEvent->type;
                event.value = rawEvent->value;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                /* Pressure on contact area from ABS_MT_TOUCH_MAJOR */
                event.type = rawEvent->type;
                event.scanCode = ABS_MT_PRESSURE;
                event.value = z_data;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                event.type = EV_KEY;
                event.scanCode = BTN_TOUCH;
                event.keyCode = BTN_LEFT;
                event.value = touched;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                [B]LOGD("Fake event sent, touch=%d !", touched);[/B]
            }
            else
#endif //LEGACY_TOUCHSCREEN
            {
                // just send the rawEvent
                for (size_t i = 0; i < numMappers; i++) {
                     mapper = mMappers[i];
                     mapper->process(rawEvent);
                }
            }
        }
}

Are we using the generic touchscreen driver ?
Or ours ?

Sent from my GT-S5830 using XDA App
 

Wayland_ACE

Inactive Recognized Developer
Nov 4, 2011
692
5,854
Riga
Hey no problem dude, hopefully he hasn't put waylander off, we need his powerful system and kernel knowledge for compiling, it does it really quick :eek:

found the source of the error tho:

Code:
            // Old touchscreen sensors need to send a fake BTN_TOUCH (BTN_LEFT)

            if (rawEvent->scanCode == ABS_MT_TOUCH_MAJOR) {

                z_data = rawEvent->value;
                touched = (0 != z_data);
            }
            else if (rawEvent->scanCode == ABS_MT_POSITION_Y) {

                RawEvent event;
                memset(&event, 0, sizeof(event));
                event.when = rawEvent->when;
                event.deviceId = rawEvent->deviceId;
                event.scanCode = rawEvent->scanCode;

                event.type = rawEvent->type;
                event.value = rawEvent->value;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                /* Pressure on contact area from ABS_MT_TOUCH_MAJOR */
                event.type = rawEvent->type;
                event.scanCode = ABS_MT_PRESSURE;
                event.value = z_data;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                event.type = EV_KEY;
                event.scanCode = BTN_TOUCH;
                event.keyCode = BTN_LEFT;
                event.value = touched;
                for (size_t i = 0; i < numMappers; i++) {
                    mapper = mMappers[i];
                    mapper->process(&event);
                }

                [B]LOGD("Fake event sent, touch=%d !", touched);[/B]
            }
            else
#endif //LEGACY_TOUCHSCREEN
            {
                // just send the rawEvent
                for (size_t i = 0; i < numMappers; i++) {
                     mapper = mMappers[i];
                     mapper->process(rawEvent);
                }
            }
        }
}

And? This is no error, it's just debug message for legacy touchscreens. I patched this lib to use that code
 
ok but what i'm thinking is it return this value in logcat upon first touch, not an error but should that be the right value?

D/InputReader( 173): Fake event sent, touch=0 !

I think the fake events were reversed

Oh yes , one more question .
Why does the ROM installation in CWM generate a random offset ?

Sent from my GT-S5830 using XDA App
 
Last edited:

djsky2011

Senior Member
May 12, 2011
1,106
1,225
London
right now we need to focus on the touch screen, i have noticed that 1 tap= holding down on left mouse button, while a second tap executes the task, equivalent to releasing the left mouse button after holding it down or a double tap
 

den191097

Member
Nov 30, 2010
38
5
May be i don't understand something but when i touch screen in cm7 there are no Fake event sent, touch=0 ! or Fake event sent, touch=1 ! (in logcat)/
 

Wayland_ACE

Inactive Recognized Developer
Nov 4, 2011
692
5,854
Riga
Here is a libinput library with some debug information output: http://cs.fill.ee/ics/libinput.so
1short tap generated:

I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0035 keycode=0x0000 value=0x000000e2 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0036 keycode=0x0000 value=0x0000004b flags=0x00000000
D/InputReader( 162): Fake event sent, touch=0 !
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0030 keycode=0x0000 value=0x00000001 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0032 keycode=0x0000 value=0x0000003f flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0000 scancode=0x0002 keycode=0x0000 value=0x00000000 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0000 scancode=0x0000 keycode=0x0000 value=0x00000000 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0035 keycode=0x0000 value=0x000000e2 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0036 keycode=0x0000 value=0x0000004b flags=0x00000000
D/InputReader( 162): Fake event sent, touch=1 !
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0030 keycode=0x0000 value=0x00000000 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0003 scancode=0x0032 keycode=0x0000 value=0x0000003f flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0000 scancode=0x0002 keycode=0x0000 value=0x00000000 flags=0x00000000
I/InputReader( 162): Input event: device=4 type=0x0000 scancode=0x0000 keycode=0x0000 value=0x00000000 flags=0x00000000


---------- Post added at 07:28 PM ---------- Previous post was at 07:26 PM ----------

May be i don't understand something but when i touch screen in cm7 there are no Fake event sent, touch=0 ! or Fake event sent, touch=1 ! (in logcat)/

InputReader was changed after gingerbread, in ICS. And our touchscreens become to LEGACY. So, now we use legacy ts hack.
 

djsky2011

Senior Member
May 12, 2011
1,106
1,225
London
Here is a libinput library with some debug information output: http://cs.fill.ee/ics/libinput.so
1short tap generated:



---------- Post added at 07:28 PM ---------- Previous post was at 07:26 PM ----------



InputReader was changed after gingerbread, in ICS. And our touchscreens become to LEGACY. So, now we use legacy ts hack.

our touch is being registered as a long press, 1 touch produces this twice in my log

D/InputReader( 173): Fake event sent, touch=0 !
D/InputReader( 173): Fake event sent, touch=1 !
D/InputReader( 173): Fake event sent, touch=1 !


notice inputreader being called twice from just one touch
 

Top Liked Posts