##// END OF EJS Templates
Bug 171
paul -
r151:058ea1100118 VHDLib206
parent child
Show More
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.6) on: Mon Jun 16 15:44:22 2014
3 # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue Jun 17 07:27:34 2014
4 4 # Project: fsw-qt.pro
5 5 # Template: app
6 6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 3.0.1, 2014-06-16T15:53:55. -->
3 <!-- Written by QtCreator 3.0.1, 2014-06-17T07:01:31. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -240,9 +240,9 void init_local_mode_parameters( void )
240 240 sequenceCounters_TC_EXE[i] = 0x00;
241 241 }
242 242 sequenceCounters_SCIENCE_NORMAL_BURST = 0x00;
243 sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00;
244 sequenceCounterHK = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
245 sequenceCounterParameterDump = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
243 sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00;
244 sequenceCounterHK = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
245 sequenceCounterParameterDump = TM_PACKET_SEQ_CTRL_STANDALONE << 8;
246 246 }
247 247
248 248 void reset_local_time( void )
@@ -211,8 +211,8 rtems_task hous_task(rtems_task_argument
211 211 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 );
212 212 }
213 213 else {
214 housekeeping_packet.packetSequenceControl[0] = (unsigned char) sequenceCounterHK >> 8;
215 housekeeping_packet.packetSequenceControl[1] = (unsigned char) sequenceCounterHK;
214 housekeeping_packet.packetSequenceControl[0] = (unsigned char) (sequenceCounterHK >> 8);
215 housekeeping_packet.packetSequenceControl[1] = (unsigned char) (sequenceCounterHK );
216 216 increment_seq_counter( &sequenceCounterHK );
217 217
218 218 housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
@@ -333,39 +333,6 void init_housekeeping_parameters( void
333 333 housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3
334 334 }
335 335
336 void increment_seq_counter_old( unsigned char *packet_sequence_control)
337 {
338 /** This function increment the sequence counter psased in argument.
339 *
340 * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0.
341 *
342 */
343
344 unsigned short sequence_cnt;
345 unsigned short segmentation_grouping_flag;
346 unsigned short new_packet_sequence_control;
347
348 segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6
349 sequence_cnt = (unsigned short) (
350 ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0
351 + packet_sequence_control[1]
352 );
353
354 new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ;
355
356 packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8);
357 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
358
359 if ( sequence_cnt < SEQ_CNT_MAX)
360 {
361 sequence_cnt = sequence_cnt + 1;
362 }
363 else
364 {
365 sequence_cnt = 0;
366 }
367 }
368
369 336 void increment_seq_counter( unsigned short *packetSequenceControl )
370 337 {
371 338 /** This function increment the sequence counter psased in argument.
@@ -374,11 +341,11 void increment_seq_counter( unsigned sho
374 341 *
375 342 */
376 343
344 unsigned short segmentation_grouping_flag;
377 345 unsigned short sequence_cnt;
378 unsigned short segmentation_grouping_flag;
379 346
380 347 segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6
381 sequence_cnt = (*packetSequenceControl) & 0x3fff; // [0011 1111 1111 1111]
348 sequence_cnt = (*packetSequenceControl) & 0x3fff; // [0011 1111 1111 1111]
382 349
383 350 if ( sequence_cnt < SEQ_CNT_MAX)
384 351 {
General Comments 0
You need to be logged in to leave comments. Login now