找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3474|回复: 5

全志A20 使用FT5316 IC电容屏出现触摸屏圆圈异常

[复制链接]

27

主题

74

回帖

953

积分

版主

积分
953
发表于 2014-4-1 10:13:12 | 显示全部楼层 |阅读模式

高速电路PCB网,专注于嵌入式方案,信号完整性和电源完整性仿真分析,高速电路PCB设计,各种EDA工具(Cadence\Mentor\\AD\\CAM\ANSYS HFSS)交流学习。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 jack_qin 于 2014-4-2 11:24 编辑

平台:
       全志A20 ,1GB 内存 FT5316 TP,800*480 分辨率
现象:
       点击触摸屏,有效但是屏幕上显示圆圈,起点在屏幕中心(不管点哪里,原始起点都在中心),随后采用单点式触摸屏,圆圈不懂,圆圈下的内容响应,想鼠标单击功能,采用滑动手势,圆圈移动,类似鼠标移动,整个现象像进入了鼠标模式!

linux内核驱动上报数据正常;点击各点上报各点坐标数据;

logcat打印日志如下:
I/EventHub(2477): New device: id=2, fd=104, path='/dev/input/event3', name='ft5x_ts', classes=0x15, configuration=' ', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
E/EventHub(2477): could not get driver version for /dev/input/mice, Not a typewriter
I/EventHub(2477): New device: id=5, fd=110, path='/dev/input/event0', name='gpio-keys', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
I/InputReader(2477): Device added: id=5, name='gpio-keys', sources=0x00000101
I/InputReader(2477):   Touch device ''ft5x_ts'' could not query the properties of its associated display 0.  The device will be inoperable until the display size becomes available.
I/InputReader(2477): Device added: id=2, name='Goodix', sources=0x00001103
W/InputManagerService(2477): Couldn't create dir.: /data/system/inputmethod
I/InputReader(2477): Reconfiguring input devices.  changes=0x00000004
I/InputReader(2477): Device reconfigured: id=2, name='ft5x_ts', surface size is now 800x480, mode is 3
I/SystemServer(2477): Accessibility Manager
I/ActivityManager(2477): Config changed: {1.0 0mcc0mnc zh_CN layoutdir=0 sw451dp w710dp h426dp nrml land ?uimode ?night finger -keyb/v/h -nav/h s.2}
通过比对正常的板子mode=1,不知道是不是这个地方导致的?

    enum DeviceMode {
        DEVICE_MODE_DISABLED, // input is disabled
        DEVICE_MODE_DIRECT, // direct mapping (touchscreen)
        DEVICE_MODE_UNSCALED, // unscaled mapping (touchpad)
        DEVICE_MODE_POINTER, // pointer mapping (pointer)
    };
    DeviceMode mDeviceMode;


mode =1 :触摸屏模式
mode =3 :鼠标模式, 。。。。原来进入了鼠标模式 看样子怀疑的是正确的。。。

void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
    int32_t oldDeviceMode = mDeviceMode;
    // Determine device mode.
    if (mParameters.deviceType == Parameters:EVICE_TYPE_POINTER
            && mConfig.pointerGesturesEnabled) {
        mSource = AINPUT_SOURCE_MOUSE;
        mDeviceMode = DEVICE_MODE_POINTER;

    } else if (mParameters.deviceType == Parameters:EVICE_TYPE_TOUCH_SCREEN
            && mParameters.associatedDisplayId >= 0) {
        mSource = AINPUT_SOURCE_TOUCHSCREEN;
        mDeviceMode = DEVICE_MODE_DIRECT;
    } else {
        mSource = AINPUT_SOURCE_TOUCHPAD;
        mDeviceMode = DEVICE_MODE_UNSCALED;
    }
    // Ensure we have valid X and Y axes.
    if (!mRawPointerAxes.x.valid || !mRawPointerAxes.y.valid) {
        LOGW(INDENT "Touch device '%s' did not report support for X or Y axis!  "
                "The device will be inoperable.", getDeviceName().string());
        mDeviceMode = DEVICE_MODE_DISABLED;
        return;
    }
    // Get associated display dimensions.
    if (mParameters.associatedDisplayId >= 0) {
        if (!mConfig.getDisplayInfo(mParameters.associatedDisplayId,
                mParameters.associatedDisplayIsExternal,
                &mAssociatedDisplayWidth, &mAssociatedDisplayHeight,
                &mAssociatedDisplayOrientation)) {
            LOGI(INDENT "Touch device '%s' could not query the properties of its associated "
                    "display %d.  The device will be inoperable until the display size "
                    "becomes available.",
                    getDeviceName().string(), mParameters.associatedDisplayId);
            mDeviceMode = DEVICE_MODE_DISABLED;
            return;
        }
    }
    // Configure dimensions.
    int32_t width, height, orientation;
    if (mDeviceMode == DEVICE_MODE_DIRECT || mDeviceMode == DEVICE_MODE_POINTER) {
        width = mAssociatedDisplayWidth;
        height = mAssociatedDisplayHeight;
        orientation = mParameters.orientationAware ?
                mAssociatedDisplayOrientation : DISPLAY_ORIENTATION_0;
    } else {
        width = mRawPointerAxes.x.maxValue - mRawPointerAxes.x.minValue + 1;
        height = mRawPointerAxes.y.maxValue - mRawPointerAxes.y.minValue + 1;
        orientation = DISPLAY_ORIENTATION_0;
    }
    // If moving between pointer modes, need to reset some state.
    bool deviceModeChanged;
    if (mDeviceMode != oldDeviceMode) {
        deviceModeChanged = true;
        mOrientedRanges.clear();
    }
    // Create pointer controller if needed.
    if (mDeviceMode == DEVICE_MODE_POINTER ||
            (mDeviceMode == DEVICE_MODE_DIRECT && mConfig.showTouches)) {
        if (mPointerController == NULL) {
            mPointerController = getPolicy()->obtainPointerController(getDeviceId());
        }
    } else {
        mPointerController.clear();
    }
    bool orientationChanged = mSurfaceOrientation != orientation;
    if (orientationChanged) {
        mSurfaceOrientation = orientation;
    }
    bool sizeChanged = mSurfaceWidth != width || mSurfaceHeight != height;
    if (sizeChanged || deviceModeChanged) {
        LOGI("Device reconfigured: id=%d, name='%s', surface size is now %dx%d, mode is %d",
                getDeviceId(), getDeviceName().string(), width, height, mDeviceMode);
...
}

27

主题

74

回帖

953

积分

版主

积分
953
 楼主| 发表于 2014-4-2 11:25:20 | 显示全部楼层
新的发现:
D/EventHub(1466): No input device configuration file found for device 'ft5x_ts'.
I/EventHub(1466): New device: id=1, fd=89, path='/dev/input/event2', name='ft5x_ts', classes=0x14, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true

27

主题

74

回帖

953

积分

版主

积分
953
 楼主| 发表于 2014-4-2 11:25:28 | 显示全部楼层
新的发现:
D/EventHub(1466): No input device configuration file found for device 'ft5x_ts'.
I/EventHub(1466): New device: id=1, fd=89, path='/dev/input/event2', name='ft5x_ts', classes=0x14, configuration='', keyLayout='', keyCharacterMap='', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true

27

主题

74

回帖

953

积分

版主

积分
953
 楼主| 发表于 2014-4-11 15:41:13 | 显示全部楼层
问题解决全志更改了源码,是的TP部分在配置解析。idc文件默认了tp.idc 所以找不到ft5x_ts.idc 文件路径, 是的mode=3,进入鼠标模式,因此出现以上问题;

条件上tp.idc ,问题解决;有时间贴上响应源码。

159

主题

160

回帖

1907

积分

管理员

积分
1907
发表于 2014-4-11 16:15:58 | 显示全部楼层
jack_qin 发表于 2014-4-11 07:41
问题解决全志更改了源码,是的TP部分在配置解析。idc文件默认了tp.idc 所以找不到ft5x_ts.idc 文件路径,  ...

顶! 这就是实实在在的经验。
高速电路PCB网管理员。www.gaosupcb.com

159

主题

160

回帖

1907

积分

管理员

积分
1907
发表于 2014-4-11 16:16:04 | 显示全部楼层
jack_qin 发表于 2014-4-11 07:41
问题解决全志更改了源码,是的TP部分在配置解析。idc文件默认了tp.idc 所以找不到ft5x_ts.idc 文件路径,  ...

顶! 这就是实实在在的经验。
高速电路PCB网管理员。www.gaosupcb.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

内容正在加载中,请稍候……

QQ|Archiver|手机版|小黑屋|TechAIRD(gaosupcb Inc.)

GMT+8, 2026-8-24 08:51 PM , Processed in 0.050473 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表