From 24b700e1c4966aa7aefdefbb20288a40f426600a Mon Sep 17 00:00:00 2001 From: Andreas Karlsson Date: Wed, 1 Jul 2020 21:31:27 +0200 Subject: [PATCH] Init CoE SDO defaults on SOES stack init The init of COE SDO defaults shall not be part of the state machine according to ETG. Move the init to SOES stack init where it will only be run once. Small editorial changes on function and paranthesis to unify in that function. --- soes/ecat_slv.c | 12 +++++++----- soes/esc.c | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/soes/ecat_slv.c b/soes/ecat_slv.c index bcf3164..16b3fc2 100644 --- a/soes/ecat_slv.c +++ b/soes/ecat_slv.c @@ -368,18 +368,20 @@ void ecat_slv_init (esc_cfg_t * config) #if USE_FOE /* Init FoE */ - FOE_init(); + FOE_init (); #endif #if USE_EOE /* Init EoE */ - EOE_init(); + EOE_init (); #endif /* reset ESC to init state */ ESC_ALstatus (ESCinit); ESC_ALerror (ALERR_NONE); - ESC_stopmbx(); - ESC_stopinput(); - ESC_stopoutput(); + ESC_stopmbx (); + ESC_stopinput (); + ESC_stopoutput (); + /* Init Object Dictionary default values */ + COE_initDefaultValues (); } diff --git a/soes/esc.c b/soes/esc.c index 7c8c12b..f8be93c 100644 --- a/soes/esc.c +++ b/soes/esc.c @@ -978,7 +978,6 @@ void ESC_state (void) { /* get station address */ ESC_address (); - COE_initDefaultValues (); an = ESC_startmbx (ac); break; }