##// END OF EJS Templates
bug corrected TC_LFR_LOAD_KCOEFFICIENTS with sy_lfr_kcoeff_frequency >= 24
paul -
r207:8a50b41b6c0c R3
parent child
Show More
@@ -112,7 +112,6 rtems_task actn_task( rtems_task_argumen
112 close_action( &TC, result, queue_snd_id );
112 close_action( &TC, result, queue_snd_id );
113 break;
113 break;
114 case TC_SUBTYPE_LOAD_K:
114 case TC_SUBTYPE_LOAD_K:
115 printf("TC_SUBTYPE_LOAD_K\n");
116 result = action_load_kcoefficients( &TC, queue_snd_id, time );
115 result = action_load_kcoefficients( &TC, queue_snd_id, time );
117 close_action( &TC, result, queue_snd_id );
116 close_action( &TC, result, queue_snd_id );
118 break;
117 break;
@@ -955,19 +955,31 int set_sy_lfr_kcoeff( ccsdsTelecommandP
955 }
955 }
956 }
956 }
957
957
958 if (kcoeffPtr_norm != NULL )
958 printf("in set_sy_lfr_kcoeff *** freq = %d, bin = %d\n", sy_lfr_kcoeff_frequency, bin);
959
960 if (kcoeffPtr_norm != NULL ) // update K coefficient for NORMAL data products
959 {
961 {
960 printf("freq = %d, bin = %d\n", sy_lfr_kcoeff_frequency, bin);
961 for (i=0; i<NB_K_COEFF_PER_BIN; i++)
962 for (i=0; i<NB_K_COEFF_PER_BIN; i++)
962 {
963 {
963 // destination
964 // destination
964 kcoeffNormPtr = (unsigned char*) &kcoeffPtr_norm[ (bin * NB_K_COEFF_PER_BIN) + i ];
965 kcoeffNormPtr = (unsigned char*) &kcoeffPtr_norm[ (bin * NB_K_COEFF_PER_BIN) + i ];
966 // source
967 kcoeffLoadPtr = (unsigned char*) &TC->dataAndCRC[DATAFIELD_POS_SY_LFR_KCOEFF_1 + NB_BYTES_PER_FLOAT * i];
968 // copy source to destination
969 copyFloatByChar( kcoeffNormPtr, kcoeffLoadPtr );
970 }
971 }
972
973 if (kcoeffPtr_sbm != NULL ) // update K coefficient for SBM data products
974 {
975 for (i=0; i<NB_K_COEFF_PER_BIN; i++)
976 {
977 // destination
965 kcoeffSbmPtr_a= (unsigned char*) &kcoeffPtr_sbm[ ( (bin * NB_K_COEFF_PER_BIN) + i) * 2 ];
978 kcoeffSbmPtr_a= (unsigned char*) &kcoeffPtr_sbm[ ( (bin * NB_K_COEFF_PER_BIN) + i) * 2 ];
966 kcoeffSbmPtr_b= (unsigned char*) &kcoeffPtr_sbm[ ( (bin * NB_K_COEFF_PER_BIN) + i) * 2 + 1 ];
979 kcoeffSbmPtr_b= (unsigned char*) &kcoeffPtr_sbm[ ( (bin * NB_K_COEFF_PER_BIN) + i) * 2 + 1 ];
967 // source
980 // source
968 kcoeffLoadPtr = (unsigned char*) &TC->dataAndCRC[DATAFIELD_POS_SY_LFR_KCOEFF_1 + NB_BYTES_PER_FLOAT * i];
981 kcoeffLoadPtr = (unsigned char*) &TC->dataAndCRC[DATAFIELD_POS_SY_LFR_KCOEFF_1 + NB_BYTES_PER_FLOAT * i];
969 // copy source to destination
982 // copy source to destination
970 copyFloatByChar( kcoeffNormPtr, kcoeffLoadPtr );
971 copyFloatByChar( kcoeffSbmPtr_a, kcoeffLoadPtr );
983 copyFloatByChar( kcoeffSbmPtr_a, kcoeffLoadPtr );
972 copyFloatByChar( kcoeffSbmPtr_b, kcoeffLoadPtr );
984 copyFloatByChar( kcoeffSbmPtr_b, kcoeffLoadPtr );
973 }
985 }
General Comments 0
You need to be logged in to leave comments. Login now