Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
开源群组
pyprofibus
Commits
5a4f5914
Commit
5a4f5914
authored
4 years ago
by
Michael Buesch
Browse files
Options
Download
Email Patches
Plain Diff
phy_serial: Simplify discard
Signed-off-by:
Michael Buesch
<
m@bues.ch
>
parent
210a819c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
pyprofibus/phy_serial.py
pyprofibus/phy_serial.py
+4
-6
No files found.
pyprofibus/phy_serial.py
View file @
5a4f5914
...
...
@@ -117,12 +117,10 @@ class CpPhySerial(CpPhy):
size
=
-
1
getSize
=
FdlTelegram
.
getSizeFromRaw
if
self
.
__discardTimeout
is
not
None
:
while
self
.
__discardTimeout
is
not
None
:
self
.
__discard
()
if
(
timeout
==
0.0
or
(
timeout
>
0.0
and
monotonic_time
()
>=
timeoutStamp
)):
return
None
while
self
.
__discardTimeout
is
not
None
:
self
.
__discard
()
if
timeout
>
0.0
and
monotonic_time
()
>=
timeoutStamp
:
return
None
try
:
rxBufLen
=
len
(
rxBuf
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment