@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.6) on: Tue May 13 |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue May 13 15:18:10 2014 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
@@ -1,6 +1,6 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.1, 2014-05-13T |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-05-13T15:58:32. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
@@ -51,9 +51,9 | |||||
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8. |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8. |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{ |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
@@ -192,7 +192,7 | |||||
192 | </data> |
|
192 | </data> | |
193 | <data> |
|
193 | <data> | |
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
195 |
<value type="QByteArray">{ |
|
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
196 | </data> |
|
196 | </data> | |
197 | <data> |
|
197 | <data> | |
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
@@ -572,7 +572,7 typedef struct { | |||||
572 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; |
|
572 | unsigned char hk_lfr_dpu_spw_tick_out_cnt; | |
573 | unsigned char hk_lfr_dpu_spw_last_timc; |
|
573 | unsigned char hk_lfr_dpu_spw_last_timc; | |
574 | // ahb error statistics |
|
574 | // ahb error statistics | |
575 |
unsigned |
|
575 | unsigned char hk_lfr_last_fail_addr[4]; | |
576 | // temperatures |
|
576 | // temperatures | |
577 | unsigned char hk_lfr_temp_scm[2]; |
|
577 | unsigned char hk_lfr_temp_scm[2]; | |
578 | unsigned char hk_lfr_temp_pcb[2]; |
|
578 | unsigned char hk_lfr_temp_pcb[2]; |
@@ -36,8 +36,10 void increment_seq_counter( unsigned cha | |||||
36 | void getTime( unsigned char *time); |
|
36 | void getTime( unsigned char *time); | |
37 | unsigned long long int getTimeAsUnsignedLongLongInt( ); |
|
37 | unsigned long long int getTimeAsUnsignedLongLongInt( ); | |
38 | void send_dumb_hk( void ); |
|
38 | void send_dumb_hk( void ); | |
39 |
void get_v_e1_e2_f3 (unsigned char *v, unsigned char *e1, unsigned char *e2 |
|
39 | void get_v_e1_e2_f3 (unsigned char *v, unsigned char *e1, unsigned char *e2); | |
40 |
|
40 | |||
41 | extern int sched_yield( void ); |
|
41 | extern int sched_yield( void ); | |
|
42 | extern ring_node *current_ring_node_f3; | |||
|
43 | extern ring_node *ring_node_to_send_cwf_f3; | |||
42 |
|
44 | |||
43 | #endif // FSW_MISC_H_INCLUDED |
|
45 | #endif // FSW_MISC_H_INCLUDED |
@@ -51,7 +51,6 rtems_task swbd_task( rtems_task_argumen | |||||
51 |
|
51 | |||
52 | //****************** |
|
52 | //****************** | |
53 | // general functions |
|
53 | // general functions | |
54 | void init_waveforms( void ); |
|
|||
55 | void init_waveform_rings( void ); |
|
54 | void init_waveform_rings( void ); | |
56 | void init_waveform_ring( ring_node waveform_ring[], unsigned char nbNodes, volatile int wfrm[] ); |
|
55 | void init_waveform_ring( ring_node waveform_ring[], unsigned char nbNodes, volatile int wfrm[] ); | |
57 | void reset_current_ring_nodes( void ); |
|
56 | void reset_current_ring_nodes( void ); |
@@ -222,8 +222,7 rtems_task hous_task(rtems_task_argument | |||||
222 | spacewire_update_statistics(); |
|
222 | spacewire_update_statistics(); | |
223 |
|
223 | |||
224 | get_v_e1_e2_f3( |
|
224 | get_v_e1_e2_f3( | |
225 |
housekeeping_packet.hk_lfr_sc_v_f3, housekeeping_packet.hk_lfr_sc_e1_f3, housekeeping_packet.hk_lfr_sc_e2_f3 |
|
225 | housekeeping_packet.hk_lfr_sc_v_f3, housekeeping_packet.hk_lfr_sc_e1_f3, housekeeping_packet.hk_lfr_sc_e2_f3 ); | |
226 | false ); |
|
|||
227 |
|
226 | |||
228 | // SEND PACKET |
|
227 | // SEND PACKET | |
229 | status = rtems_message_queue_urgent( queue_id, &housekeeping_packet, |
|
228 | status = rtems_message_queue_urgent( queue_id, &housekeeping_packet, | |
@@ -437,7 +436,7 void send_dumb_hk( void ) | |||||
437 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
436 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
438 | } |
|
437 | } | |
439 |
|
438 | |||
440 |
void get_v_e1_e2_f3( unsigned char *v, unsigned char *e1, unsigned char *e2 |
|
439 | void get_v_e1_e2_f3( unsigned char *v, unsigned char *e1, unsigned char *e2 ) | |
441 | { |
|
440 | { | |
442 | unsigned int coarseTime; |
|
441 | unsigned int coarseTime; | |
443 | unsigned int acquisitionTime; |
|
442 | unsigned int acquisitionTime; | |
@@ -460,7 +459,7 void get_v_e1_e2_f3( unsigned char *v, u | |||||
460 | else |
|
459 | else | |
461 | { |
|
460 | { | |
462 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; |
|
461 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; | |
463 |
bufferPtr = (unsigned char*) |
|
462 | bufferPtr = (unsigned char*) current_ring_node_f3->buffer_address; | |
464 | acquisitionTime = (unsigned int) ( ( bufferPtr[2] & 0x7f ) << 24 ) |
|
463 | acquisitionTime = (unsigned int) ( ( bufferPtr[2] & 0x7f ) << 24 ) | |
465 | + (unsigned int) ( bufferPtr[3] << 16 ) |
|
464 | + (unsigned int) ( bufferPtr[3] << 16 ) | |
466 | + (unsigned int) ( bufferPtr[0] << 8 ) |
|
465 | + (unsigned int) ( bufferPtr[0] << 8 ) | |
@@ -472,7 +471,8 void get_v_e1_e2_f3( unsigned char *v, u | |||||
472 | } |
|
471 | } | |
473 | else if( coarseTime == acquisitionTime ) |
|
472 | else if( coarseTime == acquisitionTime ) | |
474 | { |
|
473 | { | |
475 | offset_in_samples = 0; |
|
474 | bufferPtr = (unsigned char*) current_ring_node_f3->previous->buffer_address; // pick up v e1 and e2 in the previous f3 buffer | |
|
475 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT-1; | |||
476 | } |
|
476 | } | |
477 | else |
|
477 | else | |
478 | { |
|
478 | { | |
@@ -482,7 +482,7 void get_v_e1_e2_f3( unsigned char *v, u | |||||
482 |
|
482 | |||
483 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) |
|
483 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) | |
484 | { |
|
484 | { | |
485 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out the buffer, counter = %d\n", offset_in_samples) |
|
485 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out of the buffer, counter = %d\n", offset_in_samples) | |
486 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; |
|
486 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; | |
487 | } |
|
487 | } | |
488 | PRINTF1("f3 data @ %x *** ", waveform_picker_regs->addr_data_f3 ) |
|
488 | PRINTF1("f3 data @ %x *** ", waveform_picker_regs->addr_data_f3 ) |
@@ -214,8 +214,6 rtems_task wfrm_task(rtems_task_argument | |||||
214 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); |
|
214 | init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 ); | |
215 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); |
|
215 | init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 ); | |
216 |
|
216 | |||
217 | init_waveforms(); |
|
|||
218 |
|
||||
219 | status = get_message_queue_id_send( &queue_id ); |
|
217 | status = get_message_queue_id_send( &queue_id ); | |
220 | if (status != RTEMS_SUCCESSFUL) |
|
218 | if (status != RTEMS_SUCCESSFUL) | |
221 | { |
|
219 | { | |
@@ -449,37 +447,6 rtems_task swbd_task(rtems_task_argument | |||||
449 |
|
447 | |||
450 | //****************** |
|
448 | //****************** | |
451 | // general functions |
|
449 | // general functions | |
452 | void init_waveforms( void ) |
|
|||
453 | { |
|
|||
454 | int i = 0; |
|
|||
455 |
|
||||
456 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
|||
457 | { |
|
|||
458 | //*** |
|
|||
459 | // F0 |
|
|||
460 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; // |
|
|||
461 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; // |
|
|||
462 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; // |
|
|||
463 |
|
||||
464 | //*** |
|
|||
465 | // F1 |
|
|||
466 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111; |
|
|||
467 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333; |
|
|||
468 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; |
|
|||
469 |
|
||||
470 | //*** |
|
|||
471 | // F2 |
|
|||
472 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333; |
|
|||
473 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; |
|
|||
474 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; |
|
|||
475 |
|
||||
476 | //*** |
|
|||
477 | // F3 |
|
|||
478 | // wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1; |
|
|||
479 | // wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2; |
|
|||
480 | // wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000; |
|
|||
481 | } |
|
|||
482 | } |
|
|||
483 |
|
450 | |||
484 | void init_waveform_rings( void ) |
|
451 | void init_waveform_rings( void ) | |
485 | { |
|
452 | { |
General Comments 0
You need to be logged in to leave comments.
Login now