This commit is contained in:
Stephan Richter
2020-12-11 02:10:16 +01:00
parent 9810b453cb
commit 604b9559c4
4 changed files with 21 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId> <groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId> <artifactId>web4rail</artifactId>
<version>1.2.43</version> <version>1.2.44</version>
<name>Web4Rail</name> <name>Web4Rail</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>Java Model Railway Control</description> <description>Java Model Railway Control</description>

View File

@@ -12,7 +12,7 @@ add car\: : Waggon hinzufügen:
Add condition : Bedingung hinzufügen Add condition : Bedingung hinzufügen
add locomotive\: : Lok hinzufügen: add locomotive\: : Lok hinzufügen:
add new car : neuen Waggon anlegen add new car : neuen Waggon anlegen
Add new custom field : neues benutzerdefinierted Feld hinzufügen Add new custom field : neues benutzerdefiniertes Feld hinzufügen
add new locomotive : neue Lok anlegen add new locomotive : neue Lok anlegen
add new train : neuen Zug anlegen add new train : neuen Zug anlegen
Add tile : Kachel hinzufügen Add tile : Kachel hinzufügen
@@ -114,6 +114,7 @@ inverted : invertiert
known cars : bekannte Waggons known cars : bekannte Waggons
known locomotives : bekannte Lokomotiven known locomotives : bekannte Lokomotiven
known trains : bekannte Züge known trains : bekannte Züge
Label for state {} : Beschriftung für Status {}
learn : lernen learn : lernen
LEFT : links LEFT : links
Left port\: : Port für links Left port\: : Port für links
@@ -157,6 +158,7 @@ other train properties : andere Zug-Eigenschaften
Origin and destination : Start und Ziel Origin and destination : Start und Ziel
Origin\: {} to {} : Start: {} nach {} Origin\: {} to {} : Start: {} nach {}
Plan saved as "{}". : Plan als „{}“ gespeichert. Plan saved as "{}". : Plan als „{}“ gespeichert.
Port for state {} : Anschluss für Status {}
PreserveRoute : Anschlußroute vorwählen PreserveRoute : Anschlußroute vorwählen
Properties : Eigenschaften Properties : Eigenschaften
Properties of {} : Eigenschaften von {} Properties of {} : Eigenschaften von {}
@@ -183,6 +185,7 @@ Select contact\: : Kotakt auswählen:
Select display : Anzeige auswählen Select display : Anzeige auswählen
Select from plan : Auf Plan auswählen Select from plan : Auf Plan auswählen
Select relay\: : Relais auswählen: Select relay\: : Relais auswählen:
Select state : Status auswählen
Select train : Zug auswählen Select train : Zug auswählen
Select turnout : Weiche wählen Select turnout : Weiche wählen
SendCommand : Kommando senden SendCommand : Kommando senden

View File

@@ -40,7 +40,18 @@ public class SetRelay extends Action {
@Override @Override
public Action load(JSONObject json) { public Action load(JSONObject json) {
super.load(json); super.load(json);
if (json.has(RELAY)) relay = BaseClass.get(new Id(json.getString(RELAY))); if (json.has(RELAY)) {
String relayId = json.getString(RELAY);
relay = BaseClass.get(new Id(relayId));
if (isNull(relay)) new Thread() { // if relay not loaded, yet: wait one sec and try again
public void run() {
try {
sleep(1000);
} catch (InterruptedException e) {}
relay = BaseClass.get(new Id(relayId));
};
}.start();
}
if (json.has(Relay.STATE)) state = json.getBoolean(Relay.STATE); if (json.has(Relay.STATE)) state = json.getBoolean(Relay.STATE);
return this; return this;
} }

View File

@@ -137,10 +137,10 @@ public class Relay extends Tile implements Device{
} }
formInputs.add(t("Decoder address"),div); formInputs.add(t("Decoder address"),div);
formInputs.add(t("Address"),new Input(ADDRESS, address).numeric()); formInputs.add(t("Address"),new Input(ADDRESS, address).numeric());
formInputs.add(t("Port for state A"),new Input(PORT_A, portA).numeric()); formInputs.add(t("Label for state {}","A"),new Input(LABEL_A, stateLabelA));
formInputs.add(t("Label for state A"),new Input(LABEL_A, stateLabelA)); formInputs.add(t("Label for state {}","B"),new Input(LABEL_B, stateLabelB));
formInputs.add(t("Port for state B"),new Input(PORT_B, portB).numeric()); formInputs.add(t("Port for state {}",stateLabelA),new Input(PORT_A, portA).numeric());
formInputs.add(t("Label for state B"),new Input(LABEL_B, stateLabelB)); formInputs.add(t("Port for state {}",stateLabelB),new Input(PORT_B, portB).numeric());
return super.properties(preForm, formInputs, postForm); return super.properties(preForm, formInputs, postForm);
} }