X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosEepromDelete.java;h=026b5da497bf2f7b9987503eb5b5d75135de96db;hb=HEAD;hp=57ebb4c1d243465707ffcc5d627fc4d7a389e089;hpb=cb23b992be8ba40c97d8988c134a814a13ccd58c;p=fw%2Faltos diff --git a/altosuilib/AltosEepromDelete.java b/altosuilib/AltosEepromDelete.java index 57ebb4c1..214ae530 100644 --- a/altosuilib/AltosEepromDelete.java +++ b/altosuilib/AltosEepromDelete.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,13 +16,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_7; +package org.altusmetrum.altosuilib_14; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_7.*; +import org.altusmetrum.altoslib_14.*; public class AltosEepromDelete implements Runnable { AltosEepromList flights; @@ -44,11 +45,13 @@ public class AltosEepromDelete implements Runnable { serial_line.printf("d %d\n", log.flight); for (;;) { /* It can take a while to erase the flash... */ - String line = serial_line.get_reply(20000); + String line = serial_line.get_reply(200000); if (line == null) throw new TimeoutException(); if (line.equals("Erased")) break; + if (line.equals("Failed to erase")) + throw new IOException(line); if (line.startsWith("No such")) throw new IOException(line); } @@ -83,7 +86,7 @@ public class AltosEepromDelete implements Runnable { serial_line.start_remote(); for (AltosEepromLog log : flights) { - if (log.selected) { + if (log.delete_selected) { DeleteLog(log); } }