• Lv0
    粉丝0

积分0 / 贡献0

提问2答案被采纳0文章0

作者动态

触摸驱动事件无法上报

B_MoFi 显示全部楼层 发表于 6 天前

【问题描述】

触摸芯片已经适配并且有触摸坐标,但是解锁或者操作屏幕都无反应,怎么解决?

[ 48.030388] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:331 y = 243 [ 48.048994] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.049032] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.049041] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:331 y = 243 [ 48.059912] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.059937] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.059945] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:333 y = 260 [ 48.078737] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.078777] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.078787] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:334 y = 284 [ 48.098500] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.098562] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.098572] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:341 y = 345 [ 48.118273] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.118336] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.118347] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:355 y = 416 [ 48.138070] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.138114] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.138124] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:371 y = 508 [ 48.157718] [E/HDF_INPUT_DRV] ParsePointData: resolutionX = 1280 [ 48.157758] [E/HDF_INPUT_DRV] ParsePointData: resolutionY = 720 [ 48.157767] [E/HDF_INPUT_DRV] ====ParsePointData: id: 0 x:388 y = 596


static void ParsePointData(ChipDevice *device, FrameData *frame, uint8_t *buf, uint8_t pointNum)
{
    int32_t chipVer = device->chipCfg->chipVersion;
    int32_t resX = device->driver->boardCfg->attr.resolutionX;
    int32_t resY = device->driver->boardCfg->attr.resolutionY;
    int32_t i;
    uint8_t *coor_data = NULL;

    HDF_LOGE("%s: resolutionX = %d", __func__, resX);
    HDF_LOGE("%s: resolutionY = %d", __func__, resY);
    for (i = 0; i < pointNum; i++) {
        //coor_data = &buf[i * 8 + 1];
        //frame->fingers[i].trackId = coor_data[0]  & 0x0F;
        //frame->fingers[i].x = coor_data[1] | (coor_data[2] << 8);
        //frame->fingers[i].y = coor_data[3] | (coor_data[4] << 8);
        frame->fingers[i].trackId = buf[GT_POINT_SIZE * i + GT_TRACK_ID];
        frame->fingers[i].y = (buf[GT_POINT_SIZE * i + GT_X_LOW] & ONE_BYTE_MASK) |
                                  ((buf[GT_POINT_SIZE * i + GT_X_HIGH] & ONE_BYTE_MASK) << ONE_BYTE_OFFSET);
        frame->fingers[i].x = (buf[GT_POINT_SIZE * i + GT_Y_LOW] & ONE_BYTE_MASK) |
                                ((buf[GT_POINT_SIZE * i + GT_Y_HIGH] & ONE_BYTE_MASK) << ONE_BYTE_OFFSET);

        HDF_LOGE("====%s: id: %d  x:%d y = %d", __func__, frame->fingers[i].trackId ,frame->fingers[i].x , frame->fingers[i].y);

        if (frame->fingers[i].x == 0) {
            frame->fingers[i].x = X_OFFSET;
        }

        frame->fingers[i].valid = true;
    }
}

【运行环境】

硬件:rk3566 ROM版本:4.0 DevEvoStudio版本: SDK版本:

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部