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 {
|
||||
|
||||
/**
|
||||
* If the description is set to this value, the pin is ignored in the documentation.
|
||||
*/
|
||||
String IGNORE = "ignore";
|
||||
|
||||
/**
|
||||
* The possible pull resistor configurations
|
||||
* "both" is an error condition which can happen if nets are merged
|
||||
|
@ -6,10 +6,7 @@
|
||||
package de.neemann.digital.core.switching;
|
||||
|
||||
import de.neemann.digital.core.*;
|
||||
import de.neemann.digital.core.element.Element;
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.core.element.ElementTypeDescription;
|
||||
import de.neemann.digital.core.element.Keys;
|
||||
import de.neemann.digital.core.element.*;
|
||||
|
||||
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) {
|
||||
outputAB = new ObservableValue("AB" + num, bits).setBidirectional().setToHighZ();
|
||||
outputAC = new ObservableValue("AC" + num, bits).setBidirectional().setToHighZ();
|
||||
outputAB = new ObservableValue("A" + num, bits).setBidirectional().setToHighZ();
|
||||
outputAC = new ObservableValue("AC" + num, bits).setBidirectional().setToHighZ().setDescription(PinDescription.IGNORE);
|
||||
outputB = new ObservableValue("B" + num, bits).setBidirectional().setToHighZ();
|
||||
outputC = new ObservableValue("C" + num, bits).setBidirectional().setToHighZ();
|
||||
s1 = new Switch(outputAB, outputB, false);
|
||||
|
@ -223,8 +223,11 @@ public class ElementHelpDialog extends JDialog {
|
||||
PinDescriptions outputs = et.getOutputDescriptions(elementAttributes);
|
||||
if (outputs != null && outputs.size() > 0) {
|
||||
w.append("<h4>").append(Lang.get("elem_Help_outputs")).append(":</h4>\n<dl>\n");
|
||||
for (PinDescription i : outputs)
|
||||
writeEntry(w, ElementAttributes.cleanLabel(i.getName()), i.getDescription());
|
||||
for (PinDescription i : outputs) {
|
||||
final String description = i.getDescription();
|
||||
if (description != PinDescription.IGNORE)
|
||||
writeEntry(w, ElementAttributes.cleanLabel(i.getName()), description);
|
||||
}
|
||||
w.append("</dl>\n");
|
||||
}
|
||||
|
||||
|
@ -151,11 +151,14 @@ public class DocuTest extends TestCase {
|
||||
|
||||
private void writePins(Writer w, PinDescriptions pinDescriptions) throws IOException {
|
||||
for (PinDescription p : pinDescriptions) {
|
||||
final String description = p.getDescription();
|
||||
if (description != PinDescription.IGNORE) {
|
||||
w.append(" <pin name=\"").append(escapeHTML(p.getName())).append("\">");
|
||||
w.append(escapeHTML(p.getDescription()));
|
||||
w.append(escapeHTML(description));
|
||||
w.append("</pin>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void write74xx(File file) throws IOException {
|
||||
TreeMap<String, String> map = new TreeMap<>(NumStringComparator.getInstance());
|
||||
|
Loading…
x
Reference in New Issue
Block a user