Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Adding support for the shake sensor #91

Merged
merged 95 commits into from
Aug 8, 2019
Merged

Conversation

FMounz
Copy link
Contributor

@FMounz FMounz commented Aug 2, 2019

Description:

This PR adds the support for the shake sensor. The user can now call the function cpx.shake() and see the effects,

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Limitations:

Please describe limitations of this PR

Testing:

  • Add to code.py an example code that use cpx.shake(). The Simulator should be updated accordingly. Example:
from adafruit_circuitplayground.express import cpx
while True:
    cpx.red_led = cpx.shake()

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@DIGarnier
Copy link

Little review :)

Copy link
Member

@LukeSlev LukeSlev left a comment

Choose a reason for hiding this comment

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

@FMounz Some comments, something funky is goin on
image

src/view/components/toolbar/SensorButton.tsx Outdated Show resolved Hide resolved
src/view/components/toolbar/SensorButton.tsx Outdated Show resolved Hide resolved
src/adafruit_circuitplayground/express.py Show resolved Hide resolved
src/process_user_code.py Outdated Show resolved Hide resolved
src/adafruit_circuitplayground/express.py Show resolved Hide resolved
src/view/components/toolbar/SensorButton.tsx Outdated Show resolved Hide resolved
@LukeSlev
Copy link
Member

LukeSlev commented Aug 6, 2019

ExtensionDevelopmentHost-A
Can we add a different onFocus? hard to tell I clicked on the button @FMounz

Michelle insisted on having this one maybe talk to her

@LukeSlev
Copy link
Member

LukeSlev commented Aug 6, 2019

Also cause this is a new feature and we have tests on the python side already would you be cool to add tests for this?

@LukeSlev
Copy link
Member

LukeSlev commented Aug 7, 2019

Blocked until we get @MichelleYAOOO gives feedback

Copy link
Contributor

@jonathanwangg jonathanwangg left a comment

Choose a reason for hiding this comment

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

Looks good, pending some changes.

src/adafruit_circuitplayground/express.py Show resolved Hide resolved
src/view/components/toolbar/MotionSensorBar.tsx Outdated Show resolved Hide resolved
src/adafruit_circuitplayground/test/test_express.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathanwangg jonathanwangg left a comment

Choose a reason for hiding this comment

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

LGTM.

@FMounz FMounz merged commit 8876f36 into dev Aug 8, 2019
@FMounz FMounz deleted the users/t-famoun/shakeSensor branch August 10, 2019 11:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants