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

Reset all circuit playground components #28593

Merged
merged 2 commits into from Jun 12, 2019
Merged

Reset all circuit playground components #28593

merged 2 commits into from Jun 12, 2019

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented May 16, 2019

Do not submit until code-dot-org/chrome-serial-app#2 is in. That PR fixes the remaining issues with sending too much at once across the wire. This change requires sending a bunch of commands across the wire to reset the state, so we need to fix the flakiness before submitting this.

This is my attempt at resetting all state on each component. It was a little hard to track down some of the state, so if you can think of anything I may have missed please let me know! In particular, I'm a little worried that the sensors may still be sending readings across the wire, but I'm not sure how to check for this.

@ajpal ajpal requested review from joshlory and islemaster May 16, 2019 16:42
@joshlory
Copy link
Contributor

Merged code-dot-org/chrome-serial-app#2 and the new version (33) is now published to the Chrome Web Store.

image

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

👍

if (components.accelerometer) {
components.accelerometer.stop();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems correct. It'd be nice to deduplicate this code with destroyCircuitPlaygroundComponents, below.

@islemaster
Copy link
Contributor

Oh - tests please?

@ajpal ajpal merged commit 87c19d3 into staging Jun 12, 2019
@ajpal ajpal deleted the cp-may16 branch June 13, 2019 19:59
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.

None yet

3 participants