Mercurial > hg > fxanalyse
changeset 230:9e240adb3053
Fix N estimate to properly round
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 27 Oct 2014 18:02:32 +0100 |
parents | 28a56e4c06a4 |
children | c10236b5a3e9 |
files | FXAnalyse.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/FXAnalyse.c Mon Oct 27 17:48:22 2014 +0100 +++ b/FXAnalyse.c Mon Oct 27 18:02:32 2014 +0100 @@ -56,7 +56,7 @@ double Math1, Math2, Math3, Math4, Math5; double N1, N2, N3; double Ndiv = 8.0; -double Sign1 = 1.0, Sign2 = 1.0, Sign3 = 0.0; +double Sign1 = 1, Sign2 = 1, Sign3 = 1; void *MathParser1, *MathParser2, *MathParser3, *MathParser4, *MathParser5; @@ -2284,6 +2284,7 @@ void *callbackData, int eventData1, int eventData2) { void *v; + double n; int estimate = 0; switch (event) @@ -2293,11 +2294,13 @@ estimate = PTR_TO_INT(v); switch (estimate) { case HG: - GetCtrlVal(panel, ESTIMATEN_N, &N2); + GetCtrlVal(panel, ESTIMATEN_N, &n); + N2 = round(n); SetCtrlVal(MainPanel, PANEL_N2, N2); break; case SR: - GetCtrlVal(panel, ESTIMATEN_N, &N3); + GetCtrlVal(panel, ESTIMATEN_N, &n); + N3 = round(n); SetCtrlVal(MainPanel, PANEL_N3, N3); break; }