diff FXAnalyse.c @ 28:1e4ecf64b485

Remove references to unused DDSBes
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 02 Oct 2012 17:51:27 +0200
parents 419db63a9949
children 585c60175bd5
line wrap: on
line diff
--- a/FXAnalyse.c	Tue Oct 02 16:51:57 2012 +0200
+++ b/FXAnalyse.c	Tue Oct 02 17:51:27 2012 +0200
@@ -57,7 +57,6 @@
 Plot_Data PlotCh1, PlotCh2, PlotCh3, PlotCh4, PlotMath1, PlotMath2, PlotMath3, PlotMath4, PlotMath5 ;  
 Allan_Data AllanCh1, AllanCh2, AllanCh3, AllanCh4, AllanMath1, AllanMath2, AllanMath3, AllanMath4, AllanMath5 ; 
 
-DDSBes_Data DDSBes ;
 DDS4xAD9912_Data DDS4xAD9912 ;
 
 muParserHandle_t MathParser1, MathParser2, MathParser3, MathParser4, MathParser5 ;
@@ -211,7 +210,6 @@
 	mupDefineVar( * pMathParser, "Ch2", &Ch2);
 	mupDefineVar( * pMathParser, "Ch3", &Ch3);
 	mupDefineVar( * pMathParser, "Ch4", &Ch4);
-	mupDefineVar( * pMathParser, "DDS_Frep", &(DDSBes.Frequency));
 	mupDefineVar( * pMathParser, "DDS1", &(DDS4xAD9912.Frequency1));   
 	mupDefineVar( * pMathParser, "DDS2", &(DDS4xAD9912.Frequency2));
 	mupDefineVar( * pMathParser, "DDS3", &(DDS4xAD9912.Frequency3));  
@@ -264,14 +262,6 @@
 	
 	DisplayPanel (MainPanel);
 	
-	// Initialyze the DDS Besancon Output
-	
-	DDSBes_Initialize(&DDSBes) ;
-	DDSBes_SetClockFrequency(&DDSBes, DDSBESCLOCK) ;	   // Peut etre passer tout ca dans DDSBes-Initialize ?
-	DDSBes_SetAmplitude(&DDSBes, 4095) ;
-	GetCtrlVal(MainPanel, PANEL_DDSFREPOUT,&initfreqDDS) ;
-	DDSBes_SetFrequency(&DDSBes, initfreqDDS) ; 
-	
 	// Initialize the quadruple AD9959 DDS (Fox board interface)
 	
 	DDS4xAD9912_Reset(&DDS4xAD9912) ;
@@ -296,9 +286,8 @@
 
 	GetCtrlVal(MainPanel, PANEL_N3CHOICE, &N3) ;
 	
-	initMathParser(&MathParser1) ;
-	mupDefineVar(MathParser1, "DDS", &(DDSBes.Frequency));
-	GetCtrlVal(MainPanel, PANEL_MATHSTRING1, MathString1) ;
+	initMathParser(&MathParser1);
+	GetCtrlVal(MainPanel, PANEL_MATHSTRING1, MathString1);
 	mupSetExpr(MathParser1, MathString1);
 	
 	initMathParser(&MathParser2) ;
@@ -375,7 +364,6 @@
 		{
 		case EVENT_COMMIT:
 			QuitUserInterface (0);
-			DDSBes_Close(&DDSBes);
 			mupRelease(MathParser1);
 			mupRelease(MathParser2); 
 			mupRelease(MathParser3);
@@ -398,7 +386,6 @@
 	switch (event) {
 		case EVENT_CLOSE:
 			QuitUserInterface (0);
-			DDSBes_Close(&DDSBes);
 			mupRelease(MathParser1);
 			mupRelease(MathParser2); 
 			mupRelease(MathParser3);
@@ -408,14 +395,6 @@
 				{
 				case VAL_RIGHT_ARROW_VKEY :
 					ActiveControl = GetActiveCtrl(panel);
-					if (ActiveControl==PANEL_DDSFREPOUT || ActiveControl==PANEL_DDSFREPSTEP) {
-						GetCtrlIndex(MainPanel, PANEL_DDSFREPSTEP, &StepIndex);
-						if (StepIndex<14){
-							SetCtrlIndex(MainPanel, PANEL_DDSFREPSTEP, ++StepIndex) ;
-							GetCtrlVal(MainPanel, PANEL_DDSFREPSTEP, &Step);
-							SetCtrlAttribute(MainPanel, PANEL_DDSFREPOUT, ATTR_INCR_VALUE, Step) ;
-						};
-					};
 					if (ActiveControl==PANEL_DDS1 || ActiveControl==PANEL_DDS1STEP) {
 						GetCtrlIndex(MainPanel, PANEL_DDS1STEP, &StepIndex);
 						if (StepIndex<14){
@@ -451,14 +430,6 @@
 					break;
 				case VAL_LEFT_ARROW_VKEY :
 					ActiveControl = GetActiveCtrl(panel);
-					if (ActiveControl==PANEL_DDSFREPOUT || ActiveControl==PANEL_DDSFREPSTEP) {
-						GetCtrlIndex(MainPanel, PANEL_DDSFREPSTEP, &StepIndex);
-						if (StepIndex>0){
-							SetCtrlIndex(MainPanel, PANEL_DDSFREPSTEP, --StepIndex) ;
-							GetCtrlVal(MainPanel, PANEL_DDSFREPSTEP, &Step);
-							SetCtrlAttribute(MainPanel, PANEL_DDSFREPOUT, ATTR_INCR_VALUE, Step) ;
-						};
-					};
 					if (ActiveControl==PANEL_DDS1 || ActiveControl==PANEL_DDS1STEP) {
 						GetCtrlIndex(MainPanel, PANEL_DDS1STEP, &StepIndex);
 						if (StepIndex>0){
@@ -492,9 +463,6 @@
 						};
 					};
 					break;
-				case VAL_F1_VKEY :
-					SetActiveCtrl(MainPanel, PANEL_DDSFREPOUT);
-					break;
 				case VAL_F2_VKEY :
 					SetActiveCtrl(MainPanel, PANEL_DDS1);
 					break;
@@ -1705,22 +1673,27 @@
 int  CVICALLBACK CB_ChangeDDSOut (int panel, int control, int event, 
 		 void *callbackData, int eventData1, int eventData2)
 {
-	double Frequency ;
+	double frequency ;
 	
-	switch (event)
-		{
+	switch (event) {
 		case EVENT_COMMIT:
-			GetCtrlVal(MainPanel, control, &Frequency) ;
-			if (control==PANEL_DDSFREPOUT) { DDSBes_SetFrequency(&DDSBes, Frequency) ;}
-			if (control==PANEL_DDS1)   { DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, Frequency);}
-			if (control==PANEL_DDS2)   { DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, Frequency);} 
-			if (control==PANEL_DDS3)   { DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, Frequency);}
-			if (control==PANEL_DDS4)   { DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, Frequency);} 
-		case EVENT_RIGHT_CLICK:
-
-			break;
+			GetCtrlVal(MainPanel, control, &frequency);
 			
-		}
+			switch (control) {
+				case PANEL_DDS1:
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, frequency);
+					break;
+				case PANEL_DDS2:
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, frequency);
+					break;
+				case PANEL_DDS3:
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, frequency);
+					break;
+				case PANEL_DDS4:
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, frequency);
+					break;
+			}
+	}
 	return 0;
 }
 
@@ -1732,31 +1705,12 @@
 	switch (event)
 		{
 		case EVENT_COMMIT:
-			GetCtrlVal(MainPanel, control, &Step) ;
-			if (control==PANEL_DDSFREPSTEP) { SetCtrlAttribute(panel, PANEL_DDSFREPOUT, ATTR_INCR_VALUE, Step) ;}
-			if (control==PANEL_DDS1STEP)   { SetCtrlAttribute(panel, PANEL_DDS1,   ATTR_INCR_VALUE, Step) ;}   
-			if (control==PANEL_DDS2STEP)   { SetCtrlAttribute(panel, PANEL_DDS2,   ATTR_INCR_VALUE, Step) ;}
-			if (control==PANEL_DDS3STEP)   { SetCtrlAttribute(panel, PANEL_DDS3,   ATTR_INCR_VALUE, Step) ;}   
-			if (control==PANEL_DDS4STEP)   { SetCtrlAttribute(panel, PANEL_DDS4,   ATTR_INCR_VALUE, Step) ;} 
-			break;
-		case EVENT_RIGHT_CLICK:
-
+			GetCtrlVal(MainPanel, control, &Step);
+			if (control==PANEL_DDS1STEP)   { SetCtrlAttribute(panel, PANEL_DDS1,   ATTR_INCR_VALUE, Step); }   
+			if (control==PANEL_DDS2STEP)   { SetCtrlAttribute(panel, PANEL_DDS2,   ATTR_INCR_VALUE, Step); }
+			if (control==PANEL_DDS3STEP)   { SetCtrlAttribute(panel, PANEL_DDS3,   ATTR_INCR_VALUE, Step); }   
+			if (control==PANEL_DDS4STEP)   { SetCtrlAttribute(panel, PANEL_DDS4,   ATTR_INCR_VALUE, Step); } 
 			break;
-			
-		}
-	return 0;
-}
-
-int  CVICALLBACK CB_ChangeDDSAmpli (int panel, int control, int event, 
-		 void *callbackData, int eventData1, int eventData2)
-{
-	unsigned short int Amplitude ;
-	
-	switch (event)
-		{
-		case EVENT_COMMIT:
-			GetCtrlVal(MainPanel, control, &Amplitude) ;
-			if (control==PANEL_DDSFREPAMP) { DDSBes_SetAmplitude(&DDSBes, Amplitude) ;}
 		case EVENT_RIGHT_CLICK:
 
 			break;
@@ -1815,43 +1769,6 @@
 	return 0;
 }
 
-
-int CVICALLBACK CB_OnPlus275k (int panel, int control, int event,
-		void *callbackData, int eventData1, int eventData2)
-{
-	double Frequency ;
-	
-	switch (event)
-	{
-		case EVENT_COMMIT:
-			GetCtrlVal(MainPanel, PANEL_DDSFREPOUT, &Frequency);
-			Frequency += 275000.0;
-			DDSBes_SetFrequency(&DDSBes, Frequency);
-			SetCtrlVal(MainPanel, PANEL_DDSFREPOUT, Frequency);
-			break;
-	}
-	return 0;
-}
-
-
-int CVICALLBACK CB_OnMinus275k (int panel, int control, int event,
-		void *callbackData, int eventData1, int eventData2)
-{
-	double Frequency ;
-
-	switch (event)
-	{
-		case EVENT_COMMIT:
-			GetCtrlVal(MainPanel, PANEL_DDSFREPOUT, &Frequency);
-			Frequency -= 275000.0;
-			DDSBes_SetFrequency(&DDSBes, Frequency);
-			SetCtrlVal(MainPanel, PANEL_DDSFREPOUT, Frequency);
-			break;
-	}
-	return 0;
-}
-
-
 int CVICALLBACK CB_OnPlus10k (int panel, int control, int event,
 		void *callbackData, int eventData1, int eventData2)
 {