Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
ntpsec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
NTPsec
ntpsec
Compare revisions
86bc7f9837134185d7a715dfc0fd8532804a9e1f to a7ef828c03ccc27bf94bad3b0b374fcc0e323388
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
NTPsec/ntpsec
Select target project
No results found
a7ef828c03ccc27bf94bad3b0b374fcc0e323388
Select Git revision
Swap
Target
NTPsec/ntpsec
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
86bc7f9837134185d7a715dfc0fd8532804a9e1f
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Fix issue where count_used_satellites checked before it is initialized.
· 8364cab6
James Browning
authored
1 year ago
and
Matt Selsky
committed
1 year ago
8364cab6
ntploggps: Remove an arrow anti-pattern.
· a7ef828c
James Browning
authored
1 year ago
and
Matt Selsky
committed
1 year ago
a7ef828c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS.adoc
+2
-0
2 additions, 0 deletions
NEWS.adoc
ntpclients/ntploggps.py
+28
-23
28 additions, 23 deletions
ntpclients/ntploggps.py
with
30 additions
and
23 deletions
NEWS.adoc
View file @
a7ef828c
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
ntpclients/ntploggps.py
View file @
a7ef828c
#! @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
):
...
...
This diff is collapsed.
Click to expand it.