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

Button interaction #195

Merged
merged 14 commits into from
Feb 11, 2020
Merged

Button interaction #195

merged 14 commits into from
Feb 11, 2020

Conversation

xnkevinnguyen
Copy link
Contributor

Description:

Microbit button should be fully integrated with the python code.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@andreamah andreamah changed the title WIP: Button interaction Button interaction Feb 10, 2020
Copy link
Contributor

@isadorasophia isadorasophia left a comment

Choose a reason for hiding this comment

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

yay! buttons :D

src/process_user_code.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sagarmanchanda sagarmanchanda 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. :)

Copy link

@nasadigital nasadigital left a comment

Choose a reason for hiding this comment

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

Very neat PR. Good job!

src/process_user_code.py Outdated Show resolved Hide resolved
src/process_user_code.py Outdated Show resolved Hide resolved
cpx._Express__state[event] = new_state.get(event, cpx._Express__state[event])


def update_microbit(new_state):

Choose a reason for hiding this comment

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

I think it would make more sense to handle the state changing logic inside each component, instead of having all the different components update state in this method. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's true... I'll try implementing that for the next commit!

Copy link
Contributor

Choose a reason for hiding this comment

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

implemented!

@andreamah andreamah merged commit 8e1afe9 into dev Feb 11, 2020
@andreamah andreamah deleted the users/t-anmah/button-integration branch February 11, 2020 18:23
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.

5 participants