Changeset 33854 in osm for applications/editors/josm/plugins/globalsat/src/org
- Timestamp:
- 2017-11-21T01:50:06+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/globalsat/src/org
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/Dg100Config.java
r30738 r33854 12 12 import java.util.Properties; 13 13 14 import org.openstreetmap.josm. Main;14 import org.openstreetmap.josm.tools.Logging; 15 15 16 16 /** … … 466 466 props.store(os, "dg100 config"); 467 467 } catch (Exception ex) { 468 Main.error(ex);468 Logging.error(ex); 469 469 throw ex; 470 470 } … … 477 477 props.load(is); 478 478 } catch (Exception ex) { 479 Main.error(ex);;479 Logging.error(ex);; 480 480 throw ex; 481 481 } -
applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/FileInfoRec.java
r13497 r33854 24 24 } 25 25 26 @Override 26 27 public String toString() 27 28 { -
applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/GpsRec.java
r29854 r33854 68 68 } 69 69 70 /** 71 * @see java.lang.Object#equals(java.lang.Object) 72 */ 70 @Override 73 71 public boolean equals(Object arg0) 74 72 { … … 142 140 } 143 141 142 @Override 144 143 public String toString() 145 144 { … … 230 229 int scale = 1000000; 231 230 double deg = 9999.9999; 232 double degScaled = (double)(gsLatOrLon / scale);233 double minScaled = ( (double)(gsLatOrLon - degScaled * scale)) / 600000.0;231 double degScaled = gsLatOrLon / scale; 232 double minScaled = (gsLatOrLon - degScaled * scale) / 600000.0; 234 233 deg = degScaled + minScaled; 235 234 return deg; … … 432 431 public double getAltitude() 433 432 { 434 return dg100Altitude / (double)10000.0;433 return dg100Altitude / 10000.0; 435 434 } 436 435 437 436 public double getSpeed() 438 437 { 439 return dg100Speed / (double)360.0;438 return dg100Speed / 360.0; 440 439 } 441 440 -
applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatConfigDialog.java
r33394 r33854 33 33 public class GlobalsatConfigDialog extends JPanel { 34 34 35 public class IntegerTextField extends JTextField {35 public static class IntegerTextField extends JTextField { 36 36 37 37 IntegerTextField() { -
applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java
r33009 r33854 38 38 public class GlobalsatDg100 { 39 39 40 public class ConnectionException extends Exception {40 public static class ConnectionException extends Exception { 41 41 ConnectionException(Exception cause) { 42 42 super(cause); -
applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatPlugin.java
r32649 r33854 15 15 import org.openstreetmap.josm.actions.JosmAction; 16 16 import org.openstreetmap.josm.data.gpx.GpxData; 17 import org.openstreetmap.josm.gui.MainApplication; 17 18 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 18 19 import org.openstreetmap.josm.gui.layer.GpxLayer; … … 20 21 import org.openstreetmap.josm.plugins.Plugin; 21 22 import org.openstreetmap.josm.plugins.PluginInformation; 23 import org.openstreetmap.josm.tools.Logging; 22 24 import org.openstreetmap.josm.tools.Shortcut; 23 25 import org.xml.sax.SAXException; … … 59 61 @Override protected void finish() { 60 62 if (deleteAfter && GlobalsatPlugin.dg100().isCanceled() == false) { 61 Main.pref.put ("globalsat.deleteAfterDownload", true);63 Main.pref.putBoolean("globalsat.deleteAfterDownload", true); 62 64 try { 63 65 GlobalsatPlugin.dg100().deleteData(); … … 66 68 } 67 69 } else { 68 Main.pref.put ("globalsat.deleteAfterDownload", false);70 Main.pref.putBoolean("globalsat.deleteAfterDownload", false); 69 71 } 70 72 if (data != null && data.hasTrackPoints()) { 71 Main .getLayerManager().addLayer(new GpxLayer(data, tr("imported data from {0}", "DG 100")));72 Main .map.repaint();73 MainApplication.getLayerManager().addLayer(new GpxLayer(data, tr("imported data from {0}", "DG 100"))); 74 MainApplication.getMap().repaint(); 73 75 } else { 74 76 JOptionPane.showMessageDialog(Main.parent, tr("No data found on device.")); … … 99 101 String msg = tr("Cannot load library rxtxSerial. If you need support to install it try Globalsat homepage at http://www.raphael-mack.de/josm-globalsat-gpx-import-plugin/"); 100 102 // CHECKSTYLE.ON: LineLength 101 Main.error(msg);103 Logging.error(msg); 102 104 if (!GraphicsEnvironment.isHeadless()) { 103 105 JOptionPane.showMessageDialog(Main.parent, "<html>" + msg + "</html>"); … … 106 108 if (!error) { 107 109 importAction = new GlobalsatImportAction(); 108 Main .main.menu.toolsMenu.add(importAction);110 MainApplication.getMenu().toolsMenu.add(importAction); 109 111 } 110 112 } 111 113 112 class GlobalsatImportAction extends JosmAction {114 static class GlobalsatImportAction extends JosmAction { 113 115 GlobalsatImportAction() { 114 116 super(tr("Globalsat Import"), "globalsatImport", … … 127 129 setPortIdent(dialog.getPort()); 128 130 ImportTask task = new ImportTask(dialog.deleteFilesAfterDownload()); 129 Main .worker.execute(task);131 MainApplication.worker.execute(task); 130 132 } 131 133 dlg.dispose();
Note:
See TracChangeset
for help on using the changeset viewer.