Changeset 35938 in osm
- Timestamp:
- 2022-03-22T19:33:24+01:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/globalsat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/globalsat/build.xml
r35519 r35938 5 5 <property name="commit.message" value="Changed constructor signature of plugin main class"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 4153"/>7 <property name="plugin.main.version" value="15496"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java
r34120 r35938 23 23 import org.openstreetmap.josm.data.coor.LatLon; 24 24 import org.openstreetmap.josm.data.gpx.GpxData; 25 import org.openstreetmap.josm.data.gpx. ImmutableGpxTrack;25 import org.openstreetmap.josm.data.gpx.GpxTrack; 26 26 import org.openstreetmap.josm.data.gpx.WayPoint; 27 27 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 28 import org.openstreetmap.josm.tools.Logging; 28 29 29 30 import gnu.io.CommPortIdentifier; … … 67 68 };*/ 68 69 /** delete file: A0 A2 00 03 BA FF FF 02 B8 B0 B3 */ 69 private static byte[] dg100CmdDelFile =70 private static final byte[] dg100CmdDelFile = 70 71 {(byte) 0xA0, (byte) 0xA2, (byte) 0x00, (byte) 0x03, (byte) 0xBA, 71 72 (byte) 0xFF, (byte) 0xFF, (byte) 0x02, (byte) 0xB8, (byte) 0xB0, (byte) 0xB3 72 73 }; 73 74 /** get file info: A0 A2 00 03 BB 00 00 00 BB B0 B3 */ 74 private static byte[] dg100CmdGetFileInfo =75 private static final byte[] dg100CmdGetFileInfo = 75 76 {(byte) 0xA0, (byte) 0xA2, (byte) 0x00, (byte) 0x03, (byte) 0xBB, 76 77 (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xBB, (byte) 0xB0, (byte) 0xB3 77 78 }; 78 79 /** get gps recs: A0 A2 00 03 B5 00 02 00 B7 B0 B3 */ 79 private static byte[] dg100CmdGetGpsRecs =80 private static final byte[] dg100CmdGetGpsRecs = 80 81 {(byte) 0xA0, (byte) 0xA2, (byte) 0x00, (byte) 0x03, (byte) 0xB5, 81 82 (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0xB7, (byte) 0xB0, (byte) 0xB3 82 83 }; 83 84 /** read config: A0 A2 00 01 B7 00 B7 B0 B3 */ 84 private static byte[] dg100CmdGetConfig =85 private static final byte[] dg100CmdGetConfig = 85 86 {(byte) 0xA0, (byte) 0xA2, (byte) 0x00, (byte) 0x01, (byte) 0xB7, 86 87 (byte) 0x00, (byte) 0xB7, (byte) 0xB0, (byte) 0xB3 }; … … 89 90 ii dd dd dd dd ee ee ee ee ff ff ff ff 01 xx xx 90 91 B0 B3 */ 91 private static byte[] dg100CmdSetConfig =92 private static final byte[] dg100CmdSetConfig = 92 93 {(byte) 0xA0, (byte) 0xA2, (byte) 0x00, (byte) 0x2A, (byte) 0xB8, 93 94 (byte) 0x02, … … 116 117 , (byte) 0x00, (byte) 0xC0, (byte) 0xB0, (byte) 0xB3};*/ 117 118 118 private byte[] response = new byte[65536];119 120 private CommPortIdentifier portIdentifier;119 private final byte[] response = new byte[65536]; 120 121 private final CommPortIdentifier portIdentifier; 121 122 private SerialPort port = null; 122 123 … … 166 167 progressMonitor.worked(1); 167 168 } 168 result.tracks.add(new ImmutableGpxTrack(Collections.singleton(seg), Collections.<String, Object>emptyMap()));169 result.tracks.add(new GpxTrack(Collections.singleton(seg), Collections.emptyMap())); 169 170 } 170 171 return result; … … 246 247 247 248 private Response<?> sendCmdDelFiles() throws IOException, UnsupportedCommOperationException { 248 System.out.println("deleting data...");249 Logging.info("GlobalSat: GlobalsatDg100: deleting data..."); 249 250 int len = sendCmd(dg100CmdDelFile, response, -1); 250 251 return Response.parseResponse(response, len);
Note:
See TracChangeset
for help on using the changeset viewer.