diff FXAnalyse.c @ 132:fbd72d87b4dc

Support graceful intrerruption of N3 measurement. Minor user interface fixes
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 17 Dec 2013 17:21:17 +0100
parents 934843ee4434
children 7540703b8473
line wrap: on
line diff
--- a/FXAnalyse.c	Tue Dec 17 15:34:43 2013 +0100
+++ b/FXAnalyse.c	Tue Dec 17 17:21:17 2013 +0100
@@ -221,6 +221,7 @@
 	return 15020.0 + utc / 86400.0;
 }
 
+
 void logmsg(const char *frmt, ...)
 {
 	char msg[1024];
@@ -1840,7 +1841,9 @@
 						SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_1);
 						SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime1);
 						SetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, DeltakHz_1);
-						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Calculate N_Lo");
+						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Lo");
+						SetCtrlVal(CalcNPanel, CALCN_SLOPE, 0.0);
+						SetCtrlVal(CalcNPanel, CALCN_N, 0.0);
 						DisplayPanel(CalcNPanel);
 					}
 					break;
@@ -1851,7 +1854,9 @@
 						SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_2);
 						SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime2);
 						SetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, DeltakHz_2);
-						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Calculate N_Hg");
+						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Hg");
+						SetCtrlVal(CalcNPanel, CALCN_SLOPE, 0.0);
+						SetCtrlVal(CalcNPanel, CALCN_N, 0.0);
 						DisplayPanel(CalcNPanel);
 					} 
 					break;
@@ -1862,7 +1867,9 @@
 						SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_3);
 						SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime3);
 						SetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, DeltakHz_3);
-						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Calculate N_Sr");
+						SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Sr");
+						SetCtrlVal(CalcNPanel, CALCN_SLOPE, 0.0);
+						SetCtrlVal(CalcNPanel, CALCN_N, 0.0);
 						DisplayPanel(CalcNPanel);
 					}
 					break;
@@ -1930,6 +1937,12 @@
 					break;
 				case MEASURING_N_Sr:
 					Measuring_3 = FALSE;
+					SetCtrlVal(MainPanel, PANEL_DDS1, FrequDDS1);
+					DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, FrequDDS1, FREP_STEP_SIZE);
+					SetCtrlVal(MainPanel, PANEL_DDS2, FrequencyDDSBesInit);  
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, FrequencyDDSBesInit);
+					SetCtrlVal(MainPanel, PANEL_DDS3, FrequencyDDS3Init);
+					DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, FrequencyDDS3Init);
 					break;
 			}
 			break;