Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pfeiffer, Götz
MultiCAN
Commits
bfec074d
Commit
bfec074d
authored
Nov 13, 2019
by
Franksen, Benjamin
Browse files
scan: improve error messages in sci_listen
parent
1a6b5d0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
MultiCAN/src/drivers/scan/scan.c
View file @
bfec074d
...
...
@@ -529,7 +529,8 @@ static void sci_listen(void *parg) {
memset
(
&
frame
,
0
,
sizeof
(
frame
));
nbytes
=
port
->
methods
->
read
(
port
->
driver_pvt
,
&
frame
);
if
(
nbytes
<
0
)
{
errlogSevPrintf
(
errlogFatal
,
"sci_listen: read failed (%s)
\n
"
,
ERRNO_STR
(
buf
));
errlogSevPrintf
(
errlogFatal
,
"sci_listen: lost connection to CAN port %d
\n
"
,
port
->
port_num
);
port
->
connected
=
0
;
}
else
{
#if 0
...
...
@@ -549,7 +550,7 @@ static void sci_listen(void *parg) {
#endif
if
(
port
->
methods
->
write
(
port
->
driver_pvt
,
&
parent
->
frame
)
<
0
)
{
errlogSevPrintf
(
errlogFatal
,
"sci_listen: automatic rtr response failed on port %d (%s)
\n
"
,
"sci_listen: automatic rtr response failed on
CAN
port %d (%s)
\n
"
,
port
->
port_num
,
ERRNO_STR
(
buf
));
}
}
...
...
@@ -577,7 +578,7 @@ static void sci_listen(void *parg) {
port
->
connected
=
(
port
->
methods
->
connect
(
port
->
driver_pvt
)
==
0
);
if
(
port
->
connected
)
{
errlogSevPrintf
(
errlogInfo
,
"sci_listen: successfully re-connected port %d
\n
"
,
"sci_listen: successfully re-connected
CAN
port %d
\n
"
,
port
->
port_num
);
}
}
...
...
Write
Preview
Supports
Markdown
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