1. 更新文档

2. 修正KEEPALIVE计数未清空问题
This commit is contained in:
wenbo13579
2024-02-27 11:33:32 +08:00
parent 7689828120
commit 9be172aced
3 changed files with 6 additions and 6 deletions

View File

@@ -215,7 +215,7 @@ while (1)
}
```
具体可以参考`example_win32.c``test.c`的实现。
具体可以参考`example_user.c``example_test.c`的实现。
@@ -659,7 +659,7 @@ int ebtn_is_in_process(void);
而当按下保持时间大于`time_click_pressed_max`时,就不会上报`ONCLICK`事件,如下图所示。
![image-20240223145802203](https://markdown-1306347444.cos.ap-shanghai.myqcloud.com/img/image-20240223145802203.png)
![image-20240227112945641](https://markdown-1306347444.cos.ap-shanghai.myqcloud.com/img/image-20240227112945641.png)

Binary file not shown.

View File

@@ -62,14 +62,14 @@ static void prv_process_btn(ebtn_btn_t *btn, uint8_t old_state, uint8_t new_stat
btn->click_cnt = 0;
}
/* Start with new on-press */
btn->flags |= EBTN_FLAG_ONPRESS_SENT;
ebtobj->evt_fn(btn, EBTN_EVT_ONPRESS);
/* Set keep alive time */
btn->keepalive_last_time = mstime;
btn->keepalive_cnt = 0;
/* Start with new on-press */
btn->flags |= EBTN_FLAG_ONPRESS_SENT;
ebtobj->evt_fn(btn, EBTN_EVT_ONPRESS);
btn->time_change = mstime; /* Button state has now changed */
}
}