-
Notifications
You must be signed in to change notification settings - Fork 848
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
allow > 3 digits in numerical entry #1943
Comments
It should not be difficult to implement if my pull request is accepted #3749 |
remove imported. |
…. Capacitors and resistors Allows intruducing up top 10 digits (fixes fritzing#1943)
Hi @KjellMorgenstern ,
The first line (and commented) would allow having 10 digits in the entry and it will also allow deleting all the numbers. What is the issue? |
In fact, I think the pattern is the same as in Resistor.cpp:
|
…. Capacitors and resistors Allows intruducing up top 10 digits (fixes fritzing#1943)
? |
Sorry, that probably was a issue when merging commits.
When testing, I noticed the physical unit sometimes (randomly?) changes to mF. This is not related to the 3 vs 10 digit limit. |
Excellent. Thanks! |
Not sure what is broken... what the code intended was, if you enter for example |
Capacitors have a maximum capacitance of 4.7mF. If you introduce anything else above that threshold, the fixup function will be activated when (1) you press enter or (2) the focus is lost. I made the function to decrease or increase the value to achieve an ok value. For example, if you introduce "5", it will divide by ten until achieve something in the appropriate range, [1pF to 4.7mF]. Thus, you will end up with 0.5F. Apart from that, the code use the TextUtils::convertToPowerPrefix to format it to the appropriate format (3 main digits). Maybe an improvement would be to: (1) not attempt to fixup the text (if it is invalid, do not modify the value of the capacitor) and (2) format the text to use 3 main digits. |
@KjellMorgenstern , could you reopen this? Add a capacitor in 1.0.0 and try to add more than 3 digits, it is impossible. |
From irasc...@gmail.com on April 10, 2012 18:15:12
Allow entries like 1000uF. Convert them directly to the correct prefix?
Original issue: http://code.google.com/p/fritzing/issues/detail?id=1943
The text was updated successfully, but these errors were encountered: