Mercurial > hg > fxanalyse
changeset 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 |
files | FXAnalyse.c FXAnalyse.h |
diffstat | 2 files changed, 94 insertions(+), 95 deletions(-) [+] |
line wrap: on
line diff
--- a/FXAnalyse.c Tue Oct 02 16:31:32 2012 +0200 +++ b/FXAnalyse.c Tue Oct 02 16:51:57 2012 +0200 @@ -111,7 +111,6 @@ double FrequencyDDSBes=0.0,FrequencyDDSBesInit=0.0; double FrequencyDDS3=0.0,FrequencyDDS3Init=0.0; -double DeltaFrep275=0.0,DeltaFrep10=0.0; ; double DDSBesChanged1=FALSE,DDSBesChanged2=FALSE; double DeltaDDS3=0.0,Delta10K_Plus=0.0,Delta10K_Minus=0.0; @@ -846,7 +845,7 @@ Slope_Ch4slope_1 = 0.0; // frep positive step - DDS4xAD9912_FrequencyRampe(&DDS4xAD9912,1, FrequDDS1,(FrequDDS1+DeltakHz_1*1000), Step1/Ndiv ); + DDS4xAD9912_FrequencyRampe(&DDS4xAD9912,1, FrequDDS1,(FrequDDS1+DeltakHz_1*1000), Step1/Ndiv); SetCtrlVal(MainPanel, PANEL_DDS1, (FrequDDS1+DeltakHz_1*1000)); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, (FrequDDS1+DeltakHz_1*1000)); @@ -867,8 +866,7 @@ break; } - DeltaFrep275 = 275000 - Ch4; - double fDDS2 = FrequencyDDSBesInit + (DeltaFrep275); + double fDDS2 = FrequencyDDSBesInit + 275000 - Ch4; SetCtrlVal(MainPanel, PANEL_DDS2, fDDS2) ; DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, fDDS2); @@ -1012,8 +1010,8 @@ { nDDSChange=0; - DeltaFrep275=275000-Ch4; - DeltaFrep10=10000-Ch2; + double DeltaFrep275 = 275000-Ch4; + double DeltaFrep10 = 10000-Ch2; DeltaDDS3= DeltaDDS3 +(DeltaFrep10); FrequencyDDSBes=FrequencyDDSBesInit+(DeltaFrep275); FrequencyDDS3=FrequencyDDS3Init+DeltaDDS3; @@ -1073,8 +1071,8 @@ nDDSChange=0; - DeltaFrep275=275000-Ch4; - DeltaFrep10=10000-Ch2; + double DeltaFrep275=275000-Ch4; + double DeltaFrep10=10000-Ch2; DeltaDDS3 = DeltaDDS3+(DeltaFrep10) ; FrequencyDDSBes=FrequencyDDSBes+(DeltaFrep275) ; FrequencyDDS3=FrequencyDDS3+DeltaDDS3 ;
--- a/FXAnalyse.h Tue Oct 02 16:31:32 2012 +0200 +++ b/FXAnalyse.h Tue Oct 02 16:51:57 2012 +0200 @@ -96,93 +96,94 @@ #define PANEL_DDS4STEP 40 /* control type: ring, callback function: CB_ChangeDDSStep */ #define PANEL_DDS3STEP 41 /* control type: ring, callback function: CB_ChangeDDSStep */ #define PANEL_DDS2STEP 42 /* control type: ring, callback function: CB_ChangeDDSStep */ -#define PANEL_CENTERFREQUENCY 43 /* control type: numeric, callback function: (none) */ -#define PANEL_SLOPETOCANCEL 44 /* control type: numeric, callback function: (none) */ -#define PANEL_MATH4 45 /* control type: numeric, callback function: (none) */ -#define PANEL_MATH5 46 /* control type: numeric, callback function: (none) */ -#define PANEL_MATH3 47 /* control type: numeric, callback function: (none) */ -#define PANEL_CHECKBOX_MATH5PLOT 48 /* control type: radioButton, callback function: CB_OnFreqPlot */ -#define PANEL_CHECKBOX_MATH4PLOT 49 /* control type: radioButton, callback function: CB_OnFreqPlot */ -#define PANEL_CHECKBOX_MATH4ALLAN 50 /* control type: radioButton, callback function: CB_OnAllanPlot */ -#define PANEL_DDS1STEP 51 /* control type: ring, callback function: CB_ChangeDDSStep */ -#define PANEL_TEXTMSG_15 52 /* control type: textMsg, callback function: (none) */ -#define PANEL_CHECKBOX_MATH5ALLAN 53 /* control type: radioButton, callback function: CB_OnAllanPlot */ -#define PANEL_CHECKBOX_MATH3PLOT 54 /* control type: radioButton, callback function: CB_OnFreqPlot */ -#define PANEL_CHECKBOX_MATH5SAVE 55 /* control type: radioButton, callback function: (none) */ -#define PANEL_CHECKBOX_MATH3SAVE_2 56 /* control type: radioButton, callback function: CB_OnSaveSr */ -#define PANEL_CHECKBOX_MATH3ALLAN 57 /* control type: radioButton, callback function: CB_OnAllanPlot */ -#define PANEL_DDSFREPSTEP 58 /* control type: ring, callback function: CB_ChangeDDSStep */ -#define PANEL_DDSFREPAMP 59 /* control type: numeric, callback function: CB_ChangeDDSAmpli */ -#define PANEL_MATHSTRING4 60 /* control type: string, callback function: CB_ChangeMath */ -#define PANEL_TEXTMSG_17 61 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATH2 62 /* control type: numeric, callback function: (none) */ -#define PANEL_SPLITTER_15 63 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_12 64 /* control type: splitter, callback function: (none) */ -#define PANEL_CHECKBOX_MATH2PLOT 65 /* control type: radioButton, callback function: CB_OnFreqPlot */ -#define PANEL_CHECKBOX_MATH3SAVE 66 /* control type: radioButton, callback function: CB_OnSaveHg */ -#define PANEL_CHECKBOX_MATH2SAVE 67 /* control type: radioButton, callback function: CB_OnSaveOpt */ -#define PANEL_CHECKBOX_MATH2ALLAN 68 /* control type: radioButton, callback function: CB_OnAllanPlot */ -#define PANEL_TEXTMSG_7 69 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATHSTRING3 70 /* control type: string, callback function: CB_ChangeMath */ -#define PANEL_MATH1 71 /* control type: numeric, callback function: (none) */ -#define PANEL_SPLITTER_6 72 /* control type: splitter, callback function: (none) */ -#define PANEL_TEXTMSG_18 73 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_6 74 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_8 75 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_19 76 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATHSTRING1 77 /* control type: string, callback function: CB_ChangeMath */ -#define PANEL_TEXTMSG_9 78 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_10 79 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATHSTRING2 80 /* control type: string, callback function: CB_ChangeMath */ -#define PANEL_TEXTMSG_16 81 /* control type: textMsg, callback function: (none) */ -#define PANEL_SPLITTER_11 82 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_16 83 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_9 84 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_3 85 /* control type: splitter, callback function: (none) */ -#define PANEL_MINUS10KDDS1 86 /* control type: command, callback function: CB_OnMinus10k */ -#define PANEL_MINUS10KDDS4 87 /* control type: command, callback function: CB_OnMinus10k */ -#define PANEL_MINUS10KDDS3 88 /* control type: command, callback function: CB_OnMinus10k */ -#define PANEL_MINUS10KDDS2 89 /* control type: command, callback function: CB_OnMinus10k */ -#define PANEL_PLUS10KDDS4 90 /* control type: command, callback function: CB_OnPlus10k */ -#define PANEL_MINUS275K 91 /* control type: command, callback function: CB_OnMinus275k */ -#define PANEL_PLUS10KDDS3 92 /* control type: command, callback function: CB_OnPlus10k */ -#define PANEL_PLUS10KDDS1 93 /* control type: command, callback function: CB_OnPlus10k */ -#define PANEL_PLUS10KDDS2 94 /* control type: command, callback function: CB_OnPlus10k */ -#define PANEL_PLUS275K 95 /* control type: command, callback function: CB_OnPlus275k */ -#define PANEL_TEXTMSG_11 96 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATHSTRING5 97 /* control type: textBox, callback function: CB_ChangeMath */ -#define PANEL_SPLITTER_8 98 /* control type: splitter, callback function: (none) */ -#define PANEL_MJD 99 /* control type: numeric, callback function: (none) */ -#define PANEL_UTC 100 /* control type: numeric, callback function: (none) */ -#define PANEL_TIME 101 /* control type: string, callback function: (none) */ -#define PANEL_DATE 102 /* control type: string, callback function: (none) */ -#define PANEL_CHECKBOX_MATH3AUTOSAV 103 /* control type: radioButton, callback function: CB_OnAutoSaveSr */ -#define PANEL_CHECKBOX_MATH2AUTOSAV 104 /* control type: radioButton, callback function: CB_OnAutoSaveHg */ -#define PANEL_CHOOSESAVEFILE 105 /* control type: command, callback function: OnChooseSaveFile */ -#define PANEL_SPLITTER_14 106 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_13 107 /* control type: splitter, callback function: (none) */ -#define PANEL_DDS4 108 /* control type: numeric, callback function: CB_ChangeDDSOut */ -#define PANEL_SPLITTER_2 109 /* control type: splitter, callback function: (none) */ -#define PANEL_DDS3 110 /* control type: numeric, callback function: CB_ChangeDDSOut */ -#define PANEL_N1CALCULUS 111 /* control type: command, callback function: CB_OnNCalculus */ -#define PANEL_FINDSIGN3 112 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN3 113 /* control type: numeric, callback function: (none) */ -#define PANEL_FINDSIGN2 114 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN2 115 /* control type: numeric, callback function: (none) */ -#define PANEL_FINDSIGN1 116 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN1 117 /* control type: numeric, callback function: (none) */ -#define PANEL_FIND10K3 118 /* control type: command, callback function: CB_OnFind275K */ -#define PANEL_FIND275K2 119 /* control type: command, callback function: CB_OnFind275K */ -#define PANEL_RESETSLOPE 120 /* control type: command, callback function: CB_OnResetSlope */ -#define PANEL_CHECKBOX_STOPIFAUTODE 121 /* control type: radioButton, callback function: CB_OnAutoStopSlopeCancellingIfDelock */ -#define PANEL_CHECKBOX_RECENTER 122 /* control type: radioButton, callback function: CB_OnReCentering */ -#define PANEL_CHECKBOX_KEEPSLOPE 123 /* control type: radioButton, callback function: CB_OnCROX */ -#define PANEL_CHECKBOX_KEEP 124 /* control type: radioButton, callback function: CB_OnCROX */ -#define PANEL_STARTCANCEL 125 /* control type: textButton, callback function: CB_OnStartSlopeCancelling */ -#define PANEL_LED1 126 /* control type: LED, callback function: (none) */ -#define PANEL_LED2 127 /* control type: LED, callback function: (none) */ -#define PANEL_SLOPE_REFERENCE 128 /* control type: ring, callback function: CB_OnSlopeReference */ -#define PANEL_ESTIMATE_N3 129 /* control type: command, callback function: CB_OnEstimateN */ +#define PANEL_CURRENT_FREQUENCY 43 /* control type: numeric, callback function: (none) */ +#define PANEL_CENTERFREQUENCY 44 /* control type: numeric, callback function: (none) */ +#define PANEL_SLOPETOCANCEL 45 /* control type: numeric, callback function: (none) */ +#define PANEL_MATH4 46 /* control type: numeric, callback function: (none) */ +#define PANEL_MATH5 47 /* control type: numeric, callback function: (none) */ +#define PANEL_MATH3 48 /* control type: numeric, callback function: (none) */ +#define PANEL_CHECKBOX_MATH5PLOT 49 /* control type: radioButton, callback function: CB_OnFreqPlot */ +#define PANEL_CHECKBOX_MATH4PLOT 50 /* control type: radioButton, callback function: CB_OnFreqPlot */ +#define PANEL_CHECKBOX_MATH4ALLAN 51 /* control type: radioButton, callback function: CB_OnAllanPlot */ +#define PANEL_DDS1STEP 52 /* control type: ring, callback function: CB_ChangeDDSStep */ +#define PANEL_TEXTMSG_15 53 /* control type: textMsg, callback function: (none) */ +#define PANEL_CHECKBOX_MATH5ALLAN 54 /* control type: radioButton, callback function: CB_OnAllanPlot */ +#define PANEL_CHECKBOX_MATH3PLOT 55 /* control type: radioButton, callback function: CB_OnFreqPlot */ +#define PANEL_CHECKBOX_MATH5SAVE 56 /* control type: radioButton, callback function: (none) */ +#define PANEL_CHECKBOX_MATH3SAVE_2 57 /* control type: radioButton, callback function: CB_OnSaveSr */ +#define PANEL_CHECKBOX_MATH3ALLAN 58 /* control type: radioButton, callback function: CB_OnAllanPlot */ +#define PANEL_DDSFREPSTEP 59 /* control type: ring, callback function: CB_ChangeDDSStep */ +#define PANEL_DDSFREPAMP 60 /* control type: numeric, callback function: CB_ChangeDDSAmpli */ +#define PANEL_MATHSTRING4 61 /* control type: string, callback function: CB_ChangeMath */ +#define PANEL_TEXTMSG_17 62 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATH2 63 /* control type: numeric, callback function: (none) */ +#define PANEL_SPLITTER_15 64 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_12 65 /* control type: splitter, callback function: (none) */ +#define PANEL_CHECKBOX_MATH2PLOT 66 /* control type: radioButton, callback function: CB_OnFreqPlot */ +#define PANEL_CHECKBOX_MATH3SAVE 67 /* control type: radioButton, callback function: CB_OnSaveHg */ +#define PANEL_CHECKBOX_MATH2SAVE 68 /* control type: radioButton, callback function: CB_OnSaveOpt */ +#define PANEL_CHECKBOX_MATH2ALLAN 69 /* control type: radioButton, callback function: CB_OnAllanPlot */ +#define PANEL_TEXTMSG_7 70 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATHSTRING3 71 /* control type: string, callback function: CB_ChangeMath */ +#define PANEL_MATH1 72 /* control type: numeric, callback function: (none) */ +#define PANEL_SPLITTER_6 73 /* control type: splitter, callback function: (none) */ +#define PANEL_TEXTMSG_18 74 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_6 75 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_8 76 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_19 77 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATHSTRING1 78 /* control type: string, callback function: CB_ChangeMath */ +#define PANEL_TEXTMSG_9 79 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_10 80 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATHSTRING2 81 /* control type: string, callback function: CB_ChangeMath */ +#define PANEL_TEXTMSG_16 82 /* control type: textMsg, callback function: (none) */ +#define PANEL_SPLITTER_11 83 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_16 84 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_9 85 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_3 86 /* control type: splitter, callback function: (none) */ +#define PANEL_MINUS10KDDS1 87 /* control type: command, callback function: CB_OnMinus10k */ +#define PANEL_MINUS10KDDS4 88 /* control type: command, callback function: CB_OnMinus10k */ +#define PANEL_MINUS10KDDS3 89 /* control type: command, callback function: CB_OnMinus10k */ +#define PANEL_MINUS10KDDS2 90 /* control type: command, callback function: CB_OnMinus10k */ +#define PANEL_PLUS10KDDS4 91 /* control type: command, callback function: CB_OnPlus10k */ +#define PANEL_MINUS275K 92 /* control type: command, callback function: CB_OnMinus275k */ +#define PANEL_PLUS10KDDS3 93 /* control type: command, callback function: CB_OnPlus10k */ +#define PANEL_PLUS10KDDS1 94 /* control type: command, callback function: CB_OnPlus10k */ +#define PANEL_PLUS10KDDS2 95 /* control type: command, callback function: CB_OnPlus10k */ +#define PANEL_PLUS275K 96 /* control type: command, callback function: CB_OnPlus275k */ +#define PANEL_TEXTMSG_11 97 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATHSTRING5 98 /* control type: textBox, callback function: CB_ChangeMath */ +#define PANEL_SPLITTER_8 99 /* control type: splitter, callback function: (none) */ +#define PANEL_MJD 100 /* control type: numeric, callback function: (none) */ +#define PANEL_UTC 101 /* control type: numeric, callback function: (none) */ +#define PANEL_TIME 102 /* control type: string, callback function: (none) */ +#define PANEL_DATE 103 /* control type: string, callback function: (none) */ +#define PANEL_CHECKBOX_MATH3AUTOSAV 104 /* control type: radioButton, callback function: CB_OnAutoSaveSr */ +#define PANEL_CHECKBOX_MATH2AUTOSAV 105 /* control type: radioButton, callback function: CB_OnAutoSaveHg */ +#define PANEL_CHOOSESAVEFILE 106 /* control type: command, callback function: OnChooseSaveFile */ +#define PANEL_SPLITTER_14 107 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_13 108 /* control type: splitter, callback function: (none) */ +#define PANEL_DDS4 109 /* control type: numeric, callback function: CB_ChangeDDSOut */ +#define PANEL_SPLITTER_2 110 /* control type: splitter, callback function: (none) */ +#define PANEL_DDS3 111 /* control type: numeric, callback function: CB_ChangeDDSOut */ +#define PANEL_N1CALCULUS 112 /* control type: command, callback function: CB_OnNCalculus */ +#define PANEL_FINDSIGN3 113 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN3 114 /* control type: numeric, callback function: (none) */ +#define PANEL_FINDSIGN2 115 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN2 116 /* control type: numeric, callback function: (none) */ +#define PANEL_FINDSIGN1 117 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN1 118 /* control type: numeric, callback function: (none) */ +#define PANEL_FIND10K3 119 /* control type: command, callback function: CB_OnFind275K */ +#define PANEL_FIND275K2 120 /* control type: command, callback function: CB_OnFind275K */ +#define PANEL_RESETSLOPE 121 /* control type: command, callback function: CB_OnResetSlope */ +#define PANEL_CHECKBOX_STOPIFAUTODE 122 /* control type: radioButton, callback function: CB_OnAutoStopSlopeCancellingIfDelock */ +#define PANEL_CHECKBOX_RECENTER 123 /* control type: radioButton, callback function: CB_OnReCentering */ +#define PANEL_CHECKBOX_KEEPSLOPE 124 /* control type: radioButton, callback function: CB_OnCROX */ +#define PANEL_CHECKBOX_KEEP 125 /* control type: radioButton, callback function: CB_OnCROX */ +#define PANEL_STARTCANCEL 126 /* control type: textButton, callback function: CB_OnStartSlopeCancelling */ +#define PANEL_LED1 127 /* control type: LED, callback function: (none) */ +#define PANEL_LED2 128 /* control type: LED, callback function: (none) */ +#define PANEL_SLOPE_REFERENCE 129 /* control type: ring, callback function: CB_OnSlopeReference */ +#define PANEL_ESTIMATE_N3 130 /* control type: command, callback function: CB_OnEstimateN */ /* Menu Bars, Menus, and Menu Items: */