ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

Feature Request: Allow Binary/Hex values to be entered for constants #65

Closed farzamtn closed 1 year ago

farzamtn commented 4 years ago

Right now when you make a constant and put the base in binary, you still have to enter the value in decimal and it will convert it to binary for you. It might be nice to have the option to enter the value in binary as well

ra4king commented 1 year ago

Hex values are already supported if you prefix with 0x. I can add binary support with 0b prefix.

ra4king commented 1 year ago

I committed 75339b167e95df49a0f799ab760b5b7556450689 for binary support. I realize after testing this that the input field changes to decimal when you finish inputting it. Let me see if I can fix this.

ra4king commented 1 year ago

Commit 0665bb2b9f0e311641b843496d548cd26921f2a4 preserves the input base used in both the UI and save file. This will be released in 1.8.6.