Minimum and maximum times (in Miliseconds) trains with the respective tag have to wait in this block. : Minamle und maximale Block-Haltezeit (in Millisekunden) für Züge mit der entsprchender Markierung.
minimum starting voltage v<sub>min</sub> : Mindestanfahrspannung v<sub>min</sub>
Move tiles : Kacheln verschieben
name : Name
new car : neuer Waggon
@ -208,7 +214,9 @@ No tile moved. : keine Kachel verschoben.
@@ -208,7 +214,9 @@ No tile moved. : keine Kachel verschoben.
{} now in auto-mode : {} ist nun im Automatikmodus
Set speed to {} {} : Geschwindigkeit auf {} {} setzen
Set {} to {} : {} auf {} setzen
setting : Einstellung
SetPower : Strom schalten
Set speed to : Geschwindigkeit setzen
SetTurnout : Weiche stellen
@ -304,6 +315,7 @@ Stock ID : Inventarnummer
@@ -304,6 +315,7 @@ Stock ID : Inventarnummer
Stop settings : Halte-Einstellungen
Start autopilot : Autopilot starten
Started {} : {} gestartet
starting delay : Anfahrverzögerung
State : Status
StopAllTrains : Alle Züge stoppen
StartStopAuto : Automatikmodus an/abschalten
@ -360,6 +372,7 @@ turn train : Richtung des Zuges Wechseln
@@ -360,6 +372,7 @@ turn train : Richtung des Zuges Wechseln
Turn allowed : Wenden erlaubt
Turn at destination : Richtung am Ziel umkehren
{} turned. : {} gewendet.
Turned power {}. : Strom {}geschaltet.
Turnout : Weiche
TurnoutLE : WeicheLE
TurnoutLN : WeicheLN
@ -375,6 +388,7 @@ Turns the train, as if it went through a loop. : Dreht den ZUg, als wenn er eine
@@ -375,6 +388,7 @@ Turns the train, as if it went through a loop. : Dreht den ZUg, als wenn er eine
Unknown action\: {} : Unbekannte Aktion: {}
Use negative number to count from end. : Nutze negative Nummern, um von Ende zu zählen.
@ -29,11 +33,20 @@ public class Locomotive extends Car implements Constants,Device{
@@ -29,11 +33,20 @@ public class Locomotive extends Car implements Constants,Device{
@ -54,6 +67,8 @@ public class Locomotive extends Car implements Constants,Device{
@@ -54,6 +67,8 @@ public class Locomotive extends Car implements Constants,Device{
@ -230,8 +245,8 @@ public class Locomotive extends Car implements Constants,Device{
@@ -230,8 +245,8 @@ public class Locomotive extends Car implements Constants,Device{
JSONObjectloco=newJSONObject();
loco.put(REVERSE,orientation);
loco.put(PROTOCOL,proto);
loco.put(ADDRESS,address);
json.put(LOCOMOTIVE,loco);
loco.put(CVS,cvs);
returnjson;
}
@ -242,7 +257,12 @@ public class Locomotive extends Car implements Constants,Device{
@@ -242,7 +257,12 @@ public class Locomotive extends Car implements Constants,Device{
@ -275,6 +295,51 @@ public class Locomotive extends Car implements Constants,Device{
@@ -275,6 +295,51 @@ public class Locomotive extends Car implements Constants,Device{
returnwin;
}
privateStringprogram(intcv,intval,booleanpom){
if(cv!=0){
if(val<0){
cvs.remove(cv);
returnnull;
}
init();
Commandcommand=newCommand("SET {} SM "+(pom?address:-1)+" CV "+cv+" "+val);
try{
Replyreply=plan.queue(command).reply();
if(reply.succeeded()){
cvs.put(cv,val);
if(cv==CV_ADDR)address=val;
returnnull;
}
returnreply.message();
}catch(TimeoutExceptione){
returnt("Timeout while sending programming command!");
@ -284,9 +349,10 @@ public class Locomotive extends Car implements Constants,Device{
@@ -284,9 +349,10 @@ public class Locomotive extends Car implements Constants,Device{
@ -300,6 +366,12 @@ public class Locomotive extends Car implements Constants,Device{
@@ -300,6 +366,12 @@ public class Locomotive extends Car implements Constants,Device{
});
}
privateLocomotivesetAddress(intnewAddress){
address=newAddress;
cvs.put(CV_ADDR,newAddress);
returnthis;
}
publicStringsetFunction(intnum,booleanactive){
switch(num){
case1:
@ -336,6 +408,30 @@ public class Locomotive extends Car implements Constants,Device{
@@ -336,6 +408,30 @@ public class Locomotive extends Car implements Constants,Device{
returnt("Speed of {} set to {}.",this,speed);
}
privateObjectsetting(intcv){
switch(cv){
case1:
returnt("Address");
case2:
returnt("minimum starting voltage v<sub>min</sub>");
case3:
returnt("starting delay");
case4:
returnt("braking delay");
case5:
returnt("maximum speed v<sub>max</sub>");
case6:
returnt("mid speed v<sub>mid</sub>");
case8:
returnt("PWM rate");
case17:
case18:
returnt("extended address");
}
return"";
}
publicObjectstop(){
setSpeed(0);
returnproperties();
@ -370,9 +466,19 @@ public class Locomotive extends Car implements Constants,Device{
@@ -370,9 +466,19 @@ public class Locomotive extends Car implements Constants,Device{