Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kevin Lyda
gqgmc
Commits
ae38ed03
Commit
ae38ed03
authored
Feb 01, 2017
by
Kevin Lyda
💬
Browse files
Work on GetConfiguration.
parent
68a4c89c
Pipeline
#1233
passed with stage
in 56 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
devices/geiger/gqgmc.go
View file @
ae38ed03
...
...
@@ -452,7 +452,8 @@ func (gc *GQGMCCounter) recv(length int) ([]byte, error) {
}
if
n
!=
length
{
for
i
:=
0
;
i
<
20
;
i
++
{
_
,
err
=
gc
.
port
.
Read
(
buf
[
len
(
buf
)
:
])
fmt
.
Printf
(
"%d "
,
n
)
n
,
err
=
gc
.
port
.
Read
(
buf
[
len
(
buf
)
:
])
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -460,9 +461,11 @@ func (gc *GQGMCCounter) recv(length int) ([]byte, error) {
break
}
}
fmt
.
Printf
(
"%d
\n
"
,
n
)
}
if
n
!=
length
{
return
nil
,
fmt
.
Errorf
(
"Short read (got: %d, wanted: %d)"
,
uint32
(
n
),
length
)
fmt
.
Printf
(
"Short read: %+v
\n
"
,
buf
)
return
nil
,
fmt
.
Errorf
(
"Short read (got: %d, wanted: %d)"
,
n
,
length
)
}
return
buf
,
nil
}
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