Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 27:419db63a9949
Remove two global variables
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Tue, 02 Oct 2012 16:51:57 +0200 |
parents | 4bb197635664 |
children | 1e4ecf64b485 |
comparison
equal
deleted
inserted
replaced
26:4bb197635664 | 27:419db63a9949 |
---|---|
109 double Beat_slope_2=0.0 ,Moy_Beatslope_2=0.0,Slope_Beatslope_2=0.0; | 109 double Beat_slope_2=0.0 ,Moy_Beatslope_2=0.0,Slope_Beatslope_2=0.0; |
110 double Ch4_slope=0.0,Moy_Ch4slope_1=0.0,Slope_Ch4slope_1=0.0,Ch4Slope=0.0; | 110 double Ch4_slope=0.0,Moy_Ch4slope_1=0.0,Slope_Ch4slope_1=0.0,Ch4Slope=0.0; |
111 | 111 |
112 double FrequencyDDSBes=0.0,FrequencyDDSBesInit=0.0; | 112 double FrequencyDDSBes=0.0,FrequencyDDSBesInit=0.0; |
113 double FrequencyDDS3=0.0,FrequencyDDS3Init=0.0; | 113 double FrequencyDDS3=0.0,FrequencyDDS3Init=0.0; |
114 double DeltaFrep275=0.0,DeltaFrep10=0.0; ; | |
115 double DDSBesChanged1=FALSE,DDSBesChanged2=FALSE; | 114 double DDSBesChanged1=FALSE,DDSBesChanged2=FALSE; |
116 | 115 |
117 double DeltaDDS3=0.0,Delta10K_Plus=0.0,Delta10K_Minus=0.0; | 116 double DeltaDDS3=0.0,Delta10K_Plus=0.0,Delta10K_Minus=0.0; |
118 double Nu1=0.0, Nu2= 200000-147000+282143746.557455e6; | 117 double Nu1=0.0, Nu2= 200000-147000+282143746.557455e6; |
119 | 118 |
844 Ch4_slope = 0.0; | 843 Ch4_slope = 0.0; |
845 Moy_Ch4slope_1 = 0.0; | 844 Moy_Ch4slope_1 = 0.0; |
846 Slope_Ch4slope_1 = 0.0; | 845 Slope_Ch4slope_1 = 0.0; |
847 | 846 |
848 // frep positive step | 847 // frep positive step |
849 DDS4xAD9912_FrequencyRampe(&DDS4xAD9912,1, FrequDDS1,(FrequDDS1+DeltakHz_1*1000), Step1/Ndiv ); | 848 DDS4xAD9912_FrequencyRampe(&DDS4xAD9912,1, FrequDDS1,(FrequDDS1+DeltakHz_1*1000), Step1/Ndiv); |
850 SetCtrlVal(MainPanel, PANEL_DDS1, (FrequDDS1+DeltakHz_1*1000)); | 849 SetCtrlVal(MainPanel, PANEL_DDS1, (FrequDDS1+DeltakHz_1*1000)); |
851 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, (FrequDDS1+DeltakHz_1*1000)); | 850 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, (FrequDDS1+DeltakHz_1*1000)); |
852 | 851 |
853 // allow counter to settle | 852 // allow counter to settle |
854 settling = 3; | 853 settling = 3; |
865 if (settling > 0) { | 864 if (settling > 0) { |
866 settling--; | 865 settling--; |
867 break; | 866 break; |
868 } | 867 } |
869 | 868 |
870 DeltaFrep275 = 275000 - Ch4; | 869 double fDDS2 = FrequencyDDSBesInit + 275000 - Ch4; |
871 double fDDS2 = FrequencyDDSBesInit + (DeltaFrep275); | |
872 SetCtrlVal(MainPanel, PANEL_DDS2, fDDS2) ; | 870 SetCtrlVal(MainPanel, PANEL_DDS2, fDDS2) ; |
873 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, fDDS2); | 871 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, fDDS2); |
874 | 872 |
875 // allow counter to settle | 873 // allow counter to settle |
876 settling = 3; | 874 settling = 3; |
1010 | 1008 |
1011 else | 1009 else |
1012 { | 1010 { |
1013 nDDSChange=0; | 1011 nDDSChange=0; |
1014 | 1012 |
1015 DeltaFrep275=275000-Ch4; | 1013 double DeltaFrep275 = 275000-Ch4; |
1016 DeltaFrep10=10000-Ch2; | 1014 double DeltaFrep10 = 10000-Ch2; |
1017 DeltaDDS3= DeltaDDS3 +(DeltaFrep10); | 1015 DeltaDDS3= DeltaDDS3 +(DeltaFrep10); |
1018 FrequencyDDSBes=FrequencyDDSBesInit+(DeltaFrep275); | 1016 FrequencyDDSBes=FrequencyDDSBesInit+(DeltaFrep275); |
1019 FrequencyDDS3=FrequencyDDS3Init+DeltaDDS3; | 1017 FrequencyDDS3=FrequencyDDS3Init+DeltaDDS3; |
1020 | 1018 |
1021 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes) ; | 1019 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes) ; |
1071 else | 1069 else |
1072 { | 1070 { |
1073 nDDSChange=0; | 1071 nDDSChange=0; |
1074 | 1072 |
1075 | 1073 |
1076 DeltaFrep275=275000-Ch4; | 1074 double DeltaFrep275=275000-Ch4; |
1077 DeltaFrep10=10000-Ch2; | 1075 double DeltaFrep10=10000-Ch2; |
1078 DeltaDDS3 = DeltaDDS3+(DeltaFrep10) ; | 1076 DeltaDDS3 = DeltaDDS3+(DeltaFrep10) ; |
1079 FrequencyDDSBes=FrequencyDDSBes+(DeltaFrep275) ; | 1077 FrequencyDDSBes=FrequencyDDSBes+(DeltaFrep275) ; |
1080 FrequencyDDS3=FrequencyDDS3+DeltaDDS3 ; | 1078 FrequencyDDS3=FrequencyDDS3+DeltaDDS3 ; |
1081 DDS4xAD9912_SetFrequency(&DDS4xAD9912,2,FrequencyDDSBes); | 1079 DDS4xAD9912_SetFrequency(&DDS4xAD9912,2,FrequencyDDSBes); |
1082 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes); | 1080 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes); |