Changeset 4243 in josm for trunk/src/org


Ignore:
Timestamp:
2011-07-14T18:05:50+02:00 (13 years ago)
Author:
stoecker
Message:

fix track coloring and NMEA import

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r4230 r4243  
    605605        putDefault(key, Integer.toString(def));
    606606        String v = get(key);
    607         if(null == v)
     607        if(v.isEmpty())
    608608            return def;
    609609
     
    619619        putDefault(key, Integer.toString(def));
    620620        String v = get(key+"."+specName);
    621         if(null == v)
     621        if(v.isEmpty())
    622622            v = get(key);
    623         if(null == v)
     623        if(v.isEmpty())
    624624            return def;
    625625
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r3083 r4243  
    266266
    267267            // handle the packet content
    268             if(e[0].equals("$GPGGA")) {
     268            if(e[0].equals("$GPGGA") || e[0].equals("$GNGGA")) {
    269269                // Position
    270270                LatLon latLon = parseLatLon(
     
    346346                    }
    347347                }
    348             } else if(e[0].equals("$GPVTG")) {
     348            } else if(e[0].equals("$GPVTG") || e[0].equals("$GNVTG")) {
    349349                // COURSE
    350350                accu = e[GPVTG.COURSE_REF.position];
     
    367367                    }
    368368                }
    369             } else if(e[0].equals("$GPGSA")) {
     369            } else if(e[0].equals("$GPGSA") || e[0].equals("$GNGSA")) {
    370370                // vdop
    371371                accu=e[GPGSA.VDOP.position];
     
    384384                }
    385385            }
    386             else if(e[0].equals("$GPRMC")) {
     386            else if(e[0].equals("$GPRMC") || e[0].equals("$GNRMC")) {
    387387                // coordinates
    388388                LatLon latLon = parseLatLon(
Note: See TracChangeset for help on using the changeset viewer.