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

Update SMDResistor.java #389

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update SMDResistor.java #389

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 27, 2018

Resistor was set to "C" for instanceNamePrefix in SMDResistor.java

SMDResistor.java.zip

Resistor was set tp "C" for instanceNamePrefix.
Commented out changes that allow the pin width to be adjustable so that they are the correct size for SOIC parts. Changes not tested because compiler on Windows machine and Windows ate it's hives and backups.
@bancika
Copy link
Owner

bancika commented Jan 3, 2019

hmm, is "adjustable pin width" feature complete? The new property doesn't seem to be used anywhere. Also, for backward compatibility, we should always use getters for new properties and handle null values. Otherwise, old files that do not have values for new properties will stop working.

@ghost
Copy link
Author

ghost commented Jan 4, 2019

Pin width, not yet. I have to re-install the dev software. I hope to have this soon. I only meant to send the resistor update.

Is there an easy way to update my fork with your changes? I found a couple of instructions but they are convoluted or nuke the current fork and start over.

@ghost
Copy link
Author

ghost commented Jan 18, 2019

I am having some problems with Eclipse. It gives vague something went wrong popups and stops working. I think it is my computer. I have a new OS install waiting for a different machine.

It works but I cannot open a layout that was saved without the pin width mod. Can you close this pull? It is grayed out for me.

This is what I did. I left the variable PIN_SIZE alone, it is the default value. Made a new variable pinSize, and use that when drawing the part.
added this get set -
// to change the pin width for making SOIC, pin is .0138" to .02", mid-size is .017 inches
@EditableProperty(name="Pin Width")
public Size getPinSize() {
if (pinSize == null) {
pinSize = PIN_SIZE; // if no value returned, reset to default valuefor
}
return pinSize;
}

public void setPinSize(Size pinSize) {
this.pinSize = pinSize;
updateControlPoints();
// Reset body shape;
body = null;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants