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

Ammeters don't update after deletions #418

Closed
phet-steele opened this issue Oct 13, 2017 · 5 comments
Closed

Ammeters don't update after deletions #418

phet-steele opened this issue Oct 13, 2017 · 5 comments
Assignees
Labels

Comments

@phet-steele
Copy link
Contributor

Very similar to #407, but deals with components being deleted instead of moved. Right off the bat...the voltmeter seems to handle things well (or at least it's harder to make break), so ignore it in this issue.

  1. Setup a circuit like this:

screen shot 2017-10-13 at 4 56 53 pm

2. Delete the wire the ammeter is measuring. The ammeter will still show current. The in-line one will be correct.

screen shot 2017-10-13 at 4 57 01 pm

3. Now setup the same thing, except make the battery 0 V.

screen shot 2017-10-13 at 4 57 11 pm

4. Delete the wire the ammeter is measuring. Both ammeters will still show current. So when the in-line ammeter measures 0.00 A before the deletion, it breaks?

screen shot 2017-10-13 at 4 57 16 pm

To be clear, the problem is that ammeters will still measure current when there should be none. Moving a circuit element will fix the readouts.

Seen on macOS 10.12.6 Chrome. For phetsims/qa#51.
URL: https://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.166/circuit-construction-kit-dc_en.html
Version: 1.0.0-dev.166 2017-10-11 16:23:32 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Language: en-US
Window: 1920x1014
Pixel Ratio: 2/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 32 uniform: 1024
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 80)
Max viewport: 16384x16384
OES_texture_float: true
Dependencies JSON: {"assert":{"sha":"928741cf","branch":"master"},"axon":{"sha":"b8dd4e51","branch":"master"},"babel":{"sha":"45eca7d2","branch":"master"},"brand":{"sha":"cfca902d","branch":"master"},"chipper":{"sha":"66763c36","branch":"master"},"circuit-construction-kit-common":{"sha":"7d852b4c","branch":"master"},"circuit-construction-kit-dc":{"sha":"22604c0e","branch":"master"},"dot":{"sha":"84bc5146","branch":"master"},"joist":{"sha":"3eff115f","branch":"master"},"kite":{"sha":"9689a3de","branch":"master"},"phet-core":{"sha":"054b2d6d","branch":"master"},"phetcommon":{"sha":"5b0c8dd6","branch":"master"},"query-string-machine":{"sha":"c74e454e","branch":"master"},"scenery":{"sha":"db7ea875","branch":"master"},"scenery-phet":{"sha":"a90363b5","branch":"master"},"sherpa":{"sha":"f0d5f750","branch":"master"},"sun":{"sha":"d57850fd","branch":"master"},"tandem":{"sha":"f399e7ee","branch":"master"},"twixt":{"sha":"a2eaa10a","branch":"master"}}

@ariel-phet
Copy link

@samreid this seems like a more legit bug. Since moving circuit elements fixes it, I could live with it for 1.0, but would prefer not to. Worth investigating a fix.

@ariel-phet ariel-phet removed their assignment Oct 13, 2017
@samreid
Copy link
Member

samreid commented Oct 15, 2017

Proposed fix is above, @phet-steele can you please investigate?

@phet-steele
Copy link
Contributor Author

@samreid steps 1 & 2 are fixed, but 3 & 4 haven't change for the SERIES ammeter (the contact ammeter is fine). Starting at 0.00 A, the series ammeter doesn't update after a delete:

screen shot 2017-10-16 at 10 25 25 am

@samreid
Copy link
Member

samreid commented Oct 17, 2017

Many thanks @phet-steele, proposed fix committed.

@phet-steele
Copy link
Contributor Author

Works great, thanks @samreid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants