# HG changeset patch # User paul # Date 2017-02-07 08:34:37 # Node ID 698df4d9c94459702baa59a24593580895bb997f # Parent c2bf5d0fa3518ef1202297f27aba476ecd976089 3.2.0.1 AVGV task started properly diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,7 +64,7 @@ option(FSW_debug_tch "?" OFF) set(SW_VERSION_N1 "3" CACHE STRING "Choose N1 FSW Version." FORCE) set(SW_VERSION_N2 "2" CACHE STRING "Choose N2 FSW Version." FORCE) set(SW_VERSION_N3 "0" CACHE STRING "Choose N3 FSW Version." FORCE) -set(SW_VERSION_N4 "0" CACHE STRING "Choose N4 FSW Version." FORCE) +set(SW_VERSION_N4 "1" CACHE STRING "Choose N4 FSW Version." FORCE) if(FSW_verbose) add_definitions(-DPRINT_MESSAGES_ON_CONSOLE) diff --git a/src/fsw_init.c b/src/fsw_init.c --- a/src/fsw_init.c +++ b/src/fsw_init.c @@ -26,7 +26,7 @@ #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_MAXIMUM_TASKS 20 +#define CONFIGURE_MAXIMUM_TASKS 21 // number of tasks concurrently active including INIT #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 @@ -34,7 +34,7 @@ #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) #define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT) #define CONFIGURE_MAXIMUM_DRIVERS 16 -#define CONFIGURE_MAXIMUM_PERIODS 5 +#define CONFIGURE_MAXIMUM_PERIODS 5 // [hous] [load] [avgv] #define CONFIGURE_MAXIMUM_TIMERS 5 // [spiq] [link] [spacewire_reset_link] #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 5 #ifdef PRINT_STACK_REPORT @@ -357,6 +357,7 @@ void create_names( void ) // create all */ // task names + Task_name[TASKID_AVGV] = rtems_build_name( 'A', 'V', 'G', 'V' ); Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); @@ -379,6 +380,7 @@ void create_names( void ) // create all // rate monotonic period names name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' ); + name_avgv_rate_monotonic = rtems_build_name( 'A', 'V', 'G', 'V' ); misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' ); misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' ); @@ -568,6 +570,14 @@ int create_all_tasks( void ) // create a RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_HOUS] ); } + if (status == RTEMS_SUCCESSFUL) // AVGV + { + status = rtems_task_create( + Task_name[TASKID_AVGV], TASK_PRIORITY_AVGV, RTEMS_MINIMUM_STACK_SIZE, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVGV] + ); + } return status; } @@ -723,6 +733,13 @@ int start_all_tasks( void ) // start all BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") } } + if (status == RTEMS_SUCCESSFUL) // AVGV + { + status = rtems_task_start( Task_id[TASKID_AVGV], avgv_task, 1 ); + if (status!=RTEMS_SUCCESSFUL) { + BOOT_PRINTF("in INIT *** Error starting TASK_AVGV\n") + } + } if (status == RTEMS_SUCCESSFUL) // DUMB { status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); diff --git a/src/fsw_misc.c b/src/fsw_misc.c --- a/src/fsw_misc.c +++ b/src/fsw_misc.c @@ -421,7 +421,6 @@ rtems_task avgv_task(rtems_task_argument if (k == (MOVING_AVERAGE-1)) { k = 0; - PRINTF("tick\n"); } else { diff --git a/src/tc_handler.c b/src/tc_handler.c --- a/src/tc_handler.c +++ b/src/tc_handler.c @@ -297,8 +297,6 @@ int action_update_info(ccsdsTelecommandP | (bytePosPtr[ BYTE_POS_UPDATE_INFO_PARAMETERS_SET1 ] & 1); // REACTION_WHEELS_FREQUENCY, copy the incoming parameters in the local variable (to be copied in HK packets) - - //cp_rpw_sc_rw_f_flags = bytePosPtr[ BYTE_POS_UPDATE_INFO_CP_RPW_SC_RW_F_FLAGS ]; getReactionWheelsFrequencies( TC ); set_hk_lfr_sc_rw_f_flags(); build_sy_lfr_rw_masks();