package net.sf.openrocket.android.thrustcurve;\r
\r
+import java.util.List;\r
import java.util.Set;\r
import java.util.regex.Matcher;\r
import java.util.regex.Pattern;\r
\r
import net.sf.openrocket.android.util.AndroidLogWrapper;\r
+import net.sf.openrocket.motor.ThrustCurveMotor;\r
import net.sf.openrocket.motor.ThrustCurveMotorPlaceholder;\r
\r
public class TCMissingMotorDownloadAction extends TCQueryAction {\r
\r
handler.post( new UpdateMessage("Looking for " + motor.getManufacturer() + " " + motor.getDesignation()));\r
\r
- SearchResponse res = new ThrustCurveAPI().doSearch(request);\r
+ SearchResponse res = ThrustCurveAPI.doSearch(request);\r
\r
int total = res.getResults().size();\r
int count = 1;\r
\r
AndroidLogWrapper.d(TCQueryAction.class, mi.toString());\r
\r
- MotorBurnFile b = new ThrustCurveAPI().downloadData(mi.getMotor_id());\r
+ List<MotorBurnFile> listOfMotors = ThrustCurveAPI.downloadData(mi.getMotor_id());\r
\r
- writeMotor( mi, b);\r
+ ThrustCurveMotor bestMatch = ThrustCurveAPI.findBestMatch(motor, listOfMotors);\r
+ writeMotor( mi, bestMatch);\r
\r
}\r
}\r