Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
dsview
Commits
5d7e3237
Commit
5d7e3237
authored
10 years ago
by
DreamSourceLab
Browse files
Options
Download
Plain Diff
Merge pull request #18 from flattermann/dsserial
Serial Decoder: Improved start/stop signal detection
parents
57d65ac5
cbeadbd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
DSLogic-gui/pv/decoder/dsserial.cpp
DSLogic-gui/pv/decoder/dsserial.cpp
+3
-5
No files found.
DSLogic-gui/pv/decoder/dsserial.cpp
View file @
5d7e3237
...
...
@@ -148,11 +148,9 @@ void dsSerial::decode()
stop_index
=
flag_index
+
ceil
((
_bits
+
(
_parity
!=
-
1
)
+
1
)
*
samplesPerBit
);
if
(
left
<
right
)
{
for
(
i
=
0
;
i
<
_stopbits
*
samplesPerBit
;
i
++
)
{
if
(
_idle_level
!=
((
snapshot
->
get_sample
(
stop_index
+
i
)
&
1ULL
<<
_serial_index
)
!=
0
))
{
stop_err
=
true
;
break
;
}
left
-=
0.5
*
samplesPerBit
;
if
(
_idle_level
!=
((
snapshot
->
get_sample
(
stop_index
+
0.5
*
samplesPerBit
)
&
1ULL
<<
_serial_index
)
!=
0
))
{
stop_err
=
true
;
}
if
(
stop_err
)
{
cur_state
=
StopErr
;
...
...
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