Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix v1.0.2 #43

Open
wants to merge 5 commits into
base: bugfix-v1.0.2
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Timestamp issues #7
The thing is that if frasec: resolves as False if frasec is zero.

We will fix this issue by checking if frasec is not None: (and if soc is not None:).
Methods set_soc() and set_frasec() will validate values.
Skalar2001 committed Jul 28, 2022
commit 286a245a4a6210a0a5f03545214f481a6af9f05a
4 changes: 2 additions & 2 deletions synchrophasor/frame.py
Original file line number Diff line number Diff line change
@@ -226,12 +226,12 @@ def set_time(self, soc=None, frasec=None):

t = time() # Get current timestamp

if soc:
if soc is not None:
self.set_soc(soc)
else:
self.set_soc(int(t)) # Get current timestamp

if frasec:
if frasec is not None:
if isinstance(frasec, collections.Sequence):
self.set_frasec(*frasec)
else: