Fix Configuration name in motor configuration panel.

Formerly just used delay value directly, resulting in huge delay for
plugged motors; now uses motor.getDesignation so it translates to "P" as
expected.

Changed name of toMotorDesription method to toMotorDesignation to match
usage of getDesignation() in ThrustCurveMotor.java

Changed toMotorDesignation to use motor.getDesignation
This commit is contained in:
Joe Pfeiffer 2018-06-01 09:23:05 -06:00
parent d8fb48ee4c
commit f82fef44d7
3 changed files with 6 additions and 6 deletions

View File

@ -62,11 +62,11 @@ public class MotorConfiguration implements FlightConfigurableParameter<MotorConf
return ignitionOveride;
}
public String toMotorDescription(){
public String toMotorDesignation(){
if( motor == null ){
return trans.get("empty");
}else{
return this.motor.getDesignation() + "-" + (int)this.getEjectionDelay();
return this.motor.getDesignation(this.getEjectionDelay());
}
}
@ -235,7 +235,7 @@ public class MotorConfiguration implements FlightConfigurableParameter<MotorConf
}
public String toDescription(){
return ( this.toMotorDescription()+
return ( this.toMotorDesignation()+
" in: "+mount.getDebugName()+
" ign@: "+this.toIgnitionDescription() );
}
@ -251,7 +251,7 @@ public class MotorConfiguration implements FlightConfigurableParameter<MotorConf
mount.getDebugName(),
fcid.toShortKey(),
mid.toDebug(),
toMotorDescription(),
toMotorDesignation(),
toIgnitionDescription() ));
return buf.toString();

View File

@ -58,7 +58,7 @@ public class MotorConfigurationSet extends FlightConfigurableParameterSet<MotorC
loopFCID.toShortKey(),
curConfig.getFCID().toShortKey(),
curConfig.getMID().toShortKey(),
curConfig.toMotorDescription(),
curConfig.toMotorDesignation(),
curConfig.toIgnitionDescription() ));
}

View File

@ -307,7 +307,7 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
}
if( ! motorConfig.isEmpty()){
buff.append( motorConfig.toMotorDescription());
buff.append(motorConfig.toMotorDesignation());
++activeMotorCount;
}
}