summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosConfigUI.java
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2010-11-14 00:29:11 +1000
committerAnthony Towns <aj@erisian.com.au>2010-11-14 00:29:11 +1000
commit9c32b93ef5fb43558fb0179ea1b047e35b7ed6e8 (patch)
tree5b9f4bcd21939cdc76aa1841f1983b0d18caf7f3 /ao-tools/altosui/AltosConfigUI.java
parent991541f57f065f429c6ec425efd6ac731280b2c1 (diff)
parenta6f30fae906bd87dff192c5fd4d10df283f99930 (diff)
Merge branch 'buttonbox' of git://git.gag.com/fw/altos into buttonbox
Diffstat (limited to 'ao-tools/altosui/AltosConfigUI.java')
-rw-r--r--ao-tools/altosui/AltosConfigUI.java43
1 files changed, 38 insertions, 5 deletions
diff --git a/ao-tools/altosui/AltosConfigUI.java b/ao-tools/altosui/AltosConfigUI.java
index 605ccc8b..37128573 100644
--- a/ao-tools/altosui/AltosConfigUI.java
+++ b/ao-tools/altosui/AltosConfigUI.java
@@ -57,6 +57,7 @@ public class AltosConfigUI
JLabel main_deploy_label;
JLabel apogee_delay_label;
JLabel radio_channel_label;
+ JLabel radio_calibration_label;
JLabel callsign_label;
public boolean dirty;
@@ -68,6 +69,7 @@ public class AltosConfigUI
JComboBox main_deploy_value;
JComboBox apogee_delay_value;
JComboBox radio_channel_value;
+ JTextField radio_calibration_value;
JTextField callsign_value;
JButton save;
@@ -256,7 +258,7 @@ public class AltosConfigUI
radio_channel_value.addItemListener(this);
pane.add(radio_channel_value, c);
- /* Callsign */
+ /* Radio Calibration */
c = new GridBagConstraints();
c.gridx = 0; c.gridy = 6;
c.gridwidth = 3;
@@ -264,11 +266,34 @@ public class AltosConfigUI
c.anchor = GridBagConstraints.LINE_START;
c.insets = il;
c.ipady = 5;
+ radio_calibration_label = new JLabel("RF Calibration:");
+ pane.add(radio_calibration_label, c);
+
+ c = new GridBagConstraints();
+ c.gridx = 3; c.gridy = 6;
+ c.gridwidth = 3;
+ c.fill = GridBagConstraints.HORIZONTAL;
+ c.weightx = 1;
+ c.anchor = GridBagConstraints.LINE_START;
+ c.insets = ir;
+ c.ipady = 5;
+ radio_calibration_value = new JTextField(String.format("%d", 1186611));
+ radio_calibration_value.getDocument().addDocumentListener(this);
+ pane.add(radio_calibration_value, c);
+
+ /* Callsign */
+ c = new GridBagConstraints();
+ c.gridx = 0; c.gridy = 7;
+ c.gridwidth = 3;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.LINE_START;
+ c.insets = il;
+ c.ipady = 5;
callsign_label = new JLabel("Callsign:");
pane.add(callsign_label, c);
c = new GridBagConstraints();
- c.gridx = 3; c.gridy = 6;
+ c.gridx = 3; c.gridy = 7;
c.gridwidth = 3;
c.fill = GridBagConstraints.HORIZONTAL;
c.weightx = 1;
@@ -281,7 +306,7 @@ public class AltosConfigUI
/* Buttons */
c = new GridBagConstraints();
- c.gridx = 0; c.gridy = 7;
+ c.gridx = 0; c.gridy = 8;
c.gridwidth = 6;
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.LINE_START;
@@ -292,7 +317,7 @@ public class AltosConfigUI
save.setActionCommand("save");
c = new GridBagConstraints();
- c.gridx = 0; c.gridy = 7;
+ c.gridx = 0; c.gridy = 8;
c.gridwidth = 6;
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.CENTER;
@@ -303,7 +328,7 @@ public class AltosConfigUI
reset.setActionCommand("reset");
c = new GridBagConstraints();
- c.gridx = 0; c.gridy = 7;
+ c.gridx = 0; c.gridy = 8;
c.gridwidth = 6;
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.LINE_END;
@@ -415,6 +440,14 @@ public class AltosConfigUI
return radio_channel_value.getSelectedIndex();
}
+ public void set_radio_calibration(int new_radio_calibration) {
+ radio_calibration_value.setText(String.format("%d", new_radio_calibration));
+ }
+
+ public int radio_calibration() {
+ return Integer.parseInt(radio_calibration_value.getText());
+ }
+
public void set_callsign(String new_callsign) {
callsign_value.setText(new_callsign);
}