# HG changeset patch # User paul # Date 2016-02-03 15:46:20 # Node ID 46635fba568970d42f227d709b7ee9bb21b92522 # Parent 95dc36087a621c879ef57c7d00e549efd210f757 added spacewire_get_last_error() call to the function spacewire_read_statistics diff --git a/header/fsw_spacewire.h b/header/fsw_spacewire.h --- a/header/fsw_spacewire.h +++ b/header/fsw_spacewire.h @@ -31,6 +31,7 @@ int spacewire_several_connect_attemps( v void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force void spacewire_set_RE( unsigned char val, unsigned int regAddr ); // RMAP Enable void spacewire_read_statistics( void ); +void spacewire_get_last_error( void ); void update_hk_lfr_last_er_fields(unsigned int rid, unsigned char code); void update_hk_with_grspw_stats(void ); void increase_unsigned_char_counter( unsigned char *counter ); diff --git a/src/fsw_spacewire.c b/src/fsw_spacewire.c --- a/src/fsw_spacewire.c +++ b/src/fsw_spacewire.c @@ -581,6 +581,8 @@ void spacewire_read_statistics( void ) rtems_status_code status; spw_stats current; + spacewire_get_last_error(); + // read the current statistics status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, ¤t );