- Timestamp:
- Sep 24, 2017, 3:42:06 PM (9 years ago)
- Branches:
- 0.5, debian/bullseye, debian/jessie, master
- Children:
- 26f77a6, 2913846
- Parents:
- 788611f
- File:
-
- 1 edited
-
src/python/gnuboat/daemon/gpsdpoller.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/python/gnuboat/daemon/gpsdpoller.py
r788611f r584d29a 38 38 39 39 def latitude(self): 40 if self._currentValue == None or self.gpsFix() < 2:40 if self._currentValue is None or self.gpsFix() < 2 or 'lat' not in self._currentValue: 41 41 return 0 42 42 return self._currentValue.lat … … 46 46 47 47 def longitude(self): 48 if self._currentValue == None or self.gpsFix() < 2:48 if self._currentValue is None or self.gpsFix() < 2 or 'lon' not in self._currentValue: 49 49 return 0 50 50 return self._currentValue.lon … … 54 54 55 55 def speedOverGround(self): 56 if self._currentValue == None or self.gpsFix() < 2:56 if self._currentValue is None or self.gpsFix() < 2 or 'speed' not in self._currentValue: 57 57 return 0 58 58 return self._currentValue.speed 59 59 60 60 def courseOverGround(self): 61 if self._currentValue == None or self.gpsFix() < 2:61 if self._currentValue is None or self.gpsFix() < 2 or 'track' not in self._currentValue: 62 62 return 0 63 63 return self._currentValue.track 64 64 65 65 def gpsFix(self): 66 if self._currentValue ==None or 'mode' not in self._currentValue:66 if self._currentValue is None or 'mode' not in self._currentValue: 67 67 return 0 68 68 return self._currentValue.mode 69 69 70 70 def status(self): 71 if self._currentValue ==None or self.gpsFix() < 2:71 if self._currentValue is None or self.gpsFix() < 2: 72 72 return 'V' 73 73 return 'A' 74 74 75 75 def timeUtc(self): 76 if self._currentValue == None or self.gpsFix() < 2:76 if self._currentValue is None or self.gpsFix() < 2 or 'time' not in self._currentValue: 77 77 return None 78 78 currentTime = self._currentValue.time
Note:
See TracChangeset
for help on using the changeset viewer.
