# HG changeset patch # User paul # Date 2016-05-25 09:12:21 # Node ID d9dfd2a081bce405a1bdc4c4fd1c5ba965ee2f64 # Parent e5cf3bb5048085c24e42ab501f3b5c061b108fe6 3.1.0.1 #627 diff --git a/FSW-qt/fsw-qt.pro b/FSW-qt/fsw-qt.pro --- a/FSW-qt/fsw-qt.pro +++ b/FSW-qt/fsw-qt.pro @@ -20,7 +20,7 @@ SWVERSION=-1-0 DEFINES += SW_VERSION_N1=3 # major DEFINES += SW_VERSION_N2=1 # minor DEFINES += SW_VERSION_N3=0 # patch -DEFINES += SW_VERSION_N4=0 # internal +DEFINES += SW_VERSION_N4=1 # internal # #QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage diff --git a/src/processing/avf0_prc0.c b/src/processing/avf0_prc0.c --- a/src/processing/avf0_prc0.c +++ b/src/processing/avf0_prc0.c @@ -358,6 +358,7 @@ rtems_task prc0_task( rtems_task_argumen // 3) send the spectral matrix packets status = rtems_message_queue_send( queue_id, ¤t_ring_node_to_send_asm_f0, sizeof( ring_node* ) ); + // change asm ring node current_ring_node_to_send_asm_f0 = current_ring_node_to_send_asm_f0->next; } diff --git a/src/processing/avf1_prc1.c b/src/processing/avf1_prc1.c --- a/src/processing/avf1_prc1.c +++ b/src/processing/avf1_prc1.c @@ -347,8 +347,10 @@ rtems_task prc1_task( rtems_task_argumen current_ring_node_to_send_asm_f1->coarseTime = incomingMsg->coarseTimeNORM; current_ring_node_to_send_asm_f1->fineTime = incomingMsg->fineTimeNORM; current_ring_node_to_send_asm_f1->sid = SID_NORM_ASM_F1; + // 3) send the spectral matrix packets status = rtems_message_queue_send( queue_id_send, ¤t_ring_node_to_send_asm_f1, sizeof( ring_node* ) ); + // change asm ring node current_ring_node_to_send_asm_f1 = current_ring_node_to_send_asm_f1->next; } diff --git a/src/processing/avf2_prc2.c b/src/processing/avf2_prc2.c --- a/src/processing/avf2_prc2.c +++ b/src/processing/avf2_prc2.c @@ -233,8 +233,10 @@ rtems_task prc2_task( rtems_task_argumen current_ring_node_to_send_asm_f2->coarseTime = incomingMsg->coarseTimeNORM; current_ring_node_to_send_asm_f2->fineTime = incomingMsg->fineTimeNORM; current_ring_node_to_send_asm_f2->sid = SID_NORM_ASM_F2; + // 3) send the spectral matrix packets status = rtems_message_queue_send( queue_id_send, ¤t_ring_node_to_send_asm_f2, sizeof( ring_node* ) ); + // change asm ring node current_ring_node_to_send_asm_f2 = current_ring_node_to_send_asm_f2->next; } diff --git a/src/wf_handler.c b/src/wf_handler.c --- a/src/wf_handler.c +++ b/src/wf_handler.c @@ -404,9 +404,9 @@ rtems_task cwf3_task(rtems_task_argument ring_node_cwf3_light.sid = SID_NORM_CWF_F3; ring_node_cwf3_light.status = 0x00; - BOOT_PRINTF("in CWF3 ***\n") + BOOT_PRINTF("in CWF3 ***\n"); - while(1){ + while(1){ // wait for an RTEMS_EVENT rtems_event_receive( RTEMS_EVENT_0, RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); @@ -416,14 +416,14 @@ rtems_task cwf3_task(rtems_task_argument ring_node_to_send_cwf = getRingNodeToSendCWF( 3 ); if ( (parameter_dump_packet.sy_lfr_n_cwf_long_f3 & 0x01) == 0x01) { - PRINTF("send CWF_LONG_F3\n") - ring_node_to_send_cwf_f3->sid = SID_NORM_CWF_LONG_F3; + PRINTF("send CWF_LONG_F3\n"); + ring_node_to_send_cwf_f3->sid = SID_NORM_CWF_LONG_F3; status = rtems_message_queue_send( queue_id, &ring_node_to_send_cwf, sizeof( ring_node* ) ); } else { - PRINTF("send CWF_F3 (light)\n") - send_waveform_CWF3_light( ring_node_to_send_cwf, &ring_node_cwf3_light, queue_id ); + PRINTF("send CWF_F3 (light)\n"); + send_waveform_CWF3_light( ring_node_to_send_cwf, &ring_node_cwf3_light, queue_id ); } } @@ -460,23 +460,27 @@ rtems_task cwf2_task(rtems_task_argument PRINTF1("in CWF2 *** ERR get_message_queue_id_send %d\n", status) } - BOOT_PRINTF("in CWF2 ***\n") + BOOT_PRINTF("in CWF2 ***\n"); - while(1){ + while(1){ // wait for an RTEMS_EVENT// send the snapshot when built status = rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ); rtems_event_receive( RTEMS_EVENT_MODE_NORM_S1_S2 | RTEMS_EVENT_MODE_BURST, RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); ring_node_to_send = getRingNodeToSendCWF( 2 ); if (event_out == RTEMS_EVENT_MODE_BURST) - { + { // data are sent whatever the transition time status = rtems_message_queue_send( queue_id, &ring_node_to_send, sizeof( ring_node* ) ); } else if (event_out == RTEMS_EVENT_MODE_NORM_S1_S2) { if ( lfrCurrentMode == LFR_MODE_SBM2 ) { - status = rtems_message_queue_send( queue_id, &ring_node_to_send, sizeof( ring_node* ) ); + // data are sent depending on the transition time + if ( time_management_regs->coarse_time >= lastValidEnterModeTime) + { + status = rtems_message_queue_send( queue_id, &ring_node_to_send, sizeof( ring_node* ) ); + } } // launch snapshot extraction if needed if (extractSWF2 == true) @@ -532,10 +536,10 @@ rtems_task cwf1_task(rtems_task_argument ring_node_to_send_cwf_f1->sid = SID_SBM1_CWF_F1; if (lfrCurrentMode == LFR_MODE_SBM1) { - status = rtems_message_queue_send( queue_id, &ring_node_to_send_cwf, sizeof( ring_node* ) ); - if (status != 0) + // data are sent depending on the transition time + if ( time_management_regs->coarse_time >= lastValidEnterModeTime ) { - PRINTF("cwf sending failed\n") + status = rtems_message_queue_send( queue_id, &ring_node_to_send_cwf, sizeof( ring_node* ) ); } } // launch snapshot extraction if needed