mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Cleaner XML format for .DIY files with less cross-references
pinout update
This commit is contained in:
+5
@@ -87,6 +87,11 @@ public abstract class AbstractTransistorPackage extends AbstractTransparentCompo
|
||||
return index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComment() {
|
||||
return getPinout() == null ? null : (getPinout().toString() + " pinout");
|
||||
}
|
||||
|
||||
@EditableProperty
|
||||
public String getValue() {
|
||||
return value;
|
||||
|
||||
@@ -6,6 +6,14 @@ public enum TransistorPinout {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().replace("_", " ");
|
||||
String[] parts = name().split("_");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < parts[1].length(); i++) {
|
||||
if (i > 0)
|
||||
sb.append("-");
|
||||
sb.append(parts[1].charAt(i));
|
||||
}
|
||||
sb.append(" ").append(parts[0]);
|
||||
return sb.toString();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,34 @@
|
||||
/*
|
||||
|
||||
DIY Layout Creator (DIYLC).
|
||||
Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||
|
||||
This file is part of DIYLC.
|
||||
|
||||
DIYLC is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
DIYLC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with DIYLC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
package org.diylc.netlist;
|
||||
|
||||
/**
|
||||
* Maps DIYLC component control points to spice-compatible node indices.
|
||||
*
|
||||
* @author Branislav Stojkovic
|
||||
*/
|
||||
public interface ISpiceMapper {
|
||||
|
||||
int mapToSpiceNode(int Index);
|
||||
int mapToSpiceNode(int pontIndex);
|
||||
|
||||
String getSectionName(int pointIndex);
|
||||
String getComment();
|
||||
}
|
||||
|
||||
@@ -110,6 +110,12 @@ public class SpiceAnalyzer extends NetlistAnalyzer implements INetlistAnalyzer {
|
||||
}
|
||||
|
||||
sb.append(c.getValue());
|
||||
|
||||
if (c instanceof ISpiceMapper) {
|
||||
String comment = ((ISpiceMapper)c).getComment();
|
||||
if (comment != null)
|
||||
sb.append(" ; ").append(comment);
|
||||
}
|
||||
sb.append("<br>");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user