1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-10 18:24:11 +01:00

AndroidGCS: Entire hash is now used to locate objects and they are pulled from

assets/uavos
This commit is contained in:
James Cotton 2012-10-10 00:49:28 -05:00
parent 557904fec9
commit fcaced59b5
2 changed files with 2 additions and 2 deletions

View File

@ -309,7 +309,7 @@ public class OPTelemetryService extends Service {
try try
{ {
File outputFile = new File(jarsDir, JAR_NAME); File outputFile = new File(jarsDir, JAR_NAME);
inputStream = assetManager.open(JAR_NAME); //JAR_DIR + File.separatorChar + JAR_NAME); inputStream = assetManager.open("uavos/" + JAR_NAME);
outputStream = new FileOutputStream(outputFile); outputStream = new FileOutputStream(outputFile);
copyStream(inputStream, outputStream); copyStream(inputStream, outputStream);
} }

View File

@ -103,7 +103,7 @@ public abstract class TelemetryTask implements Runnable {
if(description == null || description.getNumElements() < 100) { if(description == null || description.getNumElements() < 100) {
telemService.toastMessage("Failed to determine UAVO set"); telemService.toastMessage("Failed to determine UAVO set");
} else { } else {
final int HASH_SIZE_USED = 8; final int HASH_SIZE_USED = 20;
String jarName = new String(); String jarName = new String();
for(int i = 0; i < HASH_SIZE_USED; i++) for(int i = 0; i < HASH_SIZE_USED; i++)
jarName += Integer.toHexString((int) description.getDouble(i+60)); jarName += Integer.toHexString((int) description.getDouble(i+60));