From: SnickerSun Date: Tue, 12 Mar 2024 01:50:08 +0000 (+0800) Subject: 修复表冠上报锁死问题 X-Git-Tag: release_V1.2.70_20241020_135402~1274^2~23^2~1 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=f291b37c9e7a6da89d1f35b404bd0c627db9f25b;p=mirrors%2FFD230.git 修复表冠上报锁死问题 --- diff --git a/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507.c b/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507.c index 397d46933..0cf2be1c9 100644 --- a/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507.c +++ b/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507.c @@ -527,6 +527,8 @@ void put_crown_result(int16_t x) if (g_encoder_callback != NULL) g_encoder_callback(); + else + TYHX_LOG("no call back crown_result = %d\r\n",crown_result); } /** diff --git a/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507_hal.c b/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507_hal.c index a4b6cd6fb..1db9ed7ef 100644 --- a/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507_hal.c +++ b/code/sdk/drivers/peripheral/rotary_encoder/hx3507/hx3507_hal.c @@ -51,7 +51,6 @@ static ext_errno hx3507_encoder_deinit(void) static ext_errno hx3507_encoder_get_encoderinfo(uint8_t *data, uint8_t data_len) { - // re_print("hx3507_encoder_get_encoderinfo\r\n"); if (data_len != sizeof(re_input_event_info)) return EXT_ERR_NOT_SUPPORT; re_input_event_info *encoder_info = (re_input_event_info*)data; @@ -68,6 +67,7 @@ static ext_errno hx3507_encoder_get_encoderinfo(uint8_t *data, uint8_t data_len) encoder_info->finger_id = 0 ; encoder_info->point_num = 0 ; encoder_info->tv_usec = (uint32_t)uapi_tcxo_get_ms(); + //re_print("hx3507_encoder_get_encoderinfo %s rotate %d\r\n",encoder_info->re_event == MC_RE_SLIDE_UP?"MC_RE_SLIDE_UP":"MC_RE_SLIDE_DOWN",diff); return EXT_ERR_SUCCESS; } diff --git a/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c b/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c index e325f4659..277d65180 100644 --- a/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c +++ b/code/sdk/drivers/peripheral/rotary_encoder/rotary_encoder_drv.c @@ -134,7 +134,7 @@ ext_errno encoder_info_process(void) if (ret != EXT_ERR_SUCCESS) { re_err("get encoder info fail! ret=0x%x", ret); } - re_print("encoder_info_process1\n"); + // re_print("encoder_info_process1\n"); report_or_enqueue_event(&encoder_info, redd); #if defined(SUPPORT_POWER_MANAGER) report_event_to_power_manager(&encoder_info); @@ -142,14 +142,14 @@ ext_errno encoder_info_process(void) } - re_print("encoder_info_process2\n"); + // re_print("encoder_info_process2\n"); return EXT_ERR_SUCCESS; } static void re_callback_func(void) { - return ; + ext_errno ret; if (g_attr_re != NULL) { common_notify_mail_t mail = {0}; diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_distributer.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_distributer.cpp index c191d8997..ea249644a 100755 --- a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_distributer.cpp +++ b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_distributer.cpp @@ -69,9 +69,7 @@ void LiteInputDistributer::GetEventData(DeviceData& data, InputDevType type) data.timestamp = tmp->timestamp; delete tmp; tmp = nullptr; - return; - } - if (type == InputDevType::INDEV_TYPE_TOUCH) { + }else if (type == InputDevType::INDEV_TYPE_TOUCH) { g_lastData = deviceData_; if (IsShowPoint() && (deviceData_.timestamp != g_lastData.timestamp)) { DfxTPGetEvent(); @@ -80,11 +78,7 @@ void LiteInputDistributer::GetEventData(DeviceData& data, InputDevType type) data.point.y = deviceData_.point.y; data.state = deviceData_.state; data.timestamp = deviceData_.timestamp; - eventLock_.Unlock(); - return; - } - - if (type == InputDevType::INDEV_TYPE_KEY) { + }else if (type == InputDevType::INDEV_TYPE_KEY) { if (keyList_.IsEmpty()) { data.keyId = INVALID_KEY_ID; eventLock_.Unlock(); @@ -114,10 +108,8 @@ void LiteInputDistributer::SetEventData(const RawEvent& event) deviceData_.point.y = event.y; deviceData_.state = event.state; deviceData_.timestamp = event.timestamp; - eventLock_.Unlock(); - return; - } - if (event.type == InputDevType::INDEV_TYPE_ENCODER) { + + }else if (event.type == InputDevType::INDEV_TYPE_ENCODER) { // if (IsShowPoint()) { // DfxTPSetEvent(event.timestamp - encoderDataList_.timestamp); // } @@ -132,9 +124,8 @@ void LiteInputDistributer::SetEventData(const RawEvent& event) tmp = nullptr; } encoderDataList_.PushBack(data); - return; - } - if (event.type == InputDevType::INDEV_TYPE_KEY) { + + }else if (event.type == InputDevType::INDEV_TYPE_KEY) { DeviceData* data = new DeviceData(); data->keyId = event.keyId; data->state = event.state; diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_hal.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_hal.cpp index e939b451b..08ef0caf5 100755 --- a/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_hal.cpp +++ b/code/sdk/middleware/services/gui/uikit/proprietary/src/utils/frameworks/hals/lite_input_hal.cpp @@ -54,9 +54,9 @@ static void EventCallback(InputDevData* data) event.timestamp = data->timestamp; event.type = InputDevType::INDEV_TYPE_TOUCH; } else if (data->type == INDEV_TYPE_ENCODER) { - // if (IsShowTPRaw()) { + if (IsShowTPRaw()) { GRAPHIC_LOGP("Encoder s: %u, rotate: %d, t: %u", data->state,data->rotate, data->timestamp); - // } + } event.rotate = data->rotate; event.state = data->state; event.timestamp = data->timestamp;