comparison 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
comparison
equal deleted inserted replaced
79:930acf691aa4 80:46fe62febcd0
2241 break; 2241 break;
2242 } 2242 }
2243 return 0; 2243 return 0;
2244 } 2244 }
2245 2245
2246 int CVICALLBACK CB_ResetDedriftDDS (int panel, int control, int event,
2247 void *callbackData, int eventData1, int eventData2)
2248 {
2249 switch (event)
2250 {
2251 case EVENT_COMMIT:
2252 // stop slope measurement and reset slope
2253 SlopeMeasuring = 0;
2254 SetCtrlVal(panel, PANEL_MEASURE_SLOPE, SlopeMeasuring);
2255 CenterFrequencyCh2 = 0.0;
2256 MoyMath2 = 0.0;
2257 Nratio = -1;
2258 CenterFrequencyCh2ToDetermine = TRUE ;
2259 appliedSlope = 0.0;
2260 SetCtrlVal(panel, PANEL_SLOPE_APPLIED, appliedSlope);
2261 // reset DDS
2262 DDSFox_Reset(&DDS1xAD9956);
2263 DDSFox_SetProfile(&DDS1xAD9956);
2264 DDSFox_SetDiv(&DDS1xAD9956, 1);
2265 DDSFox_Set(&DDS1xAD9956, DEDRIFT_DDS_FREQUENCY, appliedSlope);
2266 break;
2267 }
2268 return 0;
2269 }
2270