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

Probes do not update value when components are pushed away from them #407

Closed
phet-steele opened this issue Oct 2, 2017 · 4 comments
Closed
Assignees
Labels

Comments

@phet-steele
Copy link
Contributor

  1. Set up a short with two wires and a battery (this isn't the only possible setup, but I had to tell you to set something up!)
  2. Drag the wire connection out so you've made a triangle shape with decently long side lengths, like this:

screen shot 2017-10-02 at 2 11 24 pm

  1. Place the ammeter probe just on the inner edge of a wire, like this:

screen shot 2017-10-02 at 2 11 36 pm

4. Cut the wire-wire connection! The ammeter will correctly be reading 0.00 A....but it shouldn't be reading anything at all! It isn't anywhere near the wire's hit area. Wiggle the other wire to "update" the probe to the correct readout.

screen shot 2017-10-02 at 2 11 45 pm

(after wiggling the right wire)

screen shot 2017-10-02 at 2 11 55 pm

5. Go back to the setup in step 2. Place a voltmeter probe on a battery terminal and the other at the wire-wire connection, like this:

screen shot 2017-10-02 at 2 12 22 pm

6. Cut the wire-wire connection! Same story with the correct value being read, but there shouldn't be a value at all. Wiggle the battery to "update" the readout.

screen shot 2017-10-02 at 2 12 30 pm

(after wiggling the battery)

screen shot 2017-10-02 at 2 12 35 pm

Seen on macOS 10.12.6 Chrome. For phetsims/qa/issues/51.

URL: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.162/circuit-construction-kit-dc_en.html
Version: 1.0.0-dev.162 2017-09-19 15:30:35 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: 1419x1014
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":"3da47e60","branch":"listeners"},"babel":{"sha":"8024993e","branch":"master"},"brand":{"sha":"cfca902d","branch":"master"},"chipper":{"sha":"beecf7e3","branch":"master"},"circuit-construction-kit-common":{"sha":"b0a1151d","branch":"master"},"circuit-construction-kit-dc":{"sha":"0b1708fd","branch":"master"},"dot":{"sha":"d2a1e0db","branch":"master"},"joist":{"sha":"4ac9bf9d","branch":"master"},"kite":{"sha":"5a200449","branch":"master"},"phet-core":{"sha":"054b2d6d","branch":"master"},"phetcommon":{"sha":"5b0c8dd6","branch":"master"},"query-string-machine":{"sha":"c74e454e","branch":"master"},"scenery":{"sha":"b7e4a6a4","branch":"master"},"scenery-phet":{"sha":"f8b1c996","branch":"master"},"sherpa":{"sha":"f0d5f750","branch":"master"},"sun":{"sha":"569ad84b","branch":"master"},"tandem":{"sha":"3b161ec8","branch":"master"},"twixt":{"sha":"a2eaa10a","branch":"master"}}

@samreid
Copy link
Member

samreid commented Oct 2, 2017

Cut calls Circuit.solve which calls circuitChangedEmitter.emit, which updates the values in the node. But perhaps something is out of sync? AmmeterNode uses Node.hitTest which I thought would be synchronous, but perhaps we have to wait for a display.update?

@samreid
Copy link
Member

samreid commented Oct 2, 2017

Good one @phet-steele, can you please test the fix committed above?

@samreid
Copy link
Member

samreid commented Oct 3, 2017

@phet-steele
Copy link
Contributor Author

Cool fix, 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

2 participants