pfalstad / circuitjs1

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

BUG: Potentiometer wiper position change on file open (or on file save?) #65

Open TishSerg opened 7 months ago

TishSerg commented 7 months ago

When my circuit has a potentiometer with some non-central wiper position set its position is slightly off the set value on every save-open cycle. How to reproduce:

  1. Create a blank circuit
  2. Place potentiometer there
  3. Make its total resistance, say, 10k
  4. Set its wiper to, say, 7.6k/2.4k
  5. Save the circuit to a file
  6. Open the file
  7. See the wiper position of the potentiometer is 7.5k/2.5k
  8. Save again
  9. Open again
  10. See the wiper position of the potentiometer now is 7.4k/2.6k
  11. And so on...

Every save-open makes the wipers of the potentiometers a little off.