Enforced minimum instance count of 2 for booster stages
This commit is contained in:
parent
7882304839
commit
231fd1ffa5
@ -23,7 +23,7 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
private double angularPosition_rad = 0;
|
private double angularPosition_rad = 0;
|
||||||
private double radialPosition_m = 0;
|
private double radialPosition_m = 0;
|
||||||
|
|
||||||
private int count = 1;
|
private int count = 2;
|
||||||
private double angularSeparation = Math.PI;
|
private double angularSeparation = Math.PI;
|
||||||
|
|
||||||
private int stageNumber;
|
private int stageNumber;
|
||||||
@ -36,13 +36,11 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon
|
|||||||
Stage.stageCount++;
|
Stage.stageCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowsChildren() {
|
public boolean allowsChildren() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getComponentName() {
|
public String getComponentName() {
|
||||||
//// Stage
|
//// Stage
|
||||||
|
@ -90,7 +90,7 @@ public class StageConfig extends RocketComponentConfig {
|
|||||||
motherPanel.add( countLabel, "align left");
|
motherPanel.add( countLabel, "align left");
|
||||||
parallelEnabledModel.addEnableComponent( countLabel, true);
|
parallelEnabledModel.addEnableComponent( countLabel, true);
|
||||||
|
|
||||||
IntegerModel countModel = new IntegerModel( stage, "InstanceCount", 1 );
|
IntegerModel countModel = new IntegerModel( stage, "InstanceCount", 2);
|
||||||
JSpinner countSpinner = new JSpinner(countModel.getSpinnerModel());
|
JSpinner countSpinner = new JSpinner(countModel.getSpinnerModel());
|
||||||
countSpinner.setEditor(new SpinnerEditor(countSpinner));
|
countSpinner.setEditor(new SpinnerEditor(countSpinner));
|
||||||
motherPanel.add(countSpinner, "growx 1, wrap");
|
motherPanel.add(countSpinner, "growx 1, wrap");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user