# HG changeset patch # User Daniele Nicolodi # Date 1350555859 -7200 # Node ID cd7b5903f168038ba8bf9f6364a582dc8f642ea0 # Parent d0aa333e64516be967d2a534f0670cafd06352ee Display measured slope diff -r d0aa333e6451 -r cd7b5903f168 FXAnalyse.c --- a/FXAnalyse.c Wed Oct 17 17:40:40 2012 +0200 +++ b/FXAnalyse.c Thu Oct 18 12:24:19 2012 +0200 @@ -1230,7 +1230,7 @@ if (! KeepSlope) SlopeMath2 = 0.0; - SetCtrlVal(MainPanel, PANEL_SLOPETOCANCEL, SlopeMath2); + SetCtrlVal(MainPanel, PANEL_SLOPE_APPLIED, SlopeMath2); DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2); Slope_Math2slope = 0.0; @@ -1243,6 +1243,8 @@ Math2_slope = currentFreq; Moy_Math2slope = ((N_Math2slope-1)*Moy_Math2slope + Math2_slope)/N_Math2slope; Slope_Math2slope = (Slope_Math2slope*(N_Math2slope-2) + 6*(Math2_slope-Moy_Math2slope)/N_Math2slope)/(N_Math2slope+1); + // update indicator + SetCtrlVal(MainPanel, PANEL_SLOPE_MEASURED, 0); // update applied slope if ((utc - SlopeMeasuringTimeBegin) > TimetoSlope) { @@ -1272,7 +1274,7 @@ } double frequency = DDSFox_ReadFreq(&DDS1xAD9956); - SetCtrlVal(MainPanel, PANEL_SLOPETOCANCEL, SlopeMath2); + SetCtrlVal(MainPanel, PANEL_SLOPE_APPLIED, SlopeMath2); DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2); N_Math2slope = 0.0; @@ -2213,7 +2215,7 @@ SlopeMeasuring = TRUE; frequency = DDSFox_ReadFreq(&DDS1xAD9956); - GetCtrlVal(panel, PANEL_SLOPETOCANCEL, &SlopeMath2); + GetCtrlVal(panel, PANEL_SLOPE_APPLIED, &SlopeMath2); DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2); Nratio = -1; @@ -2229,7 +2231,7 @@ if (! KeepSlope) SlopeMath2 = 0.0; - SetCtrlVal(panel, PANEL_SLOPETOCANCEL, SlopeMath2); + SetCtrlVal(panel, PANEL_SLOPE_APPLIED, SlopeMath2); DDSFox_Set(&DDS1xAD9956, frequency, SlopeMath2); SlopeMeasuring = FALSE; @@ -2259,7 +2261,7 @@ Nratio = -1; CenterFrequencyCh2ToDetermine = TRUE ; SlopeMath2 = 0.0; - SetCtrlVal(panel, PANEL_SLOPETOCANCEL, SlopeMath2); + SetCtrlVal(panel, PANEL_SLOPE_APPLIED, SlopeMath2); DDSFox_Set(&DDS1xAD9956, DEDRIFT_DDS_FREQUENCY, SlopeMath2); break; } diff -r d0aa333e6451 -r cd7b5903f168 FXAnalyse.h --- a/FXAnalyse.h Wed Oct 17 17:40:40 2012 +0200 +++ b/FXAnalyse.h Thu Oct 18 12:24:19 2012 +0200 @@ -92,7 +92,7 @@ #define PANEL_DDS3STEP 38 /* control type: ring, callback function: CB_ChangeDDSStep */ #define PANEL_DDS2STEP 39 /* control type: ring, callback function: CB_ChangeDDSStep */ #define PANEL_CENTERFREQUENCY 40 /* control type: numeric, callback function: (none) */ -#define PANEL_SLOPETOCANCEL 41 /* control type: numeric, callback function: CB_SetSlope */ +#define PANEL_SLOPE_APPLIED 41 /* control type: numeric, callback function: CB_SetSlope */ #define PANEL_MATH4 42 /* control type: numeric, callback function: (none) */ #define PANEL_MATH5 43 /* control type: numeric, callback function: (none) */ #define PANEL_MATH3 44 /* control type: numeric, callback function: (none) */ @@ -173,6 +173,7 @@ #define PANEL_ESTIMATE_N3 119 /* control type: command, callback function: CB_OnEstimateN */ #define PANEL_INVERT_SLOPE_SIGN 120 /* control type: radioButton, callback function: CB_InvertSlopeSign */ #define PANEL_MEASURE_SLOPE 121 /* control type: LED, callback function: CB_MeasureSlope */ +#define PANEL_SLOPE_MEASURED 122 /* control type: numeric, callback function: (none) */ /* Menu Bars, Menus, and Menu Items: */ diff -r d0aa333e6451 -r cd7b5903f168 FXAnalyse.uir Binary file FXAnalyse.uir has changed