Skip to content

Commit

Permalink
fix upload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thias15 committed Sep 20, 2021
1 parent 84dd7ca commit 3ca061b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public abstract class ControlsFragment extends Fragment implements ServerListene
protected final String voice = "matthew";
protected List<Model> masterList;

private ServerCommunication serverCommunication;
protected ServerCommunication serverCommunication;

private ArrayAdapter<String> modelAdapter;
private ArrayAdapter<String> serverAdapter;
private Spinner modelSpinner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.openbot.databinding.FragmentLoggerBinding;
import org.openbot.env.BotToControllerEventBus;
import org.openbot.env.ImageUtils;
import org.openbot.server.ServerCommunication;
import org.openbot.tflite.Model;
import org.openbot.utils.ConnectionUtils;
import org.openbot.utils.Constants;
Expand All @@ -55,7 +54,6 @@ public class LoggerFragment extends CameraFragment {
private Handler handler;
private HandlerThread handlerThread;
private Intent intentSensorService;
private ServerCommunication serverCommunication;
protected String logFolder;

protected boolean loggingEnabled;
Expand Down Expand Up @@ -292,11 +290,11 @@ private void stopLogging() {
// Pack and upload the collected data
runInBackground(
() -> {
String logZipFile = logFolder + ".zip";
// Zip the log folder and then delete it
File folder = new File(logFolder);
File zip = new File(logZipFile);
try {
String logZipFile = logFolder + ".zip";
// Zip the log folder and then delete it
File folder = new File(logFolder);
File zip = new File(logZipFile);
TimeUnit.MILLISECONDS.sleep(500);
// These two lines below are messy and may cause bugs. needs to be looked into
ZipUtil.pack(folder, zip);
Expand Down

0 comments on commit 3ca061b

Please sign in to comment.