Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • selsky/ntpsec
  • armbiant/gnome-ntpsec
  • smallm/ntpsec
  • devicenull/ntpsec
  • paelzer/ntpsec
  • mvangund/ntpsec
  • fe051/ntpsec
  • ollie314/ntpsec
  • rlaager/ntpsec
  • fhgwright/ntpsec
  • phirephly/ntpsec
  • Omnifarious/ntpsec
  • ghane/ntpsec
  • antranigv/ntpsec
  • pakarsolusitelematika/ntpsec
  • ianbruene/ntpsec
  • wingel/ntpsec
  • katyaBeck/ntpsec
  • akumiszcza/ntpsec
  • rouing/ntpsec
  • NTPsec/ntpsec
  • mlichvar/ntpsec
  • ktims/ntpsec
  • fararano.kevin/ntpsec
  • phillipcharleshart/ntpsec
  • SPACE001/ntpsec
  • thomasdstewart/ntpsec
  • testsleeek/ntpsec
  • NeatNerdPrime/ntpsec
  • marcinbrodowski35/ntpsec
  • AbbasDev/ntpsec
  • jurgen.xhelo/ntpsec
  • Wan10/ntpsec
  • BrnoPCmaniak/ntpsec
  • anastrophe/ntpsec
  • georgyo/ntpsec
  • mikie.simpson/ntpsec
  • OptimalRanging/ntpsec
  • toofishes/ntpsec
  • Jandrusk/ntpsec
  • sdwalker/ntpsec
  • mnordhoff/ntpsec
  • cjmayo/ntpsec
  • micromax/ntpsec
  • tychotithonus/ntpsec
  • ddrown/ntpsec
  • brendanbank/ntpsec
  • jh23453/ntpsec
  • samifarin/ntpsec
  • miller24joseph/ntpsec
  • AZDNice/ntpsec
  • lnceballos/ntpsec
  • gabriel-ku/ntpsec
  • psreport/ntpsec
  • thesamesam/ntpsec
  • alexk7/ntpsec
  • RRZEFox/ntpsec
  • m_by/ntpsec
  • jameshilliard/ntpsec
  • daemoneye/ntpsec
  • xgerault/ntpsec
  • permanent-vacations/ntpsec
  • o.zeynalpour/ntpsec
  • ravi.love.nippy/ntpsec
  • jhamlin96/ntpsec
  • abaehr/ntpsec
  • accidentallythecable-public/forks/ntpsec
  • james.jstroud/ntpsec
  • youwt19821020/ntpsec-no-root
  • jamesb_fe80/ntpsec
  • demsjf8/ntpsec
  • yegorich/ntpsec
  • 1963bib/ntpsec
  • armbiant/gnome-ntp
  • chucalu/ntpsec
  • folkertvanheusden/ntpsec
  • mktyler/ntpsec
  • 19bcs2794/ntpsec
  • LOCNNIL/ntpsec
  • lifeofguenter/ntpsec
  • trv-n/ntpsec-trimble-3
  • szepeviktor/ntpsec
  • lightswitch05/ntpsec
  • m_msft/ntpsec
84 results
Show changes
Commits on Source (2)
......@@ -14,6 +14,8 @@ on user-visible changes.
* Update license file names for REUSE compliance.
* Fix ntploggps issue where count_used_satellites checked before it is initialized.
* Print out OpenSSL version at configure time.
* Enable debug symbols by default, with only an option to disable.
......
#! @PYSHEBANG@
# -*- coding: utf-8 -*-
# Copyright the NTPsec project contributors
# SPDX-License-Identifier: BSD-2-Clause
"""\
usage: ntploggps [-h] [-o] [-l LOGFILE] [-v] [-V]
......@@ -158,29 +160,32 @@ class GpsPoller(threading.Thread):
if self.gpsd.read() == -1:
self.running = False
break
if hasattr(self.gpsd, "data"):
if self.gpsd.data.get("class", None) == "SKY":
satellite_list = self.gpsd.data.get(
"satellites", None
)
if satellite_list is not None:
count_used_satellites = sum(
map(lambda x: x.used, satellite_list)
)
time_dilution = self.gpsd.data.get("tdop", None)
device_path = self.gpsd.data.get("device", None)
if count_used_satellites is None:
count_used_satellites = self.gpsd.data.get(
"uSat", None
)
if None not in [
count_used_satellites,
time_dilution,
device_path,
]:
self.satellites_used = count_used_satellites
self.tdop = time_dilution
self.device = device_path
if not hasattr(self.gpsd, "data"):
continue
if self.gpsd.data.get("class", None) != "SKY":
continue
satellite_list = self.gpsd.data.get(
"satellites", None
)
count_used_satellites = None
if satellite_list is not None:
count_used_satellites = sum(
map(lambda x: x.used, satellite_list)
)
time_dilution = self.gpsd.data.get("tdop", None)
device_path = self.gpsd.data.get("device", None)
if count_used_satellites is None:
count_used_satellites = self.gpsd.data.get(
"uSat", None
)
if None not in [
count_used_satellites,
time_dilution,
device_path,
]:
self.satellites_used = count_used_satellites
self.tdop = time_dilution
self.device = device_path
@property
def time(self):
......