projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Initialize channel and telemetry before use in ScanUI
[fw/altos]
/
altosui
/
AltosUI.java
diff --git
a/altosui/AltosUI.java
b/altosui/AltosUI.java
index 0fc6583ca11c46771eaf32df6d18a41414fec4a5..6a24d8a996899f915d98d8f9587834d0a892d5a3 100644
(file)
--- a/
altosui/AltosUI.java
+++ b/
altosui/AltosUI.java
@@
-99,7
+99,7
@@
public class AltosUI extends JFrame {
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
if (imgURL != null)
setIconImage(new ImageIcon(imgURL).getImage());
- AltosPreferences.
ini
t(this);
+ AltosPreferences.
set_componen
t(this);
pane = getContentPane();
gridbag = new GridBagLayout();
pane = getContentPane();
gridbag = new GridBagLayout();
@@
-172,6
+172,14
@@
public class AltosUI extends JFrame {
}
});
}
});
+
+ b = addButton(0, 2, "Scan Channels");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ScanChannels();
+ }
+ });
+
setTitle("AltOS");
pane.doLayout();
setTitle("AltOS");
pane.doLayout();
@@
-198,10
+206,6
@@
public class AltosUI extends JFrame {
}
private void ConnectToDevice() {
}
private void ConnectToDevice() {
- AltosBTManage bt_manage;
-
- bt_manage = new AltosBTManage(AltosBTDevice.bt_product_any, this);
- bt_manage.list();
AltosDevice device = AltosDeviceDialog.show(AltosUI.this,
Altos.product_basestation);
AltosDevice device = AltosDeviceDialog.show(AltosUI.this,
Altos.product_basestation);
@@
-223,13
+227,17
@@
public class AltosUI extends JFrame {
}
void FlashImage() {
}
void FlashImage() {
-
new AltosFlashUI
(AltosUI.this);
+
AltosFlashUI.show
(AltosUI.this);
}
void FireIgniter() {
new AltosIgniteUI(AltosUI.this);
}
}
void FireIgniter() {
new AltosIgniteUI(AltosUI.this);
}
+ void ScanChannels() {
+ new AltosScanUI(AltosUI.this);
+ }
+
/*
* Replay a flight from telemetry data
*/
/*
* Replay a flight from telemetry data
*/
@@
-401,9
+409,9
@@
public class AltosUI extends JFrame {
AltosUI altosui = new AltosUI();
altosui.setVisible(true);
AltosUI altosui = new AltosUI();
altosui.setVisible(true);
-
AltosDevice[]
devices = AltosUSBDevice.list(Altos.product_basestation);
- for (
int i = 0; i < devices.length; i++
)
- altosui.telemetry_window(device
s[i]
);
+
java.util.List<AltosDevice>
devices = AltosUSBDevice.list(Altos.product_basestation);
+ for (
AltosDevice device : devices
)
+ altosui.telemetry_window(device);
}
}
}
}
}
}