@@ -101,6 +101,20 int action_load_normal_par(ccsdsTelecomm | |||||
101 | } |
|
101 | } | |
102 | } |
|
102 | } | |
103 |
|
103 | |||
|
104 | //**************************************************************** | |||
|
105 | // check the consistency between sy_lfr_n_bp_p0 and sy_lfr_n_bp_p1 | |||
|
106 | if (flag == LFR_SUCCESSFUL) | |||
|
107 | { | |||
|
108 | sy_lfr_n_bp_p0 = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_N_BP_P0 ]; | |||
|
109 | sy_lfr_n_bp_p1 = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_N_BP_P1 ]; | |||
|
110 | aux = ( (float ) sy_lfr_n_bp_p1 / sy_lfr_n_bp_p0 ) - floor(sy_lfr_n_bp_p1 / sy_lfr_n_bp_p0); | |||
|
111 | if (aux != 0) | |||
|
112 | { | |||
|
113 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_N_BP_P1+10, sy_lfr_n_bp_p1 ); | |||
|
114 | flag = LFR_DEFAULT; | |||
|
115 | } | |||
|
116 | } | |||
|
117 | ||||
104 | //*************** |
|
118 | //*************** | |
105 | // sy_lfr_n_bp_p1 |
|
119 | // sy_lfr_n_bp_p1 | |
106 | if (flag == LFR_SUCCESSFUL) |
|
120 | if (flag == LFR_SUCCESSFUL) | |
@@ -488,10 +502,21 int set_sy_lfr_n_bp_p0( ccsdsTelecommand | |||||
488 | */ |
|
502 | */ | |
489 |
|
503 | |||
490 | int status; |
|
504 | int status; | |
|
505 | unsigned char val; | |||
491 |
|
506 | |||
492 | status = LFR_SUCCESSFUL; |
|
507 | status = LFR_SUCCESSFUL; | |
493 |
|
508 | |||
494 |
|
|
509 | val = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_N_BP_P0 ]; | |
|
510 | ||||
|
511 | if (val < SY_LFR_N_BP_P0) | |||
|
512 | { | |||
|
513 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_N_BP_P0+10, val ); | |||
|
514 | status = WRONG_APP_DATA; | |||
|
515 | } | |||
|
516 | else | |||
|
517 | { | |||
|
518 | parameter_dump_packet.sy_lfr_n_bp_p0 = val; | |||
|
519 | } | |||
495 |
|
520 | |||
496 | return status; |
|
521 | return status; | |
497 | } |
|
522 | } | |
@@ -506,10 +531,21 int set_sy_lfr_n_bp_p1(ccsdsTelecommandP | |||||
506 | */ |
|
531 | */ | |
507 |
|
532 | |||
508 | int status; |
|
533 | int status; | |
|
534 | unsigned char val; | |||
509 |
|
535 | |||
510 | status = LFR_SUCCESSFUL; |
|
536 | status = LFR_SUCCESSFUL; | |
511 |
|
537 | |||
512 |
|
|
538 | val = TC->dataAndCRC[ DATAFIELD_POS_SY_LFR_N_BP_P1 ]; | |
|
539 | ||||
|
540 | if (val < SY_LFR_N_BP_P1) | |||
|
541 | { | |||
|
542 | status = send_tm_lfr_tc_exe_inconsistent( TC, queue_id, DATAFIELD_POS_SY_LFR_N_BP_P1+10, val ); | |||
|
543 | status = WRONG_APP_DATA; | |||
|
544 | } | |||
|
545 | else | |||
|
546 | { | |||
|
547 | parameter_dump_packet.sy_lfr_n_bp_p1 = val; | |||
|
548 | } | |||
513 |
|
549 | |||
514 | return status; |
|
550 | return status; | |
515 | } |
|
551 | } |
General Comments 0
You need to be logged in to leave comments.
Login now