diff options
author | Beat Bolli <bbolli@ewanet.ch> | 2013-10-21 20:34:57 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-22 13:37:15 -0400 |
commit | 72deaf74569dece8f15af9075f12ea5b86d6ecd3 (patch) | |
tree | a7a072407b8cc67ac02d8a58384515f4487b383c /contrib/webgps.py | |
parent | 11c2e2e8906dab0ede540263990942f76a9d9577 (diff) | |
download | gpsd-72deaf74569dece8f15af9075f12ea5b86d6ecd3.tar.gz |
webgps.py: set self.needsupdate correctly
Diffstat (limited to 'contrib/webgps.py')
-rwxr-xr-x | contrib/webgps.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/webgps.py b/contrib/webgps.py index 8ab0ac40..6907ebc6 100755 --- a/contrib/webgps.py +++ b/contrib/webgps.py @@ -254,14 +254,14 @@ function draw_satview() { t = self.sattrack[prn] except KeyError: self.sattrack[prn] = t = Track(prn) - self.needsupdate += t.add(x, y) + if t.add(x, y): + self.needsupdate = 1 def update_tracks(self): self.make_stale() for s in self.satellites: x, y = polartocart(s.elevation, s.azimuth) - if self.insert_sat(s.PRN, x, y): - self.needsupdate = 1 + self.insert_sat(s.PRN, x, y) self.delete_stale() def generate_html(self, htmlfile, jsfile): |