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.
pull/82/head
Andreas Karlsson 2020-07-01 21:31:27 +02:00 committed by Hans-Erik Floryd
parent 46240450af
commit 24b700e1c4
2 changed files with 7 additions and 6 deletions

View File

@ -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 ();
}

View File

@ -978,7 +978,6 @@ void ESC_state (void)
{
/* get station address */
ESC_address ();
COE_initDefaultValues ();
an = ESC_startmbx (ac);
break;
}