sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.29k stars 633 forks source link

The state of relays are not properly reset when pressing "reset" #683

Closed ferrybig closed 2 years ago

ferrybig commented 2 years ago

Steps:

  1. Load the following circuit: https://www.falstad.com/circuit/circuitjs.html?running=false&ctz=...
  2. Observe the relay in the default off position.
  3. Press run/stop to start the simulation
  4. The simulation now pauses at 5.84ms
  5. Press reset
  6. Press run/stop to start the simulation

Expected:

The simulation is reset to the initial state, with all components in their initial positions. The circuit should behave exactly the same and stop after 5.84ms

Actual

The simulator never fully reset the relay component, it will now stop the simulation in 1.67ms

pfalstad commented 2 years ago

fixed