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

gpioutil: Note that Debounce is not implemented #10

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

lutzky
Copy link
Contributor

@lutzky lutzky commented Jul 26, 2021

Fixes #8

@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2021

Codecov Report

Merging #10 (a3a867b) into main (1c39224) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##            main     #10   +/-   ##
=====================================
  Coverage   98.3%   98.3%           
=====================================
  Files         31      31           
  Lines       2699    2699           
=====================================
  Hits        2652    2652           
  Misses        44      44           
  Partials       3       3           
Impacted Files Coverage Δ
gpio/gpioutil/debounce.go 100.0% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c39224...a3a867b. Read the comment docs.

@maruel
Copy link
Member

maruel commented Jul 27, 2021

Humm it seems like I messed up the CI, I'll have to double check.

@maruel
Copy link
Member

maruel commented Jul 28, 2021

Thinking about it more I think it's because my canary testing trick to fetch a not-yet-merged-commit works but only for commits in branches but not for PRs. I will have to fix this. In the meantime I'll just do a quick check how it looks in local godoc and will merge later ignoring the CI failure.

@maruel
Copy link
Member

maruel commented Jul 29, 2021

Sorry for the delay, the reason is that I wanted to confirm how it looks in godoc, compare the current layout:

image

versus moving stuff around:

image

The second works by putting warning on a single line. I also feel putting it at the end of the description instead of the middle flows better for the reader. The rationale is that vast majority of the users will be using the online view at pkg.go.dev, only a minority will read the code. That's why I'm a bit picky about how it renders.

@maruel
Copy link
Member

maruel commented Jul 29, 2021

Doc for the second form:

// Debounce returns a debounced gpio.PinIO from a gpio.PinIO source. Only the   
// PinIn behavior is mutated.                                                   
//                                                                              
// denoise is a noise filter, which waits a pin to be steady for this amount    
// of time BEFORE reporting the new level.                                      
//                                                                              
// debounce will lock on a level for this amount of time AFTER the pin changed  
// state, ignoring following state changes.                                     
//                                                                              
// Either value can be 0.                                                       
//                                                                              
// WARNING                                                                      
//                                                                              
// This is not yet implemented.                                                 
//                                                                              
// TODO(https://github.com/periph/conn/issues/5): Implement this

@lutzky
Copy link
Contributor Author

lutzky commented Jul 29, 2021

Makes sense, done.

@maruel maruel merged commit de2ac48 into periph:main Jul 29, 2021
@lutzky lutzky deleted the patch-2 branch August 16, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Documentation doesn't mention that gpioutil.Debounce is not fully implemented
3 participants