diff options
| author | Keith Packard <keithp@keithp.com> | 2014-07-04 23:41:16 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-07-05 00:38:10 -0700 | 
| commit | efb86669b5a74f244e2218f3385db633c36208af (patch) | |
| tree | 5dbec18cd814c927b8ceb390f9bedc94d3520396 /altosui/AltosConfigTDUI.java | |
| parent | 9557a24b02911a93d74ee29ce359e40266cb4fed (diff) | |
altosui: Support telemetry data rates
Add combo box to flight UI and flight hardware configuration UIs
Add telemetry rate to the TD/TBT config dialog
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosConfigTDUI.java')
| -rw-r--r-- | altosui/AltosConfigTDUI.java | 32 | 
1 files changed, 32 insertions, 0 deletions
| diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index 947d78ee..b677ad23 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -37,6 +37,7 @@ public class AltosConfigTDUI  	JLabel		frequency_label;  	JLabel		radio_calibration_label;  	JLabel		radio_frequency_label; +	JLabel		rate_label;  	public boolean		dirty; @@ -46,6 +47,7 @@ public class AltosConfigTDUI  	JLabel		serial_value;  	AltosUIFreqList	radio_frequency_value;  	JLabel		radio_calibration_value; +	AltosUIRateList	rate_value;  	JButton		save;  	JButton		reset; @@ -192,6 +194,28 @@ public class AltosConfigTDUI  		radio_calibration_value = new JLabel(String.format("%d", 1186611));  		pane.add(radio_calibration_value, c); +		/* Telemetry Rate */ +		c = new GridBagConstraints(); +		c.gridx = 0; c.gridy = 7; +		c.gridwidth = 4; +		c.fill = GridBagConstraints.NONE; +		c.anchor = GridBagConstraints.LINE_START; +		c.insets = il; +		c.ipady = 5; +		rate_label = new JLabel("Telemetry Rate:"); +		pane.add(rate_label, c); + +		c = new GridBagConstraints(); +		c.gridx = 4; c.gridy = 7; +		c.gridwidth = 4; +		c.fill = GridBagConstraints.HORIZONTAL; +		c.weightx = 1; +		c.anchor = GridBagConstraints.LINE_START; +		c.insets = ir; +		c.ipady = 5; +		rate_value = new AltosUIRateList(); +		pane.add(rate_value, c); +  		/* Buttons */  		c = new GridBagConstraints();  		c.gridx = 0; c.gridy = 12; @@ -339,6 +363,14 @@ public class AltosConfigTDUI  		radio_calibration_value.setText(String.format("%d", calibration));  	} +	public int telemetry_rate() { +		return rate_value.getSelectedIndex(); +	} + +	public void set_telemetry_rate(int rate) { +		rate_value.setSelectedIndex(rate); +	} +  	public void set_clean() {  		dirty = false;  	} | 
