+ tracker_motion_value.setToolTipText("This device doesn't disable logging when stationary");
+ if (tracker_interval_value.isVisible())
+ tracker_interval_value.setToolTipText("How often to report GPS position");
+ else
+ tracker_interval_value.setToolTipText("This device can't configure interval");
+ }
+
+ public void set_tracker_motion(int tracker_motion) {
+ if (tracker_motion != AltosLib.MISSING)
+ tracker_motion_value.setSelectedItem(AltosConvert.height.say(tracker_motion));
+ tracker_motion_label.setVisible(tracker_motion != AltosLib.MISSING);
+ tracker_motion_value.setVisible(tracker_motion != AltosLib.MISSING);
+ }
+
+ public int tracker_motion() throws AltosConfigDataException {
+ if (tracker_motion_value.isVisible()) {
+ String str = tracker_motion_value.getSelectedItem().toString();
+ try {
+ return (int) (AltosConvert.height.parse_locale(str) + 0.5);
+ } catch (ParseException pe) {
+ throw new AltosConfigDataException("invalid tracker motion %s", str);
+ }
+ }
+ return AltosLib.MISSING;
+ }
+
+ public void set_tracker_interval(int tracker_interval) {
+ if (tracker_interval != AltosLib.MISSING)
+ tracker_interval_value.setSelectedItem(String.format("%d", tracker_interval));
+ tracker_interval_label.setVisible(tracker_interval != AltosLib.MISSING);
+ tracker_interval_value.setVisible(tracker_interval != AltosLib.MISSING);
+ }
+
+ public int tracker_interval() throws AltosConfigDataException {
+ if (tracker_interval_value.isVisible())
+ return parse_int ("tracker interval", tracker_interval_value.getSelectedItem().toString(), false);
+ return AltosLib.MISSING;
+ }
+
+ public void set_aprs_interval(int new_aprs_interval) {
+ if (new_aprs_interval != AltosLib.MISSING)
+ aprs_interval_value.setSelectedItem(Integer.toString(new_aprs_interval));
+ aprs_interval_value.setVisible(new_aprs_interval != AltosLib.MISSING);
+ aprs_interval_label.setVisible(new_aprs_interval != AltosLib.MISSING);