import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
-import org.altusmetrum.altoslib_1.*;
+import org.altusmetrum.altoslib_3.*;
import org.altusmetrum.altosuilib_1.*;
public class AltosEepromManage implements ActionListener {
}
}
+ private int countDeletedFlights() {
+ int count = 0;
+ for (AltosEepromLog flight : flights) {
+ if (flight.selected)
+ count++;
+ }
+ return count;
+ }
+
private String showDeletedFlights() {
String result = "";
} else if (cmd.equals("delete")) {
if (success) {
JOptionPane.showMessageDialog(frame,
- String.format("Flights erased: %s",
+ String.format("%d flights erased: %s",
+ countDeletedFlights(),
showDeletedFlights()),
serial_line.device.toShortString(),
JOptionPane.INFORMATION_MESSAGE);
for (AltosEepromLog flight : flights)
any_selected = any_selected || flight.selected;
if (any_selected) {
- download = new AltosEepromDownload(frame,
+ AltosEepromMonitorUI monitor = new AltosEepromMonitorUI(frame);
+ monitor.addActionListener(this);
+ serial_line.set_frame(frame);
+ download = new AltosEepromDownload(monitor,
serial_line,
remote,
flights);
- download.addActionListener(this);
/*
* Start flight log download
*/