return libaltos.altos_bt_open(this);
}
+ /*
private boolean isAltusMetrum() {
if (getName().startsWith(Altos.bt_product_telebt))
return true;
return false;
}
+ */
public boolean matchProduct(int want_product) {
}
public void set_flight_log_max_limit(int flight_log_max_limit) {
- boolean any_added = false;
+ //boolean any_added = false;
flight_log_max_value.removeAllItems();
for (int i = 0; i < flight_log_max_values.length; i++) {
if (Integer.parseInt(flight_log_max_values[i]) < flight_log_max_limit){
flight_log_max_value.addItem(flight_log_max_values[i]);
- any_added = true;
+ //any_added = true;
}
}
flight_log_max_value.addItem(String.format("%d", flight_log_max_limit));
public void run() {
boolean interrupted = false;
- String line;
+ //String line;
AltosState state = null;
AltosState old_state = null;
boolean told;
ee.getLocalizedMessage(),
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof TimeoutException) {
- TimeoutException te = (TimeoutException) e;
+ //TimeoutException te = (TimeoutException) e;
JOptionPane.showMessageDialog(frame,
String.format("Communications failed with \"%s\"",
device.toShortString()),
public AltosEepromManage(JFrame given_frame) {
- boolean running = false;
+ //boolean running = false;
frame = given_frame;
device = AltosDeviceDialog.show(frame, Altos.product_any);
}
public class AltosEepromSelect extends AltosDialog implements ActionListener {
- private JList list;
+ //private JList list;
private JFrame frame;
JButton ok;
JButton cancel;
if (!select_source_file())
return;
build_dialog();
- flash_task f = new flash_task(this);
+ //flash_task f = new flash_task(this);
}
static void show(JFrame frame) {
static final private Color red = new Color(194,31,31);
static final private Color green = new Color(31,194,31);
static final private Color blue = new Color(31,31,194);
- static final private Color black = new Color(31,31,31);
+ //static final private Color black = new Color(31,31,31);
static final private Color yellow = new Color(194,194,31);
- static final private Color cyan = new Color(31,194,194);
+ //static final private Color cyan = new Color(31,194,194);
static final private Color magenta = new Color(194,31,194);
static private class OverallGraphs {
}
};
- AltosGraphTime.Element e_pad = new AltosGraphTime.StateMarker(Altos.ao_flight_pad, "Pad");
+ //AltosGraphTime.Element e_pad = new AltosGraphTime.StateMarker(Altos.ao_flight_pad, "Pad");
AltosGraphTime.Element e_boost = new AltosGraphTime.StateMarker(Altos.ao_flight_boost, "Boost");
AltosGraphTime.Element e_fast = new AltosGraphTime.StateMarker(Altos.ao_flight_fast, "Fast");
AltosGraphTime.Element e_coast = new AltosGraphTime.StateMarker(Altos.ao_flight_coast, "Coast");
return createGraphsWhich(data, which).get(0);
}
+ /*
private static ArrayList<AltosGraph> createGraphs(
Iterable<AltosDataPoint> data)
{
return createGraphsWhich(data, -1);
}
+ */
private static ArrayList<AltosGraph> createGraphsWhich(
Iterable<AltosDataPoint> data, int which)
}
void info_add_deg(int col, String name, double v, int pos, int neg) {
- int c = pos;
+ //int c = pos;
if (v < 0) {
- c = neg;
+ //c = neg;
v = -v;
}
double deg = Math.floor(v);
state.gps.hour,
state.gps.minute,
state.gps.second);
- int nsat_vis = 0;
+ //int nsat_vis = 0;
int c;
if (state.gps.cc_gps_sat == null)
// based on google js
// http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/10/main.js
// search for fromLatLngToPoint and fromPointToLatLng
+ /*
private static Point2D.Double pt(LatLng latlng, int zoom) {
double scale_x = 256/360.0 * Math.pow(2, zoom);
double scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);
return pt(latlng, scale_x, scale_y);
}
+ */
private static Point2D.Double pt(LatLng latlng,
double scale_x, double scale_y)
private LatLng latlng(double x, double y) {
return latlng(new Point2D.Double(x,y), scale_x, scale_y);
}
+ /*
private LatLng latlng(Point2D.Double pt) {
return latlng(pt, scale_x, scale_y);
}
+ */
ConcurrentHashMap<Point,AltosSiteMapTile> mapTiles = new ConcurrentHashMap<Point,AltosSiteMapTile>();
Point2D.Double centre;
AltosSiteMap asm = new AltosSiteMap(true);
asm.centre = asm.getBaseLocation(lat, lng);
- Point2D.Double p = new Point2D.Double();
- Point2D.Double p2;
+ //Point2D.Double p = new Point2D.Double();
+ //Point2D.Double p2;
int dx = -w/2, dy = -h/2;
for (int y = dy; y < h+dy; y++) {
for (int x = dx; x < w+dx; x++) {
public AltosSiteMap(int in_radius) {
radius = in_radius;
- GrabNDrag scroller = new GrabNDrag(comp);
+ //GrabNDrag scroller = new GrabNDrag(comp);
comp.setLayout(layout);
public void run() {
try {
URLConnection uc = url.openConnection();
- int length = uc.getContentLength();
+ //int length = uc.getContentLength();
InputStreamReader in_stream = new InputStreamReader(uc.getInputStream(), Altos.unicode_set);
BufferedReader in = new BufferedReader(in_stream);
c.weighty = 1;
b = new JButton(label);
- Dimension ps = b.getPreferredSize();
+ //Dimension ps = b.getPreferredSize();
gridbag.setConstraints(b, c);
add(b, c);
return null;
}
AltosRecordIterable recs;
- AltosReplayReader reader;
+ //AltosReplayReader reader;
if (file.getName().endsWith("eeprom")) {
recs = new AltosEepromIterable(in);
} else {