Merge pull request #765 from JoePfeiffer/fix-762

Don't set a warning if recovery device is deployed while motor is coasting
This commit is contained in:
Daniel Williams 2020-09-01 19:13:03 -04:00 committed by GitHub
commit 709ded2659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -466,7 +466,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
// Check whether any motor in the active stages is active anymore
for (MotorClusterState state : currentStatus.getActiveMotors() ) {
if ( state.isSpent() ) {
if (state.isDelaying() || state.isSpent()) {
continue;
}
currentStatus.getWarnings().add(Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING);

View File

@ -162,6 +162,10 @@ public class MotorClusterState {
return ! isPlugged();
}
public boolean isDelaying() {
return currentState == ThrustState.DELAYING;
}
public boolean isSpent(){
return currentState == ThrustState.SPENT;
}
@ -196,4 +200,4 @@ public class MotorClusterState {
}
}

View File

@ -229,7 +229,7 @@ public class SimulationStatus implements Monitorable {
public Collection<MotorClusterState> getActiveMotors() {
List<MotorClusterState> activeList = new ArrayList<MotorClusterState>();
for( MotorClusterState state: this.motorStateList ){
if(( ! state.isSpent()) && (this.configuration.isComponentActive( state.getMount()))){
if (this.configuration.isComponentActive( state.getMount())) {
activeList.add( state );
}
}