Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
auke.klazema
dt_ctrl
Commits
d72360d8
Commit
d72360d8
authored
Sep 13, 2013
by
Jeroen Vreeken
Browse files
Last few fixes for new console and controller
parent
4311b6a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
d72360d8
...
...
@@ -75,8 +75,12 @@ rel_trace: rel_utils
$(MAKE)
-C
$(REL_BUILD_DIR)
/common/trace
>
/dev/null
;
\
echo
" Done"
rel_log
:
@
echo
"****** Building common/log"
;
\
$(MAKE)
-C
$(REL_BUILD_DIR)
/common/log
>
/dev/null
;
\
echo
" Done"
rel_ctrl
:
rel_trace
rel_ctrl
:
rel_trace
rel_log
@
echo
"****** Building controller"
;
\
$(MAKE)
-C
$(REL_BUILD_DIR)
/controller
>
/dev/null
;
\
echo
" Done"
...
...
@@ -88,7 +92,7 @@ rel_libnova: rel_clone_dir
echo
" Done"
rel_cons
:
rel_trace rel_libnova
rel_cons
:
rel_trace rel_libnova
rel_log
@
echo
"****** Building console"
;
\
$(MAKE)
-C
$(REL_BUILD_DIR)
/console
>
/dev/null
;
\
echo
" Done"
...
...
console/console/log_proxy.c
View file @
d72360d8
...
...
@@ -100,14 +100,16 @@ int main (int argc, char **argv)
int
fdnew
;
fd_set
fd_rd
;
struct
timeval
timeout
;
int
high
;
int
high
=
0
;
timeout
.
tv_usec
=
0
;
timeout
.
tv_sec
=
1
;
FD_ZERO
(
&
fd_rd
);
FD_SET
(
fd_log
,
&
fd_rd
);
high
=
fd_log
;
if
(
fd_log
>=
0
)
{
FD_SET
(
fd_log
,
&
fd_rd
);
high
=
fd_log
;
}
FD_SET
(
fd_listen
,
&
fd_rd
);
high
=
MAX
(
high
,
fd_listen
);
command_server_fdset_add
(
cmd_srv
,
&
fd_rd
,
&
high
);
...
...
console/console/trace_proxy.c
View file @
d72360d8
...
...
@@ -103,7 +103,7 @@ struct trace *trace_open (char *name)
fd
=
tcp_connect
(
tr_host
,
tr_port
);
if
(
fd
<
0
)
{
printf
(
"Error connecting
\n
"
);
printf
(
"Error connecting
to %s:%d
\n
"
,
tr_host
,
tr_port
);
return
NULL
;
}
...
...
controller/ec/ec.c
View file @
d72360d8
...
...
@@ -793,13 +793,11 @@ void ec_datagram_sample(void)
static
int
init_done
=
0
;
static
bool
init_success
=
false
;
static
bool
init_done
=
false
;
bool
ec_initialized
(
void
)
{
return
init_
success
;
return
init_
done
;
}
int
ec_init
(
char
*
ifname
,
bool
single_cycle
)
...
...
@@ -834,9 +832,9 @@ int ec_init(char *ifname, bool single_cycle)
eth_timeout_set
(
ec_sock
,
&
timeout
,
&
timeout
);
if
(
ec_slave_count
()
>=
0
)
{
init_success
=
true
;
log_send
(
LOG_T_DEBUG
,
"Found ethercat slaves"
)
;
}
else
{
goto
err_init
;
log_send
(
LOG_T_WARNING
,
"No ethercat slaves found"
)
;
}
log_send
(
LOG_T_DEBUG
,
"Successfull init, %d slaves found."
,
ec_slave_count
());
...
...
@@ -845,13 +843,10 @@ int ec_init(char *ifname, bool single_cycle)
controller_sample_start_hook
(
ec_datagram_sample_init
,
NULL
);
init_done
=
1
;
init_done
=
true
;
return
0
;
err_init:
close
(
ec_sock
);
ec_sock
=
-
1
;
err_nosocket:
log_send
(
LOG_T_ERROR
,
"Failed to initialize Ethercat subsystem"
);
return
-
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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