Fix wrong hasMotors method

The issue is that FlightConfigurableParameterSet.size() returns the map size minus 1, so it already ignores the default config
This commit is contained in:
SiboVG 2023-03-28 19:37:04 +02:00
parent 020ea2cf3f
commit db46daf4f2
2 changed files with 2 additions and 4 deletions

View File

@ -451,9 +451,7 @@ public class BodyTube extends SymmetricComponent implements BoxBounded, MotorMou
@Override
public boolean hasMotor() {
// the default MotorInstance is the EMPTY_INSTANCE.
// If the class contains more instances, at least one will have motors.
return ( 1 < this.motors.size());
return this.motors.size() > 0;
}
@Override

View File

@ -363,7 +363,7 @@ public class InnerTube extends ThicknessRingComponent implements AxialPositionab
@Override
public boolean hasMotor() {
// the default MotorInstance is the EMPTY_INSTANCE. If we have more than that, then the other instance will have a motor.
return ( 1 < this.motors.size());
return this.motors.size() > 0;
}
@Override