|
|
高速电路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);
...
}
|
|