Use motor common name instead of designation in MotorConfigurationPanel

This commit is contained in:
JoePfeiffer 2021-08-24 14:34:55 -06:00
parent 4808ed0b27
commit d6482a5be5
4 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

@ -291,7 +291,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
throw new NullPointerException("Motor has a null mount... this should never happen: "+curMotorInstance.getID()); throw new NullPointerException("Motor has a null mount... this should never happen: "+curMotorInstance.getID());
} }
String str = motor.getDesignation(curMotorInstance.getEjectionDelay()); String str = motor.getCommonName(curMotorInstance.getEjectionDelay());
int count = mount.getInstanceCount(); int count = mount.getInstanceCount();
if (count > 1) { if (count > 1) {
str = "" + count + Chars.TIMES + " " + str; str = "" + count + Chars.TIMES + " " + str;