mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-17 08:55:05 -04:00
fixed RelayDT documentation
This commit is contained in:
parent
896ce2beb4
commit
0a0e9ca4e9
@ -10,6 +10,11 @@ package de.neemann.digital.core.element;
|
|||||||
*/
|
*/
|
||||||
public interface PinDescription {
|
public interface PinDescription {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the description is set to this value, the pin is ignored in the documentation.
|
||||||
|
*/
|
||||||
|
String IGNORE = "ignore";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The possible pull resistor configurations
|
* The possible pull resistor configurations
|
||||||
* "both" is an error condition which can happen if nets are merged
|
* "both" is an error condition which can happen if nets are merged
|
||||||
|
@ -6,10 +6,7 @@
|
|||||||
package de.neemann.digital.core.switching;
|
package de.neemann.digital.core.switching;
|
||||||
|
|
||||||
import de.neemann.digital.core.*;
|
import de.neemann.digital.core.*;
|
||||||
import de.neemann.digital.core.element.Element;
|
import de.neemann.digital.core.element.*;
|
||||||
import de.neemann.digital.core.element.ElementAttributes;
|
|
||||||
import de.neemann.digital.core.element.ElementTypeDescription;
|
|
||||||
import de.neemann.digital.core.element.Keys;
|
|
||||||
|
|
||||||
import static de.neemann.digital.core.element.PinInfo.input;
|
import static de.neemann.digital.core.element.PinInfo.input;
|
||||||
|
|
||||||
@ -103,8 +100,8 @@ public class RelayDT extends Node implements Element {
|
|||||||
|
|
||||||
|
|
||||||
private Pole(int bits, int num) {
|
private Pole(int bits, int num) {
|
||||||
outputAB = new ObservableValue("AB" + num, bits).setBidirectional().setToHighZ();
|
outputAB = new ObservableValue("A" + num, bits).setBidirectional().setToHighZ();
|
||||||
outputAC = new ObservableValue("AC" + num, bits).setBidirectional().setToHighZ();
|
outputAC = new ObservableValue("AC" + num, bits).setBidirectional().setToHighZ().setDescription(PinDescription.IGNORE);
|
||||||
outputB = new ObservableValue("B" + num, bits).setBidirectional().setToHighZ();
|
outputB = new ObservableValue("B" + num, bits).setBidirectional().setToHighZ();
|
||||||
outputC = new ObservableValue("C" + num, bits).setBidirectional().setToHighZ();
|
outputC = new ObservableValue("C" + num, bits).setBidirectional().setToHighZ();
|
||||||
s1 = new Switch(outputAB, outputB, false);
|
s1 = new Switch(outputAB, outputB, false);
|
||||||
|
@ -223,8 +223,11 @@ public class ElementHelpDialog extends JDialog {
|
|||||||
PinDescriptions outputs = et.getOutputDescriptions(elementAttributes);
|
PinDescriptions outputs = et.getOutputDescriptions(elementAttributes);
|
||||||
if (outputs != null && outputs.size() > 0) {
|
if (outputs != null && outputs.size() > 0) {
|
||||||
w.append("<h4>").append(Lang.get("elem_Help_outputs")).append(":</h4>\n<dl>\n");
|
w.append("<h4>").append(Lang.get("elem_Help_outputs")).append(":</h4>\n<dl>\n");
|
||||||
for (PinDescription i : outputs)
|
for (PinDescription i : outputs) {
|
||||||
writeEntry(w, ElementAttributes.cleanLabel(i.getName()), i.getDescription());
|
final String description = i.getDescription();
|
||||||
|
if (description != PinDescription.IGNORE)
|
||||||
|
writeEntry(w, ElementAttributes.cleanLabel(i.getName()), description);
|
||||||
|
}
|
||||||
w.append("</dl>\n");
|
w.append("</dl>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,11 +151,14 @@ public class DocuTest extends TestCase {
|
|||||||
|
|
||||||
private void writePins(Writer w, PinDescriptions pinDescriptions) throws IOException {
|
private void writePins(Writer w, PinDescriptions pinDescriptions) throws IOException {
|
||||||
for (PinDescription p : pinDescriptions) {
|
for (PinDescription p : pinDescriptions) {
|
||||||
|
final String description = p.getDescription();
|
||||||
|
if (description != PinDescription.IGNORE) {
|
||||||
w.append(" <pin name=\"").append(escapeHTML(p.getName())).append("\">");
|
w.append(" <pin name=\"").append(escapeHTML(p.getName())).append("\">");
|
||||||
w.append(escapeHTML(p.getDescription()));
|
w.append(escapeHTML(description));
|
||||||
w.append("</pin>\n");
|
w.append("</pin>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void write74xx(File file) throws IOException {
|
private void write74xx(File file) throws IOException {
|
||||||
TreeMap<String, String> map = new TreeMap<>(NumStringComparator.getInstance());
|
TreeMap<String, String> map = new TreeMap<>(NumStringComparator.getInstance());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user