comparison FXAnalyse.c @ 53:57e2e88aadb9

Remove unused variable
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Wed, 10 Oct 2012 18:17:30 +0200
parents 30146cc6cd77
children 73e23c879d6e
comparison
equal deleted inserted replaced
52:30146cc6cd77 53:57e2e88aadb9
102 102
103 // slope cancelling 103 // slope cancelling
104 104
105 int SlopeMeasuring = FALSE; 105 int SlopeMeasuring = FALSE;
106 int AutoStopSlopeCancellingIfDelock = TRUE; 106 int AutoStopSlopeCancellingIfDelock = TRUE;
107 int OnSlopeCancelling = FALSE;
108 double SlopeMath2 = 0.0; // currently applied frequency dedrifiting slope 107 double SlopeMath2 = 0.0; // currently applied frequency dedrifiting slope
109 double TimetoSlope = 60.0; 108 double TimetoSlope = 60.0;
110 double SlopeMeasuringTimeBegin = 0.0; 109 double SlopeMeasuringTimeBegin = 0.0;
111 110
112 double Slope_Math2slope=0.0,Math2_slope=0.0,Moy_Math2slope=0.0; 111 double Slope_Math2slope=0.0,Math2_slope=0.0,Moy_Math2slope=0.0;
1224 } 1223 }
1225 1224
1226 if ((utc - SlopeMeasuringTimeBegin) > TimetoSlope) { 1225 if ((utc - SlopeMeasuringTimeBegin) > TimetoSlope) {
1227 1226
1228 Nratio = Nratio + 1; 1227 Nratio = Nratio + 1;
1229 if Nratio >= 1 1228 if (Nratio >= 1)
1230 MoyMath2 = MoyMath2 + Moy_Math2slope; 1229 MoyMath2 = MoyMath2 + Moy_Math2slope;
1231 1230
1232 if (invertSlopeSign) 1231 if (invertSlopeSign)
1233 SlopeMath2 = SlopeMath2 - Slope_Math2slope; 1232 SlopeMath2 = SlopeMath2 - Slope_Math2slope;
1234 else 1233 else
1241 1240
1242 if (Nratio == 1 && CenterFrequencyCh2ToDetermine == TRUE) { 1241 if (Nratio == 1 && CenterFrequencyCh2ToDetermine == TRUE) {
1243 CenterFrequencyCh2 = MoyMath2; 1242 CenterFrequencyCh2 = MoyMath2;
1244 CenterFrequencyCh2ToDetermine = FALSE; 1243 CenterFrequencyCh2ToDetermine = FALSE;
1245 } 1244 }
1246
1247 OnSlopeCancelling = TRUE;
1248 1245
1249 if (Nratio == ratio) { 1246 if (Nratio == ratio) {
1250 if (FrequCorrec == TRUE) { 1247 if (FrequCorrec == TRUE) {
1251 SlopeCorrection = (MoyMath2/ratio-CenterFrequencyCh2)/TimetoSlope; 1248 SlopeCorrection = (MoyMath2/ratio-CenterFrequencyCh2)/TimetoSlope;
1252 SlopeMath2 = SlopeMath2 + SlopeCorrection; 1249 SlopeMath2 = SlopeMath2 + SlopeCorrection;
1286 1283
1287 double frequency = DEDRIFT_DDS_FREQUENCY; 1284 double frequency = DEDRIFT_DDS_FREQUENCY;
1288 if (KeepFrequ) 1285 if (KeepFrequ)
1289 frequency = DDSFox_ReadFreq(&DDS1xAD9956); 1286 frequency = DDSFox_ReadFreq(&DDS1xAD9956);
1290 1287
1291 if (! KeepSlope) { 1288 if (! KeepSlope)
1292 SlopeMath2 = 0.0; 1289 SlopeMath2 = 0.0;
1293 OnSlopeCancelling = FALSE;
1294 }
1295 1290
1296 SetCtrlVal(MainPanel, PANEL_SLOPETOCANCEL, SlopeMath2); 1291 SetCtrlVal(MainPanel, PANEL_SLOPETOCANCEL, SlopeMath2);
1297 DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2); 1292 DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2);
1298 1293
1299 SlopeMeasuring = FALSE; 1294 SlopeMeasuring = FALSE;
2289 case EVENT_COMMIT: 2284 case EVENT_COMMIT:
2290 CenterFrequencyCh2 = 0.0; 2285 CenterFrequencyCh2 = 0.0;
2291 MoyMath2 = 0.0; 2286 MoyMath2 = 0.0;
2292 Nratio = -1; 2287 Nratio = -1;
2293 CenterFrequencyCh2ToDetermine = TRUE ; 2288 CenterFrequencyCh2ToDetermine = TRUE ;
2294 OnSlopeCancelling = FALSE;
2295 SlopeMath2 = 0.0; 2289 SlopeMath2 = 0.0;
2296 SetCtrlVal(panel, PANEL_SLOPETOCANCEL, SlopeMath2); 2290 SetCtrlVal(panel, PANEL_SLOPETOCANCEL, SlopeMath2);
2297 DDSFox_Set(&DDS1xAD9956, DEDRIFT_DDS_FREQUENCY, SlopeMath2); 2291 DDSFox_Set(&DDS1xAD9956, DEDRIFT_DDS_FREQUENCY, SlopeMath2);
2298 break; 2292 break;
2299 } 2293 }