- c.ipady = 5;
- radio_calibration_value = new JTextField("00000000");
- pane.add(radio_calibration_value, c);
+ serial_value = new JTextField("00000000");
+ pane.add(serial_value, c);
+
+ y++;
+
+ if (config == null || AltosLib.has_radio(config.usb_id.pid)) {
+ /* Radio calibration value */
+ c = new GridBagConstraints();
+ c.gridx = 0; c.gridy = y;
+ c.gridwidth = 3;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.LINE_START;
+ c.insets = il;
+ c.ipady = 5;
+ radio_calibration_label = new JLabel("Radio Calibration:");
+ pane.add(radio_calibration_label, c);
+
+ c = new GridBagConstraints();
+ c.gridx = 3; c.gridy = y;
+ 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("00000000");
+ pane.add(radio_calibration_value, c);
+
+ y++;
+ }