@@ -108,6 +108,7 int check_sy_lfr_filter_parameters( ccsd | |||||
108 | // KCOEFFICIENTS |
|
108 | // KCOEFFICIENTS | |
109 | int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id); |
|
109 | int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id); | |
110 | void copyFloatByChar( unsigned char *destination, unsigned char *source ); |
|
110 | void copyFloatByChar( unsigned char *destination, unsigned char *source ); | |
|
111 | void copyInt32ByChar( unsigned char *destination, unsigned char *source ); | |||
111 | void floatToChar( float value, unsigned char* ptr); |
|
112 | void floatToChar( float value, unsigned char* ptr); | |
112 |
|
113 | |||
113 | void init_parameter_dump( void ); |
|
114 | void init_parameter_dump( void ); |
@@ -124,7 +124,7 rtems_task recv_task( rtems_task_argumen | |||||
124 | */ |
|
124 | */ | |
125 |
|
125 | |||
126 | int len; |
|
126 | int len; | |
127 | ccsdsTelecommandPacket_t currentTC; |
|
127 | ccsdsTelecommandPacket_t __attribute__((aligned(4))) currentTC; | |
128 | unsigned char computed_CRC[ BYTES_PER_CRC ]; |
|
128 | unsigned char computed_CRC[ BYTES_PER_CRC ]; | |
129 | unsigned char currentTC_LEN_RCV[ BYTES_PER_PKT_LEN ]; |
|
129 | unsigned char currentTC_LEN_RCV[ BYTES_PER_PKT_LEN ]; | |
130 | unsigned char destinationID; |
|
130 | unsigned char destinationID; |
@@ -190,10 +190,10 rtems_task prc0_task( rtems_task_argumen | |||||
190 | rtems_status_code status; |
|
190 | rtems_status_code status; | |
191 | rtems_id queue_id; |
|
191 | rtems_id queue_id; | |
192 | rtems_id queue_id_q_p0; |
|
192 | rtems_id queue_id_q_p0; | |
193 | bp_packet_with_spare packet_norm_bp1; |
|
193 | bp_packet_with_spare __attribute__((aligned(4))) packet_norm_bp1; | |
194 | bp_packet packet_norm_bp2; |
|
194 | bp_packet __attribute__((aligned(4))) packet_norm_bp2; | |
195 | bp_packet packet_sbm_bp1; |
|
195 | bp_packet __attribute__((aligned(4))) packet_sbm_bp1; | |
196 | bp_packet packet_sbm_bp2; |
|
196 | bp_packet __attribute__((aligned(4))) packet_sbm_bp2; | |
197 | ring_node *current_ring_node_to_send_asm_f0; |
|
197 | ring_node *current_ring_node_to_send_asm_f0; | |
198 | float nbSMInASMNORM; |
|
198 | float nbSMInASMNORM; | |
199 | float nbSMInASMSBM; |
|
199 | float nbSMInASMSBM; |
@@ -191,10 +191,10 rtems_task prc1_task( rtems_task_argumen | |||||
191 | rtems_status_code status; |
|
191 | rtems_status_code status; | |
192 | rtems_id queue_id_send; |
|
192 | rtems_id queue_id_send; | |
193 | rtems_id queue_id_q_p1; |
|
193 | rtems_id queue_id_q_p1; | |
194 | bp_packet_with_spare packet_norm_bp1; |
|
194 | bp_packet_with_spare __attribute__((aligned(4))) packet_norm_bp1; | |
195 | bp_packet packet_norm_bp2; |
|
195 | bp_packet __attribute__((aligned(4))) packet_norm_bp2; | |
196 | bp_packet packet_sbm_bp1; |
|
196 | bp_packet __attribute__((aligned(4))) packet_sbm_bp1; | |
197 | bp_packet packet_sbm_bp2; |
|
197 | bp_packet __attribute__((aligned(4))) packet_sbm_bp2; | |
198 | ring_node *current_ring_node_to_send_asm_f1; |
|
198 | ring_node *current_ring_node_to_send_asm_f1; | |
199 | float nbSMInASMNORM; |
|
199 | float nbSMInASMNORM; | |
200 | float nbSMInASMSBM; |
|
200 | float nbSMInASMSBM; |
@@ -139,8 +139,8 rtems_task prc2_task( rtems_task_argumen | |||||
139 | rtems_status_code status; |
|
139 | rtems_status_code status; | |
140 | rtems_id queue_id_send; |
|
140 | rtems_id queue_id_send; | |
141 | rtems_id queue_id_q_p2; |
|
141 | rtems_id queue_id_q_p2; | |
142 | bp_packet packet_norm_bp1; |
|
142 | bp_packet __attribute__((aligned(4))) packet_norm_bp1; | |
143 | bp_packet packet_norm_bp2; |
|
143 | bp_packet __attribute__((aligned(4))) packet_norm_bp2; | |
144 | ring_node *current_ring_node_to_send_asm_f2; |
|
144 | ring_node *current_ring_node_to_send_asm_f2; | |
145 | float nbSMInASMNORM; |
|
145 | float nbSMInASMNORM; | |
146 |
|
146 |
@@ -29,7 +29,7 rtems_task actn_task( rtems_task_argumen | |||||
29 |
|
29 | |||
30 | int result; |
|
30 | int result; | |
31 | rtems_status_code status; // RTEMS status code |
|
31 | rtems_status_code status; // RTEMS status code | |
32 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task |
|
32 | ccsdsTelecommandPacket_t __attribute__((aligned(4))) TC; // TC sent to the ACTN task | |
33 | size_t size; // size of the incoming TC packet |
|
33 | size_t size; // size of the incoming TC packet | |
34 | unsigned char subtype; // subtype of the current TC packet |
|
34 | unsigned char subtype; // subtype of the current TC packet | |
35 | unsigned char time[BYTES_PER_TIME]; |
|
35 | unsigned char time[BYTES_PER_TIME]; | |
@@ -178,13 +178,17 int action_enter_mode(ccsdsTelecommandPa | |||||
178 | unsigned int transitionCoarseTime; |
|
178 | unsigned int transitionCoarseTime; | |
179 | unsigned char * bytePosPtr; |
|
179 | unsigned char * bytePosPtr; | |
180 |
|
180 | |||
|
181 | printf("(0)\n"); | |||
181 | bytePosPtr = (unsigned char *) &TC->packetID; |
|
182 | bytePosPtr = (unsigned char *) &TC->packetID; | |
182 |
|
183 | printf("(1)\n"); | ||
183 | requestedMode = bytePosPtr[ BYTE_POS_CP_MODE_LFR_SET ]; |
|
184 | requestedMode = bytePosPtr[ BYTE_POS_CP_MODE_LFR_SET ]; | |
184 | transitionCoarseTime_ptr = (unsigned int *) ( &bytePosPtr[ BYTE_POS_CP_LFR_ENTER_MODE_TIME ] ); |
|
185 | printf("(2)\n"); | |
185 | transitionCoarseTime = (*transitionCoarseTime_ptr) & COARSE_TIME_MASK; |
|
186 | copyInt32ByChar( &transitionCoarseTime, &bytePosPtr[ BYTE_POS_CP_LFR_ENTER_MODE_TIME ] ); | |
186 |
|
187 | printf("(3)\n"); | ||
|
188 | transitionCoarseTime = transitionCoarseTime & COARSE_TIME_MASK; | |||
|
189 | printf("(4)\n"); | |||
187 | status = check_mode_value( requestedMode ); |
|
190 | status = check_mode_value( requestedMode ); | |
|
191 | printf("(5)\n"); | |||
188 |
|
192 | |||
189 | if ( status != LFR_SUCCESSFUL ) // the mode value is inconsistent |
|
193 | if ( status != LFR_SUCCESSFUL ) // the mode value is inconsistent | |
190 | { |
|
194 | { | |
@@ -682,6 +686,8 int enter_mode_normal( unsigned int tran | |||||
682 |
|
686 | |||
683 | status = RTEMS_UNSATISFIED; |
|
687 | status = RTEMS_UNSATISFIED; | |
684 |
|
688 | |||
|
689 | printf("hop\n"); | |||
|
690 | ||||
685 | switch( lfrCurrentMode ) |
|
691 | switch( lfrCurrentMode ) | |
686 | { |
|
692 | { | |
687 | case LFR_MODE_STANDBY: |
|
693 | case LFR_MODE_STANDBY: |
@@ -1511,6 +1511,14 void copyFloatByChar( unsigned char *des | |||||
1511 | destination[BYTE_3] = source[BYTE_3]; |
|
1511 | destination[BYTE_3] = source[BYTE_3]; | |
1512 | } |
|
1512 | } | |
1513 |
|
1513 | |||
|
1514 | void copyInt32ByChar( unsigned char *destination, unsigned char *source ) | |||
|
1515 | { | |||
|
1516 | destination[BYTE_0] = source[BYTE_0]; | |||
|
1517 | destination[BYTE_1] = source[BYTE_1]; | |||
|
1518 | destination[BYTE_2] = source[BYTE_2]; | |||
|
1519 | destination[BYTE_3] = source[BYTE_3]; | |||
|
1520 | } | |||
|
1521 | ||||
1514 | void floatToChar( float value, unsigned char* ptr) |
|
1522 | void floatToChar( float value, unsigned char* ptr) | |
1515 | { |
|
1523 | { | |
1516 | unsigned char* valuePtr; |
|
1524 | unsigned char* valuePtr; |
General Comments 0
You need to be logged in to leave comments.
Login now