projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Wait for i2c START condition before setting interrupt bits
[fw/altos]
/
altosui
/
AltosScanUI.java
diff --git
a/altosui/AltosScanUI.java
b/altosui/AltosScanUI.java
index bce4b32c9ef02e19db030e33eb77a5e5a2558005..44eeda6dcc83ff228c21efe0415a1bf4f7de5bfa 100644
(file)
--- a/
altosui/AltosScanUI.java
+++ b/
altosui/AltosScanUI.java
@@
-28,6
+28,7
@@
import java.util.*;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.*;
import java.text.*;
import java.util.prefs.*;
import java.util.concurrent.*;
+import org.altusmetrum.AltosLib.*;
class AltosScanResult {
String callsign;
class AltosScanResult {
String callsign;
@@
-102,7
+103,7
@@
class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel
}
public class AltosScanUI
}
public class AltosScanUI
- extends
J
Dialog
+ extends
Altos
Dialog
implements ActionListener
{
AltosUI owner;
implements ActionListener
{
AltosUI owner;
@@
-130,8
+131,7
@@
public class AltosScanUI
void scan_exception(Exception e) {
if (e instanceof FileNotFoundException) {
JOptionPane.showMessageDialog(owner,
void scan_exception(Exception e) {
if (e instanceof FileNotFoundException) {
JOptionPane.showMessageDialog(owner,
- String.format("Cannot open device \"%s\"",
- device.toShortString()),
+ ((FileNotFoundException) e).getMessage(),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof AltosSerialInUseException) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof AltosSerialInUseException) {
@@
-208,7
+208,7
@@
public class AltosScanUI
}
void next() throws InterruptedException, TimeoutException {
}
void next() throws InterruptedException, TimeoutException {
- reader.se
rial.se
t_monitor(false);
+ reader.set_monitor(false);
Thread.sleep(100);
++frequency_index;
if (frequency_index >= frequencies.length ||
Thread.sleep(100);
++frequency_index;
if (frequency_index >= frequencies.length ||
@@
-224,7
+224,7
@@
public class AltosScanUI
}
set_frequency();
set_label();
}
set_frequency();
set_label();
- reader.se
rial.se
t_monitor(true);
+ reader.set_monitor(true);
}
}
@@
-268,7
+268,7
@@
public class AltosScanUI
scanning_telemetry |= (1 << Altos.ao_telemetry_standard);
telemetry_boxes[Altos.ao_telemetry_standard - Altos.ao_telemetry_min].setSelected(true);
}
scanning_telemetry |= (1 << Altos.ao_telemetry_standard);
telemetry_boxes[Altos.ao_telemetry_standard - Altos.ao_telemetry_min].setSelected(true);
}
- AltosPreferences.set_scanning_telemetry(scanning_telemetry);
+ Altos
UI
Preferences.set_scanning_telemetry(scanning_telemetry);
}
if (cmd.equals("monitor")) {
}
if (cmd.equals("monitor")) {
@@
-312,7
+312,7
@@
public class AltosScanUI
if (device == null)
return false;
try {
if (device == null)
return false;
try {
- reader = new AltosTelemetryReader(
device
);
+ reader = new AltosTelemetryReader(
new AltosSerial(device)
);
set_frequency();
set_telemetry();
try {
set_frequency();
set_telemetry();
try {
@@
-326,8
+326,7
@@
public class AltosScanUI
return true;
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(owner,
return true;
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(owner,
- String.format("Cannot open device \"%s\"",
- device.toShortString()),
+ ee.getMessage(),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
@@
-361,7
+360,7
@@
public class AltosScanUI
owner = in_owner;
owner = in_owner;
- frequencies = AltosPreferences.common_frequencies();
+ frequencies = Altos
UI
Preferences.common_frequencies();
frequency_index = 0;
telemetry = Altos.ao_telemetry_min;
frequency_index = 0;
telemetry = Altos.ao_telemetry_min;
@@
-402,7
+401,7
@@
public class AltosScanUI
c.gridy = 2;
pane.add(telemetry_label, c);
c.gridy = 2;
pane.add(telemetry_label, c);
- int scanning_telemetry = AltosPreferences.scanning_telemetry();
+ int scanning_telemetry = Altos
UI
Preferences.scanning_telemetry();
telemetry_boxes = new JCheckBox[Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1];
for (int k = Altos.ao_telemetry_min; k <= Altos.ao_telemetry_max; k++) {
int j = k - Altos.ao_telemetry_min;
telemetry_boxes = new JCheckBox[Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1];
for (int k = Altos.ao_telemetry_min; k <= Altos.ao_telemetry_max; k++) {
int j = k - Altos.ao_telemetry_min;