diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-12-15 14:05:41 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-12-15 14:05:41 +0000 |
commit | e11e2739ed561987ee7f6fa3bf458720b80daaab (patch) | |
tree | 322d595efd87580c0ce44670e6b60047b3c7ebb2 /xgps | |
parent | 669ad6b125218cc2d41e234af622f5cdf6ff03cf (diff) | |
download | gpsd-e11e2739ed561987ee7f6fa3bf458720b80daaab.tar.gz |
Uniform handling of unit-system defaults and -u in xgps, cgps, and lcdgps.
Diffstat (limited to 'xgps')
-rwxr-xr-x | xgps | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -28,14 +28,14 @@ class unit_adjustments: self.speedunits = "mph" if units is None: units = gps.client.gpsd_units() - if units in (gps.client.unspecified, gps.client.imperial, "imperial"): + if units in (gps.client.unspecified, gps.client.imperial, "imperial", "i"): pass - elif units in (gps.client.nautical, "nautical"): + elif units in (gps.client.nautical, "nautical", "n"): self.altfactor = gps.METERS_TO_FEET self.altunits = "ft" self.speedfactor = gps.MPS_TO_KNOTS self.speedunits = "knots" - elif units in (gps.client.metric, "metric"): + elif units in (gps.client.metric, "metric", "m"): self.altfactor = 1 self.altunits = "m" self.speedfactor = gps.MPS_TO_KPH |