Mercurial > hg > fxanalyse
changeset 160:f609fb29536b
Simplification and code cleanup
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Tue, 04 Feb 2014 12:48:37 +0100 |
parents | 07153c41ba16 |
children | 6ee23cb3d6bb |
files | FXAnalyse.c FXAnalyse.h FXAnalyse.uir |
diffstat | 3 files changed, 195 insertions(+), 173 deletions(-) [+] |
line wrap: on
line diff
--- a/FXAnalyse.c Mon Feb 03 17:32:47 2014 +0100 +++ b/FXAnalyse.c Tue Feb 04 12:48:37 2014 +0100 @@ -22,6 +22,10 @@ #define FREP_STEP_SIZE 50000.0 +#define SPEED_OF_LIGHT 299792458.0 // m/s +#define SR_WAVELENGTH 698.4460 // nm +#define HG_WAVELENGTH 1062.4000 // nm + // data acquisition status int acquiring; // data queue @@ -45,7 +49,7 @@ // panels static int MainPanel; static int CalcNPanel; -static int EstimateN3Panel; +static int EstimateNPanel; static int LoggingPanel; @@ -157,19 +161,13 @@ muParserHandle_t MathParser1, MathParser2, MathParser3, MathParser4, MathParser5; -double Ndiv = 8.0; - -int settling = 0; - enum { - MEASURING_N_NONE, - MEASURING_N_Lo, - MEASURING_N_Hg, - MEASURING_N_Sr, + N_NONE, + N_LO, + N_HG, + N_SR, }; -int measuring = MEASURING_N_NONE; - enum { N_MEASUREMENT_NONE, N_MEASUREMENT_INIT, @@ -184,18 +182,22 @@ int Measuring_2 = N_MEASUREMENT_NONE; int Measuring_3 = N_MEASUREMENT_NONE; +double Ndiv = 8.0; + +int nobs = 0; +int settling = 0; + double f0_DDS1 = 110000000.0, f0_DDS2, f0_DDS3; double N_1=0.0, N_2=0.0, N_3=0.0; -double SlopeTime1=40.0, DeltaT_1=20.0, delta_f_lock_1=500.0, t1_1=0.0, t2_1=0.0, t3_1=0.0; -double SlopeTime2=40.0, DeltaT_2=20.0, delta_f_lock_2=500.0, t1_2=0.0, t2_2=0.0, t3_2=0.0; -double SlopeTime3=40.0, DeltaT_3=20.0, delta_f_lock_3=500.0, t1_3=0.0, t2_3=0.0, t3_3=0.0; - -int n_1=0, n_2=0, n_3=0; +double SlopeTime1=40.0, DeltaT_1=20.0, delta_f_lock_1=500.0; +double SlopeTime2=40.0, DeltaT_2=20.0, delta_f_lock_2=500.0; +double SlopeTime3=40.0, DeltaT_3=20.0, delta_f_lock_3=500.0; double DeltaDDS3=0.0; double Nu1=0.0, Nu2= 200000-147000+282143746.557455e6; +double t1, t2, t3; double f_rep_slope, f_beat_slope; double f_rep_plus, f_rep_minus; double f_beat_plus, f_beat_minus; @@ -432,7 +434,7 @@ return -1; if ((CalcNPanel = LoadPanel (MainPanel, "FXAnalyse.uir", CALCN)) < 0) return -1; - if ((EstimateN3Panel = LoadPanel (MainPanel, "FXAnalyse.uir", ESTIMATEN3)) < 0) + if ((EstimateNPanel = LoadPanel (MainPanel, "FXAnalyse.uir", ESTIMATEN)) < 0) return -1; if ((LoggingPanel = LoadPanel (0, "FXAnalyse.uir", LOGGING)) < 0) return -1; @@ -730,11 +732,14 @@ // set DDS1 to nominal frequency DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, f0_DDS1); + // record current DDS frequencies f0_DDS2 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 2); - t1_1 = utc; - t2_1 = 0.0; - t3_1 = 0.0; + + t1 = utc; + t2 = t3 = 0.0; + nobs = 0; stat_zero(&stat_math1); + f_rep_plus = f_rep_minus = 0.0; // next step Measuring_1 += 1; @@ -745,7 +750,7 @@ stat_accumulate(&stat_math1, Math1); - if ((utc - t1_1) > SlopeTime1) { + if ((utc - t1) > SlopeTime1) { f_rep_slope = stat_math1.slope; // frep positive step @@ -782,15 +787,15 @@ if (settling-- > 0) break; - if (t2_1 == 0.0) - t2_1 = utc; + if (t2 == 0.0) + t2 = utc; - f_rep_plus += Math1 - f_rep_slope * (utc - t2_1); - n_1 += 1; + f_rep_plus += Math1 - f_rep_slope * (utc - t2); + nobs += 1; - if ((utc - t2_1) > DeltaT_1) { - f_rep_plus = f_rep_plus / n_1; - n_1 = 0; + if ((utc - t2) > DeltaT_1) { + f_rep_plus = f_rep_plus / nobs; + nobs = 0; // frep negative step DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1 - delta_f_lock_1, FREP_STEP_SIZE); @@ -809,23 +814,20 @@ if (settling-- > 0) break; - if (t3_1 == 0.0) - t3_1 = utc; + if (t3 == 0.0) + t3 = utc; - f_rep_minus += Math1 - f_rep_slope * (utc - t2_1); - n_1 += 1; + f_rep_minus += Math1 - f_rep_slope * (utc - t2); + nobs += 1; - if ((utc - t3_1) > DeltaT_1) { - f_rep_minus = f_rep_minus / n_1; - n_1 = 0; + if ((utc - t3) > DeltaT_1) { + f_rep_minus = f_rep_minus / nobs; + nobs = 0; // compute N1 double delta_f_rep = f_rep_minus - f_rep_plus; N_1 = Sign1 * 2 * Ndiv * delta_f_lock_1 / delta_f_rep; SetCtrlVal(CalcNPanel, CALCN_N, N_1); - - t1_1 = t2_1 = t3_1 = 0.0; - f_rep_minus = f_rep_plus = 0.0; // back to nominal frep DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1, FREP_STEP_SIZE); @@ -849,13 +851,17 @@ // set DDS1 to nominal frequency DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, f0_DDS1); + // record current DDS frequencies f0_DDS2 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 2); f0_DDS3 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 3); - t1_2 = utc; + + t1 = utc; + t2 = t3 = 0.0; + nobs = 0; stat_zero(&stat_math1); stat_zero(&stat_ch2); - - Nu1 = N1 * (250000000 + Math1); + f_rep_plus = f_rep_minus = 0.0; + f_beat_plus = f_beat_minus = 0.0; // next step Measuring_2 += 1; @@ -867,7 +873,7 @@ stat_accumulate(&stat_math1, Math1); stat_accumulate(&stat_ch2, Ch2); - if ((utc - t1_2) > SlopeTime2) { + if ((utc - t1) > SlopeTime2) { f_rep_slope = stat_math1.slope; f_beat_slope = stat_ch2.slope; @@ -876,7 +882,7 @@ DDS4xAD9912_RampFrequency(&DDS4xAD9912,1, fDDS1, FREP_STEP_SIZE); // adjust DDS3 to keep beatnote within the bandpass filter. prediction - double fDDS3 = f0_DDS3 - delta_f_lock_2 *(-Sign1/Sign2)*Ndiv*(Nu2)/(Nu1) - f_beat_slope * (utc-t1_2); + double fDDS3 = f0_DDS3 + Sign1 * Sign2 * N2/N1 * Ndiv * delta_f_lock_2; DeltaDDS3 = fDDS3 - DDS4xAD9912_GetFrequency(&DDS4xAD9912, 3); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3); @@ -915,24 +921,24 @@ if (settling-- > 0) break; - if (t2_1 == 0.0) - t2_1 = utc; + if (t2 == 0.0) + t2 = utc; - f_rep_plus += Math1 + 250000000 - f_rep_slope * (utc - t2_2); - f_beat_plus += Ch2 - f_beat_slope * (utc - t2_2); - n_2 += 1; + f_rep_plus += Math1 + 250000000 - f_rep_slope * (utc - t2); + f_beat_plus += Ch2 - f_beat_slope * (utc - t2); + nobs += 1; - if ((utc - t2_2) > DeltaT_2) { - f_rep_plus = f_rep_plus / n_2; - f_beat_plus = f_beat_plus / n_2; - n_2 = 0; + if ((utc - t2) > DeltaT_2) { + f_rep_plus = f_rep_plus / nobs; + f_beat_plus = f_beat_plus / nobs; + nobs = 0; // negative frequency step double fDDS1 = f0_DDS1 - delta_f_lock_2; DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, fDDS1, FREP_STEP_SIZE); // adjust DDS3 to keep beatnote within the bandpass filter. prediction - double fDDS3 = f0_DDS3 + delta_f_lock_2 *(-Sign1/Sign2)*Ndiv*(Nu2)/(Nu1); + double fDDS3 = f0_DDS3 - Sign1 * Sign2 * N2/N1 * Ndiv * delta_f_lock_2; DeltaDDS3 = fDDS3 - DDS4xAD9912_GetFrequency(&DDS4xAD9912, 3); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, fDDS3); @@ -950,17 +956,17 @@ if (settling-- > 0) break; - if (t3_1 == 0.0) - t3_1 = utc; + if (t3 == 0.0) + t3 = utc; - f_rep_minus += Math1 + 250000000 - f_rep_slope * (utc - t2_2); - f_beat_minus += Ch2 + f_beat_slope * (utc - t2_2); - n_2 += 1; + f_rep_minus += Math1 + 250000000 - f_rep_slope * (utc - t2); + f_beat_minus += Ch2 + f_beat_slope * (utc - t2); + nobs += 1; - if ((utc -t3_2) > DeltaT_2) { - f_rep_minus = f_rep_minus / n_2; - f_beat_minus = f_beat_minus / n_2; - n_2 = 0; + if ((utc -t3) > DeltaT_2) { + f_rep_minus = f_rep_minus / nobs; + f_beat_minus = f_beat_minus / nobs; + nobs = 0; // compute N2 double delta_f_rep = f_rep_minus - f_rep_plus; @@ -972,10 +978,6 @@ DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, f0_DDS2); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, f0_DDS3); - t1_2 = t2_2 = t3_2 = 0.0; - f_rep_minus = f_rep_plus = 0.0; - f_beat_minus = f_beat_plus = 0.0; - // done Measuring_2 = N_MEASUREMENT_NONE; } @@ -991,19 +993,21 @@ case N_MEASUREMENT_INIT: // init + // set DDS1 to nominal frequency DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, f0_DDS1); - settling = 3; - t1_3 = utc; + // record current DDS frequencies + f0_DDS2 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 2); + f0_DDS3 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 3); + + t1 = utc; + t2 = t3 = 0.0; + nobs = 0; stat_zero(&stat_math1); stat_zero(&stat_ch3); f_rep_plus = f_rep_minus = 0.0; f_beat_plus = f_beat_minus = 0.0; - // record current DDS frequencies - f0_DDS2 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 2); - f0_DDS3 = DDS4xAD9912_GetFrequency(&DDS4xAD9912, 3); - // next step Measuring_3 += 1; break; @@ -1017,14 +1021,13 @@ stat_accumulate(&stat_math1, Math1); stat_accumulate(&stat_ch3, Ch3); - if (utc - t1_3 > SlopeTime3) { + if (utc - t1 > SlopeTime3) { // slope measurement f_rep_slope = stat_math1.slope; + f_beat_slope = stat_ch3.slope; + logmsg("f_rep_slope=%e Hz/s", f_rep_slope); - f_beat_slope = stat_ch3.slope; logmsg("f_beat_slope=%e Hz/s", f_rep_slope); - - t2_3 = utc; // frep positive step DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1 + delta_f_lock_3, FREP_STEP_SIZE); @@ -1064,18 +1067,18 @@ if (settling-- > 0) break; - - n_3++; - f_rep_plus += Math1 + 250000000 - f_rep_slope * (utc - t3_2); - f_beat_plus += Ch3 - f_beat_slope * (utc - t3_2); + + if (t2 == 0.0) + t2 = utc; - if (utc - t2_3 > DeltaT_3) { - // positive step measurement - f_rep_plus = f_rep_plus / n_3; - f_beat_plus = f_beat_plus / n_3; - - n_3 = 0; - t3_3 = utc; + f_rep_plus += Math1 + 250000000 - f_rep_slope * (utc - t2); + f_beat_plus += Ch3 - f_beat_slope * (utc - t2); + nobs += 1; + + if (utc - t2 > DeltaT_3) { + f_rep_plus = f_rep_plus / nobs; + f_beat_plus = f_beat_plus / nobs; + nobs = 0; // frep negative step DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1 - delta_f_lock_3, FREP_STEP_SIZE); @@ -1098,14 +1101,17 @@ if (settling-- > 0) break; - n_3++; - f_rep_minus += Math1 + 250000000 - f_rep_slope * (utc - t3_2); - f_beat_minus += Ch3 - f_beat_slope * (utc - t3_2); + if (t3 == 0.0) + t3 = utc; - if (utc - t3_3 > DeltaT_3) { - // negative step measurement - f_rep_minus = f_rep_minus / n_3; - f_beat_minus = f_beat_minus / n_3; + f_rep_minus += Math1 + 250000000 - f_rep_slope * (utc - t2); + f_beat_minus += Ch3 - f_beat_slope * (utc - t2); + nobs += 1; + + if (utc - t3 > DeltaT_3) { + f_rep_minus = f_rep_minus / nobs; + f_beat_minus = f_beat_minus / nobs; + nobs = 0; // check delta frep double delta_f_rep_m = f_rep_plus - f_rep_minus; @@ -1125,11 +1131,6 @@ logmsg("measured N3=%.3f", N_3); SetCtrlVal(CalcNPanel, CALCN_N, N_3); - t1_3=0.0; - t2_3=0.0; - t3_3=0.0; - n_3 = 0; - // back to nominal frep DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1, FREP_STEP_SIZE); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, f0_DDS2); @@ -1554,18 +1555,21 @@ int CVICALLBACK CB_OnAcceptN (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { + int measure; + switch (event) { case EVENT_COMMIT: - switch (measuring) { - case MEASURING_N_Lo: + GetPanelAttribute(panel, ATTR_CALLBACK_DATA, &measure); + switch (measure) { + case N_LO: N1 = round(N_1); SetCtrlVal(MainPanel, PANEL_N1CHOICE, N1); break; - case MEASURING_N_Hg: + case N_HG: N2 = round(N_2); SetCtrlVal(MainPanel, PANEL_N2CHOICE, N2); break; - case MEASURING_N_Sr: + case N_SR: N3 = round(N_3); SetCtrlVal(MainPanel, PANEL_N3CHOICE, N3); break; @@ -1587,7 +1591,7 @@ case PANEL_N1CALCULUS: GetPanelAttribute(CalcNPanel, ATTR_VISIBLE, &visible); if (! visible) { - measuring = MEASURING_N_Lo; + SetPanelAttribute(panel, ATTR_CALLBACK_DATA, N_LO); SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Lo"); SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_1); SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime1); @@ -1599,7 +1603,7 @@ case PANEL_N2CALCULUS: GetPanelAttribute(CalcNPanel, ATTR_VISIBLE, &visible); if (! visible) { - measuring = MEASURING_N_Hg; + SetPanelAttribute(panel, ATTR_CALLBACK_DATA, N_HG); SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Hg"); SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_2); SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime2); @@ -1611,7 +1615,7 @@ case PANEL_N3CALCULUS: GetPanelAttribute(CalcNPanel, ATTR_VISIBLE, &visible); if (! visible) { - measuring = MEASURING_N_Sr; + SetPanelAttribute(panel, ATTR_CALLBACK_DATA, N_SR); SetPanelAttribute(CalcNPanel, ATTR_TITLE, "Measure N_Sr"); SetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, DeltaT_3); SetCtrlVal(CalcNPanel, CALCN_SLOPETIME, SlopeTime3); @@ -1629,10 +1633,13 @@ int CVICALLBACK CB_OnStartNCalculus (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { + int measuring; + switch (event) { case EVENT_COMMIT: + GetPanelAttribute(panel, ATTR_CALLBACK_DATA, &measuring); switch (measuring) { - case MEASURING_N_Lo: + case N_LO: GetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, &DeltaT_1); GetCtrlVal(CalcNPanel, CALCN_SLOPETIME, &SlopeTime1); GetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, &delta_f_lock_1); @@ -1640,7 +1647,7 @@ delta_f_lock_1 = delta_f_lock_1 * 1000.0; Measuring_1 = TRUE; break; - case MEASURING_N_Hg: + case N_HG: GetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, &DeltaT_2); GetCtrlVal(CalcNPanel, CALCN_SLOPETIME, &SlopeTime2); GetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, &delta_f_lock_2); @@ -1648,7 +1655,7 @@ delta_f_lock_2 = delta_f_lock_2 * 1000.0; Measuring_2 = TRUE; break; - case MEASURING_N_Sr: + case N_SR: GetCtrlVal(CalcNPanel, CALCN_INTEGRATIONTIME, &DeltaT_3); GetCtrlVal(CalcNPanel, CALCN_SLOPETIME, &SlopeTime3); GetCtrlVal(CalcNPanel, CALCN_DELTAFREQ, &delta_f_lock_3); @@ -1665,22 +1672,25 @@ int CVICALLBACK CB_OnNStop (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { + int measuring; + switch (event) { case EVENT_COMMIT: HidePanel(CalcNPanel); + GetPanelAttribute(panel, ATTR_CALLBACK_DATA, &measuring); switch (measuring) { - case MEASURING_N_Lo: + case N_LO: Measuring_1 = FALSE; DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1, FREP_STEP_SIZE); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, f0_DDS2); break; - case MEASURING_N_Hg: + case N_HG: Measuring_2 = FALSE; DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1, FREP_STEP_SIZE); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, f0_DDS2); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, f0_DDS3); break; - case MEASURING_N_Sr: + case N_SR: Measuring_3 = FALSE; DDS4xAD9912_RampFrequency(&DDS4xAD9912, 1, f0_DDS1, FREP_STEP_SIZE); DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, f0_DDS2); @@ -1908,31 +1918,31 @@ void *callbackData, int eventData1, int eventData2) { int visible; - double wl; switch (event) { case EVENT_COMMIT: - // be prepared to support more N estimates for different beat notes - switch (control) - { + GetPanelAttribute(EstimateNPanel, ATTR_VISIBLE , &visible); + if (! visible) + DisplayPanel(EstimateNPanel); + // reset N estimate + SetCtrlVal(EstimateNPanel, ESTIMATEN_N, 0.0); + // set current frep + SetCtrlVal(EstimateNPanel, ESTIMATEN_FREP, 250e6 + Math1); + switch (control) { + case PANEL_ESTIMATE_N2: + SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, HG_WAVELENGTH); + SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Hg"); + SetPanelAttribute(panel, ATTR_CALLBACK_DATA, N_HG); + break; case PANEL_ESTIMATE_N3: - GetPanelAttribute(EstimateN3Panel, ATTR_VISIBLE , &visible); - if (! visible) - DisplayPanel(EstimateN3Panel); - // set current frep - SetCtrlVal(EstimateN3Panel, ESTIMATEN3_FREP, 250e6 + Math1); - // default wavelenght for Sr cavity - GetCtrlVal(EstimateN3Panel, ESTIMATEN3_WAVELENGTH, &wl); - if (wl == 0.0) - SetCtrlVal(EstimateN3Panel, ESTIMATEN3_WAVELENGTH, 698.446); - // reset N3 estimate - SetCtrlVal(EstimateN3Panel, ESTIMATEN3_N, 0.0); + SetCtrlVal(EstimateNPanel, ESTIMATEN_WAVELENGTH, SR_WAVELENGTH); + SetPanelAttribute(panel, ATTR_TITLE, "Estimate N_Sr"); + SetPanelAttribute(panel, ATTR_CALLBACK_DATA, N_SR); break; } break; } - return 0; } @@ -1955,11 +1965,22 @@ int CVICALLBACK CB_OnNEstimateSet (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { + int estimate; + switch (event) { case EVENT_COMMIT: - GetCtrlVal(panel, ESTIMATEN3_N, &N3); - SetCtrlVal(MainPanel, PANEL_N3CHOICE, N3); + GetPanelAttribute(panel, ATTR_CALLBACK_DATA, &estimate); + switch (estimate) { + case N_HG: + GetCtrlVal(panel, ESTIMATEN_N, &N2); + SetCtrlVal(MainPanel, PANEL_N3CHOICE, N2); + break; + case N_SR: + GetCtrlVal(panel, ESTIMATEN_N, &N3); + SetCtrlVal(MainPanel, PANEL_N3CHOICE, N3); + break; + } HidePanel(panel); break; } @@ -1974,10 +1995,10 @@ switch (event) { case EVENT_COMMIT: - GetCtrlVal(panel, ESTIMATEN3_FREP, &frep); - GetCtrlVal(panel, ESTIMATEN3_WAVELENGTH, &wl); - N = round(299792458.0 / wl / 1e-9 / frep); - SetCtrlVal(panel, ESTIMATEN3_N, N); + GetCtrlVal(panel, ESTIMATEN_FREP, &frep); + GetCtrlVal(panel, ESTIMATEN_WAVELENGTH, &wl); + N = round(SPEED_OF_LIGHT / wl / 1e-9 / frep); + SetCtrlVal(panel, ESTIMATEN_N, N); break; } return 0;
--- a/FXAnalyse.h Mon Feb 03 17:32:47 2014 +0100 +++ b/FXAnalyse.h Tue Feb 04 12:48:37 2014 +0100 @@ -23,13 +23,13 @@ #define CALCN_START 7 /* control type: command, callback function: CB_OnStartNCalculus */ #define CALCN_ACCEPTN 8 /* control type: command, callback function: CB_OnAcceptN */ -#define ESTIMATEN3 2 -#define ESTIMATEN3_N 2 /* control type: numeric, callback function: (none) */ -#define ESTIMATEN3_ESTIMATE 3 /* control type: command, callback function: CB_OnNEstimate */ -#define ESTIMATEN3_FREP 4 /* control type: numeric, callback function: (none) */ -#define ESTIMATEN3_SET 5 /* control type: command, callback function: CB_OnNEstimateSet */ -#define ESTIMATEN3_CANCEL 6 /* control type: command, callback function: CB_OnNEstimateCancel */ -#define ESTIMATEN3_WAVELENGTH 7 /* control type: numeric, callback function: (none) */ +#define ESTIMATEN 2 +#define ESTIMATEN_N 2 /* control type: numeric, callback function: (none) */ +#define ESTIMATEN_ESTIMATE 3 /* control type: command, callback function: CB_OnNEstimate */ +#define ESTIMATEN_FREP 4 /* control type: numeric, callback function: (none) */ +#define ESTIMATEN_SET 5 /* control type: command, callback function: CB_OnNEstimateSet */ +#define ESTIMATEN_CANCEL 6 /* control type: command, callback function: CB_OnNEstimateCancel */ +#define ESTIMATEN_WAVELENGTH 7 /* control type: numeric, callback function: (none) */ #define LOGGING 3 /* callback function: CB_OnLoggingPanelEvent */ #define LOGGING_LOGGING 2 /* control type: textBox, callback function: (none) */ @@ -116,38 +116,39 @@ #define PANEL_CHECKBOX_KEEPSLOPE 80 /* control type: radioButton, callback function: CB_OnCROX */ #define PANEL_CHECKBOX_KEEP 81 /* control type: radioButton, callback function: CB_OnCROX */ #define PANEL_SLOPE_REFERENCE 82 /* control type: ring, callback function: CB_OnSlopeReference */ -#define PANEL_ESTIMATE_N3 83 /* control type: command, callback function: CB_OnEstimateN */ -#define PANEL_INVERT_SLOPE_SIGN 84 /* control type: radioButton, callback function: CB_InvertSlopeSign */ -#define PANEL_RECENTER 85 /* control type: LED, callback function: CB_RecenterEnable */ -#define PANEL_MEASURE_SLOPE 86 /* control type: LED, callback function: CB_MeasureSlope */ -#define PANEL_SLOPE_MEASURED 87 /* control type: numeric, callback function: (none) */ -#define PANEL_RESET_DEDRIFT_DDS 88 /* control type: command, callback function: CB_ResetDedriftDDS */ -#define PANEL_SAVE_RAW 89 /* control type: radioButton, callback function: CB_SaveData */ -#define PANEL_SHOWLOG 90 /* control type: radioButton, callback function: CB_ShowLog */ -#define PANEL_SLOPEX2 91 /* control type: radioButton, callback function: CB_SlopeX2 */ -#define PANEL_SAVE_DDS 92 /* control type: radioButton, callback function: CB_SaveData */ -#define PANEL_DECORATION_2 93 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION_8 94 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION 95 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION_3 96 /* control type: deco, callback function: (none) */ -#define PANEL_TEXTMSG_6 97 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_22 98 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_21 99 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_7 100 /* control type: textMsg, callback function: (none) */ -#define PANEL_DECORATION_4 101 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION_7 102 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION_6 103 /* control type: deco, callback function: (none) */ -#define PANEL_DECORATION_5 104 /* control type: deco, callback function: (none) */ -#define PANEL_TEXTMSG_20 105 /* control type: textMsg, callback function: (none) */ -#define PANEL_TEXTMSG_19 106 /* control type: textMsg, callback function: (none) */ -#define PANEL_MATH4 107 /* control type: string, callback function: (none) */ -#define PANEL_MATH5 108 /* control type: string, callback function: (none) */ -#define PANEL_MATH3 109 /* control type: string, callback function: (none) */ -#define PANEL_MATH2 110 /* control type: string, callback function: (none) */ -#define PANEL_MATH1 111 /* control type: string, callback function: (none) */ -#define PANEL_RECENTER_SR 112 /* control type: radioButton, callback function: CB_RecenterChannel */ -#define PANEL_RECENTER_HG 113 /* control type: radioButton, callback function: CB_RecenterChannel */ -#define PANEL_RECENTER_LO 114 /* control type: radioButton, callback function: CB_RecenterChannel */ +#define PANEL_ESTIMATE_N2 83 /* control type: command, callback function: CB_OnEstimateN */ +#define PANEL_ESTIMATE_N3 84 /* control type: command, callback function: CB_OnEstimateN */ +#define PANEL_INVERT_SLOPE_SIGN 85 /* control type: radioButton, callback function: CB_InvertSlopeSign */ +#define PANEL_RECENTER 86 /* control type: LED, callback function: CB_RecenterEnable */ +#define PANEL_MEASURE_SLOPE 87 /* control type: LED, callback function: CB_MeasureSlope */ +#define PANEL_SLOPE_MEASURED 88 /* control type: numeric, callback function: (none) */ +#define PANEL_RESET_DEDRIFT_DDS 89 /* control type: command, callback function: CB_ResetDedriftDDS */ +#define PANEL_SAVE_RAW 90 /* control type: radioButton, callback function: CB_SaveData */ +#define PANEL_SHOWLOG 91 /* control type: radioButton, callback function: CB_ShowLog */ +#define PANEL_SLOPEX2 92 /* control type: radioButton, callback function: CB_SlopeX2 */ +#define PANEL_SAVE_DDS 93 /* control type: radioButton, callback function: CB_SaveData */ +#define PANEL_DECORATION_2 94 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION_8 95 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION 96 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION_3 97 /* control type: deco, callback function: (none) */ +#define PANEL_TEXTMSG_6 98 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_22 99 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_21 100 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_7 101 /* control type: textMsg, callback function: (none) */ +#define PANEL_DECORATION_4 102 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION_7 103 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION_6 104 /* control type: deco, callback function: (none) */ +#define PANEL_DECORATION_5 105 /* control type: deco, callback function: (none) */ +#define PANEL_TEXTMSG_20 106 /* control type: textMsg, callback function: (none) */ +#define PANEL_TEXTMSG_19 107 /* control type: textMsg, callback function: (none) */ +#define PANEL_MATH4 108 /* control type: string, callback function: (none) */ +#define PANEL_MATH5 109 /* control type: string, callback function: (none) */ +#define PANEL_MATH3 110 /* control type: string, callback function: (none) */ +#define PANEL_MATH2 111 /* control type: string, callback function: (none) */ +#define PANEL_MATH1 112 /* control type: string, callback function: (none) */ +#define PANEL_RECENTER_SR 113 /* control type: radioButton, callback function: CB_RecenterChannel */ +#define PANEL_RECENTER_HG 114 /* control type: radioButton, callback function: CB_RecenterChannel */ +#define PANEL_RECENTER_LO 115 /* control type: radioButton, callback function: CB_RecenterChannel */ /* Control Arrays: */