Skip to content

Stop mixing single and double tap detection. #17

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

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Dec 15, 2017

I haven't updated the guide that goes with this yet but will after the pull is accepted. We won't release it until the CPX library is forwards compatible.

The examples related to tap detection were tested on a CircuitPlayground Express.


This changes the API to have single boolean tapped property
(formerly read_click).

This change aligns the behavior with the expectation that a tap
thats part of a double tap does not register as a single tap. It
will now only detect single or double taps as set by set_tap.

Names with click were renamed to tap so they align with what is
actually happening rather than the data sheet names. A comment in
the code points this out.

The tap example now also deduplicates taps because tap detection
holds the status for a while.

This changes the API to have single boolean `tapped` property
(formerly read_click).

This change aligns the behavior with the expectation that a tap
thats part of a double tap does not register as a single tap. It
will now only detect single or double taps as set by `set_tap`.

Names with click were renamed to tap so they align with what is
actually happening rather than the data sheet names. A comment in
the code points this out.

The tap example now also deduplicates taps because tap detection
holds the status for a while.
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Tested driver and examples successfully.

@dhalbert dhalbert merged commit 02e57df into adafruit:master Dec 15, 2017
@tannewt
Copy link
Member Author

tannewt commented Dec 15, 2017

Guide has been updated.

tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 16, 2017
Updating https://github.com/adafruit/Adafruit_CircuitPython_CharLCD to 2.2 from 2.1.1:
  > Merge branch 'mrmcwethy-lint'
  > Add support for I2C/SPI backpack with MCP23008 and 74LS595. New Character_LCD_I2C and Character_LCD_SPI classes.

Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 1.0.0 from 0.9.1:
  > Added double_tap to express class (adafruit/Adafruit_CircuitPython_CircuitPlayground#23)
  > Added shake_threshold arg and updated docs

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH to 3.0.0 from 2.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3DH#17 from tannewt/single_double

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.0.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#3 from mrmcwethy/lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants