mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
Allow guitar wiring analyzer when some of the switching configuration do not produce output
This commit is contained in:
@@ -4458,6 +4458,10 @@
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Added 1-pole DIP switch option</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Allow guitar wiring analyzer when some of the switching configuration do not produce output</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
|
||||
Binary file not shown.
@@ -109,6 +109,10 @@ public class GuitarDiagramAnalyzer extends NetlistAnalyzer implements INetlistAn
|
||||
List<String> notes = new ArrayList<String>();
|
||||
|
||||
Tree tree = constructTree(netlist);
|
||||
|
||||
if (tree == null) {
|
||||
return new Summary(netlist, "No pickups are connected to the output jack");
|
||||
}
|
||||
|
||||
Tree pickupTree = tree.filter(PICKUP_TYPES);
|
||||
|
||||
@@ -405,8 +409,10 @@ public class GuitarDiagramAnalyzer extends NetlistAnalyzer implements INetlistAn
|
||||
List<Node> jackSleeveNodes = find(JACK_TYPES, "Sleeve", netlist);
|
||||
|
||||
if (jackTipNodes.size() == 0 || jackSleeveNodes.size() == 0) {
|
||||
throw new TreeException("Could not find anything connected to a jack tip terminal.");
|
||||
} else if (jackTipNodes.size() > 1 || jackSleeveNodes.size() > 1) {
|
||||
// LOG.("Could not find anything connected to a jack tip terminal.");
|
||||
return null;
|
||||
} else
|
||||
if (jackTipNodes.size() > 1 || jackSleeveNodes.size() > 1) {
|
||||
throw new TreeException("Multiple jacks found, could not proceed.");
|
||||
} else {
|
||||
Node jackTip = jackTipNodes.get(0);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user