Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 33:09ed37e1da04
Indent
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 03 Oct 2012 12:53:54 +0200 |
parents | 3ea9fb26ecdf |
children | 1e4b8ba97faf |
comparison
equal
deleted
inserted
replaced
32:3ea9fb26ecdf | 33:09ed37e1da04 |
---|---|
981 { | 981 { |
982 nDDSChange=0; | 982 nDDSChange=0; |
983 | 983 |
984 double DeltaFrep275 = 275000-Ch4; | 984 double DeltaFrep275 = 275000-Ch4; |
985 double DeltaFrep10 = 10000-Ch2; | 985 double DeltaFrep10 = 10000-Ch2; |
986 DeltaDDS3= DeltaDDS3 +(DeltaFrep10); | 986 DeltaDDS3 = DeltaDDS3 + DeltaFrep10; |
987 FrequencyDDSBes=FrequencyDDSBesInit+(DeltaFrep275); | 987 FrequencyDDSBes = FrequencyDDSBesInit + DeltaFrep275; |
988 FrequencyDDS3=FrequencyDDS3Init+DeltaDDS3; | 988 FrequencyDDS3 = FrequencyDDS3Init + DeltaDDS3; |
989 | 989 |
990 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes) ; | 990 SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBes) ; |
991 DDS4xAD9912_SetFrequency(&DDS4xAD9912,2,FrequencyDDSBes); | 991 DDS4xAD9912_SetFrequency(&DDS4xAD9912,2,FrequencyDDSBes); |
992 | 992 |
993 Delay(0.1); | 993 Delay(0.1); |
2369 | 2369 |
2370 int CVICALLBACK CB_OnStartSlopeCancelling (int panel, int control, int event, | 2370 int CVICALLBACK CB_OnStartSlopeCancelling (int panel, int control, int event, |
2371 void *callbackData, int eventData1, int eventData2) | 2371 void *callbackData, int eventData1, int eventData2) |
2372 { | 2372 { |
2373 | 2373 |
2374 double ActualFrequ=0.0; | 2374 double ActualFrequ = 0.0; |
2375 double ActualSlope=0.0; | 2375 double ActualSlope = 0.0; |
2376 int buttonstatu=0; | 2376 int active; |
2377 | 2377 |
2378 switch (event) | 2378 switch (event) |
2379 { | 2379 { |
2380 case EVENT_COMMIT: | 2380 case EVENT_COMMIT: |
2381 if (control==PANEL_STARTCANCEL){ | |
2382 | 2381 |
2383 GetCtrlVal(MainPanel, PANEL_STARTCANCEL, &buttonstatu) ; | 2382 GetCtrlVal(MainPanel, PANEL_STARTCANCEL, &active); |
2384 | 2383 |
2385 if (buttonstatu==1) | 2384 if (active) { |
2386 { | 2385 |
2387 SlopeMeasuringTimeBegin=utc; | 2386 SlopeMeasuringTimeBegin=utc; |
2388 SlopeMeasuring=TRUE; | 2387 SlopeMeasuring=TRUE; |
2389 ActualFrequ=DDSFox_ReadFreq(&DDS1xAD9956); | 2388 ActualFrequ=DDSFox_ReadFreq(&DDS1xAD9956); |
2390 ActualSlope= SlopeMath2; | 2389 ActualSlope= SlopeMath2; |
2391 DDSFox_Set(&DDS1xAD9956, ActualFrequ, ActualSlope); | 2390 DDSFox_Set(&DDS1xAD9956, ActualFrequ, ActualSlope); |
2392 Nratio=-1; | 2391 Nratio=-1; |
2393 CenterFrequencyCh2ToDetermine=TRUE ; | 2392 CenterFrequencyCh2ToDetermine=TRUE ; |
2394 CenterFrequencyCh2=0.0; | 2393 CenterFrequencyCh2=0.0; |
2395 | 2394 |
2396 } | 2395 } else { |
2397 else | 2396 |
2398 { | 2397 if (KeepFrequ) { |
2399 if (KeepFrequ==TRUE) {ActualFrequ=DDSFox_ReadFreq(&DDS1xAD9956);} | 2398 ActualFrequ = DDSFox_ReadFreq(&DDS1xAD9956); |
2400 else { ActualFrequ= DEDRIFT_DDS_FREQUENCY;} | 2399 } else { |
2401 if (KeepSlope==TRUE) {ActualSlope= SlopeMath2; | 2400 ActualFrequ = DEDRIFT_DDS_FREQUENCY; |
2402 OnSlopeCancelling =TRUE; } | 2401 } |
2403 else { ActualSlope= 0.0; | 2402 |
2404 OnSlopeCancelling =FALSE; } | 2403 if (KeepSlope) { |
2405 DDSFox_Set(&DDS1xAD9956, ActualFrequ, ActualSlope); | 2404 ActualSlope = SlopeMath2; |
2406 SlopeMeasuring=FALSE; | 2405 OnSlopeCancelling = TRUE; |
2407 N_Math2slope=0.0; | 2406 } else { |
2408 Math2_slope=0.0; | 2407 ActualSlope = 0.0; |
2409 Moy_Math2slope=0.0; | 2408 OnSlopeCancelling = FALSE; |
2410 Slope_Math2slope=0.0; | 2409 } |
2411 MoyMath2=0.0; | 2410 |
2412 Slope_Math2slope=0.0; | 2411 DDSFox_Set(&DDS1xAD9956, ActualFrequ, ActualSlope); |
2413 CenterFrequencyCh2= 0.0; | 2412 SlopeMeasuring=FALSE; |
2414 Nratio=-1; | 2413 N_Math2slope=0.0; |
2415 nstabilisationSlopeMeasuring=0; | 2414 Math2_slope=0.0; |
2416 } | 2415 Moy_Math2slope=0.0; |
2417 } | 2416 Slope_Math2slope=0.0; |
2418 | 2417 MoyMath2=0.0; |
2419 break; | 2418 Slope_Math2slope=0.0; |
2420 | 2419 CenterFrequencyCh2= 0.0; |
2421 } | 2420 Nratio=-1; |
2421 nstabilisationSlopeMeasuring=0; | |
2422 | |
2423 } | |
2424 break; | |
2425 } | |
2422 return 0; | 2426 return 0; |
2423 } | 2427 } |
2424 | 2428 |
2425 | 2429 |
2426 int CVICALLBACK CB_OnResetSlope (int panel, int control, int event, | 2430 int CVICALLBACK CB_OnResetSlope (int panel, int control, int event, |