@@ -1,2 +1,2 | |||
|
1 | 1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters |
|
2 | 1f3d7ce688e982a378d739596c8e3f8972f40b9d header/lfr_common_headers | |
|
2 | c3197ff831df5057bdd145a4efd94ded0618661f header/lfr_common_headers |
@@ -18,9 +18,9 include(./sparc.pri) | |||
|
18 | 18 | # flight software version |
|
19 | 19 | SWVERSION=-1-0 |
|
20 | 20 | DEFINES += SW_VERSION_N1=3 # major |
|
21 |
DEFINES += SW_VERSION_N2= |
|
|
21 | DEFINES += SW_VERSION_N2=1 # minor | |
|
22 | 22 | DEFINES += SW_VERSION_N3=0 # patch |
|
23 |
DEFINES += SW_VERSION_N4= |
|
|
23 | DEFINES += SW_VERSION_N4=0 # internal | |
|
24 | 24 | |
|
25 | 25 | # <GCOV> |
|
26 | 26 | #QMAKE_CFLAGS_RELEASE += -fprofile-arcs -ftest-coverage |
@@ -28,6 +28,7 int action_load_sbm1_par(ccsdsTelecomman | |||
|
28 | 28 | int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time); |
|
29 | 29 | int action_load_kcoefficients(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
30 | 30 | int action_load_fbins_mask(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
31 | int action_load_pas_filter_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); | |
|
31 | 32 | int action_dump_kcoefficients(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
32 | 33 | int action_dump_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); |
|
33 | 34 | |
@@ -60,6 +61,9 unsigned int check_update_info_hk_thr_mo | |||
|
60 | 61 | // FBINS_MASK |
|
61 | 62 | int set_sy_lfr_fbins( ccsdsTelecommandPacket_t *TC ); |
|
62 | 63 | |
|
64 | // TC_LFR_LOAD_PARS_FILTER_PAR | |
|
65 | int check_sy_lfr_pas_filter_parameters( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
|
66 | ||
|
63 | 67 | // KCOEFFICIENTS |
|
64 | 68 | int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id); |
|
65 | 69 | void copyFloatByChar( unsigned char *destination, unsigned char *source ); |
@@ -229,7 +229,8 int tc_check_type_subtype( unsigned char | |||
|
229 | 229 | || (packetSubType == TC_SUBTYPE_UPDT_INFO) |
|
230 | 230 | || (packetSubType == TC_SUBTYPE_EN_CAL) || (packetSubType == TC_SUBTYPE_DIS_CAL) |
|
231 | 231 | || (packetSubType == TC_SUBTYPE_LOAD_K) || (packetSubType == TC_SUBTYPE_DUMP_K) |
|
232 |
|| (packetSubType == TC_SUBTYPE_LOAD_FBINS) |
|
|
232 | || (packetSubType == TC_SUBTYPE_LOAD_FBINS) | |
|
233 | || (packetSubType == TC_SUBTYPE_LOAD_PAS_FILTER_PAR)) | |
|
233 | 234 | { |
|
234 | 235 | status = CCSDS_TM_VALID; |
|
235 | 236 | } |
@@ -415,6 +416,14 int tc_check_length( unsigned char packe | |||
|
415 | 416 | status = CCSDS_TM_VALID; |
|
416 | 417 | } |
|
417 | 418 | break; |
|
419 | case TC_SUBTYPE_LOAD_PAS_FILTER_PAR: | |
|
420 | if (length!=(TC_LEN_LOAD_PAS_FILTER_PAR-CCSDS_TC_TM_PACKET_OFFSET)) { | |
|
421 | status = WRONG_LEN_PKT; | |
|
422 | } | |
|
423 | else { | |
|
424 | status = CCSDS_TM_VALID; | |
|
425 | } | |
|
426 | break; | |
|
418 | 427 | case TC_SUBTYPE_UPDT_TIME: |
|
419 | 428 | if (length!=(TC_LEN_UPDT_TIME-CCSDS_TC_TM_PACKET_OFFSET)) { |
|
420 | 429 | status = WRONG_LEN_PKT; |
@@ -123,6 +123,10 rtems_task actn_task( rtems_task_argumen | |||
|
123 | 123 | result = action_load_fbins_mask( &TC, queue_snd_id, time ); |
|
124 | 124 | close_action( &TC, result, queue_snd_id ); |
|
125 | 125 | break; |
|
126 | case TC_SUBTYPE_LOAD_PAS_FILTER_PAR: | |
|
127 | result = action_load_pas_filter_par( &TC, queue_snd_id, time ); | |
|
128 | close_action( &TC, result, queue_snd_id ); | |
|
129 | break; | |
|
126 | 130 | case TC_SUBTYPE_UPDT_TIME: |
|
127 | 131 | result = action_update_time( &TC ); |
|
128 | 132 | close_action( &TC, result, queue_snd_id ); |
@@ -310,6 +310,32 int action_load_fbins_mask(ccsdsTelecomm | |||
|
310 | 310 | return flag; |
|
311 | 311 | } |
|
312 | 312 | |
|
313 | int action_load_pas_filter_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
|
314 | { | |
|
315 | /** This function updates the LFR registers with the incoming sbm2 parameters. | |
|
316 | * | |
|
317 | * @param TC points to the TeleCommand packet that is being processed | |
|
318 | * @param queue_id is the id of the queue which handles TM related to this execution step | |
|
319 | * | |
|
320 | */ | |
|
321 | ||
|
322 | int flag; | |
|
323 | ||
|
324 | flag = LFR_DEFAULT; | |
|
325 | ||
|
326 | flag = check_sy_lfr_pas_filter_parameters( TC, queue_id ); | |
|
327 | ||
|
328 | if (flag == LFR_SUCCESSFUL) | |
|
329 | { | |
|
330 | parameter_dump_packet.spare_sy_lfr_pas_filter_enabled = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_ENABLED ]; | |
|
331 | parameter_dump_packet.sy_lfr_pas_filter_modulus = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_MODULUS ]; | |
|
332 | parameter_dump_packet.sy_lfr_pas_filter_nstd = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_NSTD ]; | |
|
333 | parameter_dump_packet.sy_lfr_pas_filter_offset = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_OFFSET ]; | |
|
334 | } | |
|
335 | ||
|
336 | return flag; | |
|
337 | } | |
|
338 | ||
|
313 | 339 | int action_dump_kcoefficients(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
314 | 340 | { |
|
315 | 341 | /** This function updates the LFR registers with the incoming sbm2 parameters. |
@@ -885,6 +911,59 int set_sy_lfr_fbins( ccsdsTelecommandPa | |||
|
885 | 911 | return status; |
|
886 | 912 | } |
|
887 | 913 | |
|
914 | //*************************** | |
|
915 | // TC_LFR_LOAD_PAS_FILTER_PAR | |
|
916 | ||
|
917 | int check_sy_lfr_pas_filter_parameters( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) | |
|
918 | { | |
|
919 | int flag; | |
|
920 | rtems_status_code status; | |
|
921 | ||
|
922 | unsigned char sy_lfr_pas_filter_enabled; | |
|
923 | unsigned char sy_lfr_pas_filter_modulus; | |
|
924 | unsigned char sy_lfr_pas_filter_nstd; | |
|
925 | unsigned char sy_lfr_pas_filter_offset; | |
|
926 | ||
|
927 | flag = LFR_SUCCESSFUL; | |
|
928 | ||
|
929 | //*************** | |
|
930 | // get parameters | |
|
931 | sy_lfr_pas_filter_enabled = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_ENABLED ] & 0x01; // [0000 0001] | |
|
932 | sy_lfr_pas_filter_modulus = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_MODULUS ]; | |
|
933 | sy_lfr_pas_filter_nstd = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_NSTD ]; | |
|
934 | sy_lfr_pas_filter_offset = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_PAS_FILTER_OFFSET ]; | |
|
935 | ||
|
936 | //****************** | |
|
937 | // check consistency | |
|
938 | // sy_lfr_pas_filter_enabled | |
|
939 | // sy_lfr_pas_filter_modulus | |
|
940 | if ( (sy_lfr_pas_filter_modulus < 4) || (sy_lfr_pas_filter_modulus > 8) ) | |
|
941 | { | |
|
942 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_PAS_FILTER_MODULUS+10, sy_lfr_pas_filter_modulus ); | |
|
943 | flag = WRONG_APP_DATA; | |
|
944 | } | |
|
945 | // sy_lfr_pas_filter_nstd | |
|
946 | if (flag == LFR_SUCCESSFUL) | |
|
947 | { | |
|
948 | if ( sy_lfr_pas_filter_nstd > 8 ) | |
|
949 | { | |
|
950 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_PAS_FILTER_NSTD+10, sy_lfr_pas_filter_nstd ); | |
|
951 | flag = WRONG_APP_DATA; | |
|
952 | } | |
|
953 | } | |
|
954 | // sy_lfr_pas_filter_offset | |
|
955 | if (flag == LFR_SUCCESSFUL) | |
|
956 | { | |
|
957 | if (sy_lfr_pas_filter_offset > 7) | |
|
958 | { | |
|
959 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_PAS_FILTER_OFFSET+10, sy_lfr_pas_filter_offset ); | |
|
960 | flag = WRONG_APP_DATA; | |
|
961 | } | |
|
962 | } | |
|
963 | ||
|
964 | return flag; | |
|
965 | } | |
|
966 | ||
|
888 | 967 | //************** |
|
889 | 968 | // KCOEFFICIENTS |
|
890 | 969 | int set_sy_lfr_kcoeff( ccsdsTelecommandPacket_t *TC,rtems_id queue_id ) |
General Comments 0
You need to be logged in to leave comments.
Login now