Mercurial > hg > fxanalyse
diff FXAnalyse.c @ 80:46fe62febcd0
Add dedrifting DDS reset functionality
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 18 Mar 2013 12:34:05 +0100 |
parents | 930acf691aa4 |
children | 47860259afe2 |
line wrap: on
line diff
--- a/FXAnalyse.c Wed Feb 27 09:49:05 2013 +0100 +++ b/FXAnalyse.c Mon Mar 18 12:34:05 2013 +0100 @@ -2243,3 +2243,28 @@ return 0; } +int CVICALLBACK CB_ResetDedriftDDS (int panel, int control, int event, + void *callbackData, int eventData1, int eventData2) +{ + switch (event) + { + case EVENT_COMMIT: + // stop slope measurement and reset slope + SlopeMeasuring = 0; + SetCtrlVal(panel, PANEL_MEASURE_SLOPE, SlopeMeasuring); + CenterFrequencyCh2 = 0.0; + MoyMath2 = 0.0; + Nratio = -1; + CenterFrequencyCh2ToDetermine = TRUE ; + appliedSlope = 0.0; + SetCtrlVal(panel, PANEL_SLOPE_APPLIED, appliedSlope); + // reset DDS + DDSFox_Reset(&DDS1xAD9956); + DDSFox_SetProfile(&DDS1xAD9956); + DDSFox_SetDiv(&DDS1xAD9956, 1); + DDSFox_Set(&DDS1xAD9956, DEDRIFT_DDS_FREQUENCY, appliedSlope); + break; + } + return 0; +} +