diff --git a/core/resources/datafiles/thrustcurves/thrustcurves.ser b/core/resources/datafiles/thrustcurves/thrustcurves.ser index 8fe6792d7..d0f1a7dee 100644 Binary files a/core/resources/datafiles/thrustcurves/thrustcurves.ser and b/core/resources/datafiles/thrustcurves/thrustcurves.ser differ diff --git a/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java b/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java index 7adef3a03..2299898dc 100644 --- a/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java +++ b/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java @@ -161,20 +161,20 @@ public class SerializeThrustcurveMotors { } } - } private static List getThrustCurvesForMotorId(int motorId) { + String formats[] = new String[] {"RASP", "RockSim"}; List b = new ArrayList<>(); - try { - b.addAll(ThrustCurveAPI.downloadData(motorId, "RockSim")); - } catch (Exception ex) { - System.out.println("\tError downloading RockSim for motorID=" + motorId); - } - try { - b.addAll(ThrustCurveAPI.downloadData(motorId, "RASP")); - } catch (Exception ex) { - System.out.println("\tError downloading RASP for motorID=" + motorId); + for (String format : formats) { + try { + List motorData = ThrustCurveAPI.downloadData(motorId, format); + if (motorData != null) { + b.addAll(motorData); + } + } catch (Exception ex) { + System.out.println("\tError downloading " + format + " for motorID=" + motorId + ": " + ex.getLocalizedMessage()); + } } return b; }