##// END OF EJS Templates
initialization of parameter_dump_packet updated with filtering elements
paul -
r294:3df41b40fc06 R3_plus draft
parent child
Show More
@@ -73,6 +73,7 int check_sy_lfr_filter_parameters( ccsd
73 // KCOEFFICIENTS
73 // KCOEFFICIENTS
74 int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id);
74 int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id);
75 void copyFloatByChar( unsigned char *destination, unsigned char *source );
75 void copyFloatByChar( unsigned char *destination, unsigned char *source );
76 void floatToChar( float value, unsigned char* ptr);
76
77
77 void init_parameter_dump( void );
78 void init_parameter_dump( void );
78 void init_kcoefficients_dump( void );
79 void init_kcoefficients_dump( void );
@@ -1322,6 +1322,17 void copyFloatByChar( unsigned char *des
1322 destination[3] = source[3];
1322 destination[3] = source[3];
1323 }
1323 }
1324
1324
1325 void floatToChar( float value, unsigned char* ptr)
1326 {
1327 unsigned char* valuePtr;
1328
1329 valuePtr = (unsigned char*) &value;
1330 ptr[0] = valuePtr[0];
1331 ptr[1] = valuePtr[0];
1332 ptr[2] = valuePtr[0];
1333 ptr[3] = valuePtr[0];
1334 }
1335
1325 //**********
1336 //**********
1326 // init dump
1337 // init dump
1327
1338
@@ -1394,6 +1405,21 void init_parameter_dump( void )
1394 {
1405 {
1395 parameter_dump_packet.sy_lfr_fbins_f0_word1[k] = 0xff;
1406 parameter_dump_packet.sy_lfr_fbins_f0_word1[k] = 0xff;
1396 }
1407 }
1408
1409 // PAS FILTER PARAMETERS
1410 parameter_dump_packet.pa_rpw_spare8_2 = 0x00;
1411 parameter_dump_packet.spare_sy_lfr_pas_filter_enabled = 0x00;
1412 parameter_dump_packet.sy_lfr_pas_filter_modulus = DEFAULT_SY_LFR_PAS_FILTER_MODULUS;
1413 floatToChar( DEFAULT_SY_LFR_PAS_FILTER_TBAD, parameter_dump_packet.sy_lfr_pas_filter_tbad );
1414 parameter_dump_packet.sy_lfr_pas_filter_offset = DEFAULT_SY_LFR_PAS_FILTER_OFFSET;
1415 floatToChar( DEFAULT_SY_LFR_PAS_FILTER_SHIFT, parameter_dump_packet.sy_lfr_pas_filter_shift );
1416 floatToChar( DEFAULT_SY_LFR_SC_RW_DELTA_F, parameter_dump_packet.sy_lfr_sc_rw_delta_f );
1417
1418 // LFR_RW_MASK
1419 for (k=0; k < NB_FBINS_MASKS * NB_BYTES_PER_FBINS_MASK; k++)
1420 {
1421 parameter_dump_packet.sy_lfr_rw_mask_f0_word1[k] = 0xff;
1422 }
1397 }
1423 }
1398
1424
1399 void init_kcoefficients_dump( void )
1425 void init_kcoefficients_dump( void )
General Comments 0
You need to be logged in to leave comments. Login now