Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow touch_pad_filter_delete() after touch_pad_filter_stop() (IDFGH-9371) #10745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robot-controller
Copy link

Currently, when calling touch_pad_filter_delete() after touch_pad_filter_stop(), touch_pad_filter_delete fails because it tries to stop the timer again (which already happened in touch_pad_filter_stop()).

There might be situations in which the filter is stopped at some point in the code, but not deleted. If it is decided only at a later point that it can be deleted, this is not possible using touch_pad_filter_delete() anymore.

The proposed change consists of a simple check using esp_timer_is_active() if the timer needs to be stopped. If it does, it will be stopped, if it does not, this step will be skipped, avoiding an error and allowing to delete the timer.

@CLAassistant
Copy link

CLAassistant commented Feb 10, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 10, 2023
@github-actions github-actions bot changed the title Allow touch_pad_filter_delete() after touch_pad_filter_stop() Allow touch_pad_filter_delete() after touch_pad_filter_stop() (IDFGH-9371) Feb 10, 2023
@Alvin1Zhang
Copy link
Collaborator

Thanks for your contribution.

@suda-morris suda-morris requested a review from L-KAYA February 15, 2023 14:40
@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Work is in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants