|
@@
-444,7
+444,7
int check_mode_transition( unsigned char
|
|
444
|
return status;
|
|
444
|
return status;
|
|
445
|
}
|
|
445
|
}
|
|
446
|
|
|
446
|
|
|
447
|
void update_last_valid_transition_date(unsigned int transitionCoarseTime)
|
|
447
|
void update_last_valid_transition_date( unsigned int transitionCoarseTime )
|
|
448
|
{
|
|
448
|
{
|
|
449
|
lastValidEnterModeTime = transitionCoarseTime;
|
|
449
|
lastValidEnterModeTime = transitionCoarseTime;
|
|
450
|
}
|
|
450
|
}
|
|
@@
-607,7
+607,6
int enter_mode_standby()
|
|
607
|
int status;
|
|
607
|
int status;
|
|
608
|
|
|
608
|
|
|
609
|
status = stop_current_mode(); // STOP THE CURRENT MODE
|
|
609
|
status = stop_current_mode(); // STOP THE CURRENT MODE
|
|
610
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
611
|
|
|
610
|
|
|
612
|
#ifdef PRINT_TASK_STATISTICS
|
|
611
|
#ifdef PRINT_TASK_STATISTICS
|
|
613
|
rtems_cpu_usage_report();
|
|
612
|
rtems_cpu_usage_report();
|
|
@@
-649,7
+648,6
int enter_mode_normal( unsigned int tran
|
|
649
|
switch( lfrCurrentMode )
|
|
648
|
switch( lfrCurrentMode )
|
|
650
|
{
|
|
649
|
{
|
|
651
|
case LFR_MODE_STANDBY:
|
|
650
|
case LFR_MODE_STANDBY:
|
|
652
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
653
|
status = restart_science_tasks( LFR_MODE_NORMAL ); // restart science tasks
|
|
651
|
status = restart_science_tasks( LFR_MODE_NORMAL ); // restart science tasks
|
|
654
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
652
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
655
|
{
|
|
653
|
{
|
|
@@
-658,7
+656,6
int enter_mode_normal( unsigned int tran
|
|
658
|
}
|
|
656
|
}
|
|
659
|
break;
|
|
657
|
break;
|
|
660
|
case LFR_MODE_BURST:
|
|
658
|
case LFR_MODE_BURST:
|
|
661
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
662
|
status = stop_current_mode(); // stop the current mode
|
|
659
|
status = stop_current_mode(); // stop the current mode
|
|
663
|
status = restart_science_tasks( LFR_MODE_NORMAL ); // restart the science tasks
|
|
660
|
status = restart_science_tasks( LFR_MODE_NORMAL ); // restart the science tasks
|
|
664
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
661
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
@@
-668,12
+665,10
int enter_mode_normal( unsigned int tran
|
|
668
|
}
|
|
665
|
}
|
|
669
|
break;
|
|
666
|
break;
|
|
670
|
case LFR_MODE_SBM1:
|
|
667
|
case LFR_MODE_SBM1:
|
|
671
|
lfrTransitionType = TRANSITION_S1_TO_NORM;
|
|
|
|
|
672
|
restart_asm_activities( LFR_MODE_NORMAL ); // this is necessary to restart ASM tasks to update the parameters
|
|
668
|
restart_asm_activities( LFR_MODE_NORMAL ); // this is necessary to restart ASM tasks to update the parameters
|
|
673
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
669
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
674
|
break;
|
|
670
|
break;
|
|
675
|
case LFR_MODE_SBM2:
|
|
671
|
case LFR_MODE_SBM2:
|
|
676
|
lfrTransitionType = TRANSITION_S2_TO_NORM;
|
|
|
|
|
677
|
restart_asm_activities( LFR_MODE_NORMAL ); // this is necessary to restart ASM tasks to update the parameters
|
|
672
|
restart_asm_activities( LFR_MODE_NORMAL ); // this is necessary to restart ASM tasks to update the parameters
|
|
678
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
673
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
679
|
break;
|
|
674
|
break;
|
|
@@
-713,7
+708,6
int enter_mode_burst( unsigned int trans
|
|
713
|
rtems_cpu_usage_reset();
|
|
708
|
rtems_cpu_usage_reset();
|
|
714
|
#endif
|
|
709
|
#endif
|
|
715
|
|
|
710
|
|
|
716
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
717
|
status = stop_current_mode(); // stop the current mode
|
|
711
|
status = stop_current_mode(); // stop the current mode
|
|
718
|
status = restart_science_tasks( LFR_MODE_BURST ); // restart the science tasks
|
|
712
|
status = restart_science_tasks( LFR_MODE_BURST ); // restart the science tasks
|
|
719
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
713
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
@@
-760,7
+754,6
int enter_mode_sbm1( unsigned int transi
|
|
760
|
switch( lfrCurrentMode )
|
|
754
|
switch( lfrCurrentMode )
|
|
761
|
{
|
|
755
|
{
|
|
762
|
case LFR_MODE_STANDBY:
|
|
756
|
case LFR_MODE_STANDBY:
|
|
763
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
764
|
status = restart_science_tasks( LFR_MODE_SBM1 ); // restart science tasks
|
|
757
|
status = restart_science_tasks( LFR_MODE_SBM1 ); // restart science tasks
|
|
765
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
758
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
766
|
{
|
|
759
|
{
|
|
@@
-769,12
+762,10
int enter_mode_sbm1( unsigned int transi
|
|
769
|
}
|
|
762
|
}
|
|
770
|
break;
|
|
763
|
break;
|
|
771
|
case LFR_MODE_NORMAL: // lfrCurrentMode will be updated after the execution of close_action
|
|
764
|
case LFR_MODE_NORMAL: // lfrCurrentMode will be updated after the execution of close_action
|
|
772
|
lfrTransitionType = TRANSITION_NORM_TO_S1;
|
|
|
|
|
773
|
restart_asm_activities( LFR_MODE_SBM1 );
|
|
765
|
restart_asm_activities( LFR_MODE_SBM1 );
|
|
774
|
status = LFR_SUCCESSFUL;
|
|
766
|
status = LFR_SUCCESSFUL;
|
|
775
|
break;
|
|
767
|
break;
|
|
776
|
case LFR_MODE_BURST:
|
|
768
|
case LFR_MODE_BURST:
|
|
777
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
778
|
status = stop_current_mode(); // stop the current mode
|
|
769
|
status = stop_current_mode(); // stop the current mode
|
|
779
|
status = restart_science_tasks( LFR_MODE_SBM1 ); // restart the science tasks
|
|
770
|
status = restart_science_tasks( LFR_MODE_SBM1 ); // restart the science tasks
|
|
780
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
771
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
@@
-784,7
+775,6
int enter_mode_sbm1( unsigned int transi
|
|
784
|
}
|
|
775
|
}
|
|
785
|
break;
|
|
776
|
break;
|
|
786
|
case LFR_MODE_SBM2:
|
|
777
|
case LFR_MODE_SBM2:
|
|
787
|
lfrTransitionType = TRANSITION_S2_TO_S1;
|
|
|
|
|
788
|
restart_asm_activities( LFR_MODE_SBM1 );
|
|
778
|
restart_asm_activities( LFR_MODE_SBM1 );
|
|
789
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
779
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
790
|
break;
|
|
780
|
break;
|
|
@@
-830,7
+820,6
int enter_mode_sbm2( unsigned int transi
|
|
830
|
switch( lfrCurrentMode )
|
|
820
|
switch( lfrCurrentMode )
|
|
831
|
{
|
|
821
|
{
|
|
832
|
case LFR_MODE_STANDBY:
|
|
822
|
case LFR_MODE_STANDBY:
|
|
833
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
834
|
status = restart_science_tasks( LFR_MODE_SBM2 ); // restart science tasks
|
|
823
|
status = restart_science_tasks( LFR_MODE_SBM2 ); // restart science tasks
|
|
835
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
824
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
836
|
{
|
|
825
|
{
|
|
@@
-839,12
+828,10
int enter_mode_sbm2( unsigned int transi
|
|
839
|
}
|
|
828
|
}
|
|
840
|
break;
|
|
829
|
break;
|
|
841
|
case LFR_MODE_NORMAL:
|
|
830
|
case LFR_MODE_NORMAL:
|
|
842
|
lfrTransitionType = TRANSITION_NORM_TO_S2;
|
|
|
|
|
843
|
restart_asm_activities( LFR_MODE_SBM2 );
|
|
831
|
restart_asm_activities( LFR_MODE_SBM2 );
|
|
844
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
832
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
845
|
break;
|
|
833
|
break;
|
|
846
|
case LFR_MODE_BURST:
|
|
834
|
case LFR_MODE_BURST:
|
|
847
|
lfrTransitionType = TRANSITION_NOT_SPECIFIC;
|
|
|
|
|
848
|
status = stop_current_mode(); // stop the current mode
|
|
835
|
status = stop_current_mode(); // stop the current mode
|
|
849
|
status = restart_science_tasks( LFR_MODE_SBM2 ); // restart the science tasks
|
|
836
|
status = restart_science_tasks( LFR_MODE_SBM2 ); // restart the science tasks
|
|
850
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
837
|
if (status == RTEMS_SUCCESSFUL) // relaunch spectral_matrix and waveform_picker modules
|
|
@@
-854,7
+841,6
int enter_mode_sbm2( unsigned int transi
|
|
854
|
}
|
|
841
|
}
|
|
855
|
break;
|
|
842
|
break;
|
|
856
|
case LFR_MODE_SBM1:
|
|
843
|
case LFR_MODE_SBM1:
|
|
857
|
lfrTransitionType = TRANSITION_S1_TO_S2;
|
|
|
|
|
858
|
restart_asm_activities( LFR_MODE_SBM2 );
|
|
844
|
restart_asm_activities( LFR_MODE_SBM2 );
|
|
859
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
845
|
status = LFR_SUCCESSFUL; // lfrCurrentMode will be updated after the execution of close_action
|
|
860
|
break;
|
|
846
|
break;
|