Mercurial > hg > fxanalyse
changeset 20:3a7f088d4960
Get rid of unused variables. Some minor coding style improvements
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Thu, 19 Jul 2012 19:34:36 +0200 |
parents | e9d8791502c0 |
children | 381da7b34cd8 |
files | FXAnalyse.c |
diffstat | 1 files changed, 35 insertions(+), 74 deletions(-) [+] |
line wrap: on
line diff
--- a/FXAnalyse.c Wed Jul 18 18:53:32 2012 +0200 +++ b/FXAnalyse.c Thu Jul 19 19:34:36 2012 +0200 @@ -399,7 +399,6 @@ int CVICALLBACK CB_OnEventMain(int panel, int event, void *callbackData, int eventData1, int eventData2) { - int VirtualKeyCode ; int ActiveControl ; int StepIndex ; double Step ; @@ -538,44 +537,36 @@ int CVICALLBACK CB_OnStart (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { - int LogFile ; - char CharacterBuffer[]="\r" ; - char LineBuffer[FXLINELENGTH+10] = "\r\n_1 "; - - switch (event) - { + { case EVENT_COMMIT: if (Acquiring) { - PlotCh1.IndexPoint = 0 ; - PlotCh2.IndexPoint = 0 ; - PlotCh3.IndexPoint = 0 ; - PlotCh4.IndexPoint = 0 ; - PlotMath1.IndexPoint = 0 ; - PlotMath2.IndexPoint = 0 ; - PlotMath3.IndexPoint = 0 ; - PlotMath4.IndexPoint = 0 ; - PlotMath5.IndexPoint = 0 ; - Allan_Reset(&AllanCh1) ; - Allan_Reset(&AllanCh2) ; - Allan_Reset(&AllanCh3) ; - Allan_Reset(&AllanCh4) ; - Allan_Reset(&AllanMath1) ; - Allan_Reset(&AllanMath2) ; - Allan_Reset(&AllanMath3) ; - Allan_Reset(&AllanMath4) ; - Allan_Reset(&AllanMath5) ; - } ; - Acquiring = TRUE ; + PlotCh1.IndexPoint = 0; + PlotCh2.IndexPoint = 0; + PlotCh3.IndexPoint = 0; + PlotCh4.IndexPoint = 0; + PlotMath1.IndexPoint = 0; + PlotMath2.IndexPoint = 0; + PlotMath3.IndexPoint = 0; + PlotMath4.IndexPoint = 0; + PlotMath5.IndexPoint = 0; + Allan_Reset(&AllanCh1); + Allan_Reset(&AllanCh2); + Allan_Reset(&AllanCh3); + Allan_Reset(&AllanCh4); + Allan_Reset(&AllanMath1); + Allan_Reset(&AllanMath2); + Allan_Reset(&AllanMath3); + Allan_Reset(&AllanMath4); + Allan_Reset(&AllanMath5); + } + Acquiring = TRUE; SetCtrlAttribute(MainPanel, PANEL_STARTBUTTON, ATTR_LABEL_TEXT, "__RESET"); - FindCurrentFileName() ; // LogFileName is the one corresponding to the date of today... - GetFileInfo(LogFileName, &OldLogFilePtr) ; + FindCurrentFileName(); // LogFileName is the one corresponding to the date of today... + GetFileInfo(LogFileName, &OldLogFilePtr); OldLogFilePtr -= OldLogFilePtr%FXLINELENGTH + FXLINELENGTH - 2; break; - case EVENT_RIGHT_CLICK: - - break; } return 0; } @@ -599,13 +590,11 @@ int CVICALLBACK CB_OnTimer (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { - int LogFile, FileOpt, FileHg, FileSr, FileExtraMath ; - long LogFileSize ; - char CharacterBuffer[]="\r" ; + int LogFile, FileOpt, FileHg, FileExtraMath; + long LogFileSize; char LineBuffer[FXLINELENGTH+10] = "\r\n_1 "; - char * dateNow, * timeNow, day[4], month[4], year[4] ; - char TimeTag[] = "100103 000000.000" ; // K+K time tag meaning here 2010 january the 3rd at 00:00:00.000 + char TimeTag[] = "100103 000000.000"; // K+K time tag meaning here 2010 january the 3rd at 00:00:00.000 char Date[] = "03/01/2010" ; char Time[] = "00:00:00.000" ; char Year[] = "2010"; @@ -616,16 +605,12 @@ char Min[] = "00" ; char Sec[] = "00.000"; struct tm LocalTime ; - time_t utcTime ; - char * ReportString = "dd.mm.yy\t00:00:00\t3481610838.000\t0000000000000.00000000" ; + time_t utcTime; + char * ReportString = "dd.mm.yy\t00:00:00\t3481610838.000\t0000000000000.00000000"; - int NotCare = 0 ; - bool BoxChecked = FALSE; - - double Target, NCalc ; + int BoxChecked = FALSE; double FoxFrequ=0.0; - int Div = 1 ; double FrequencyToChange=0.0; double DeltaCh2=0.0; @@ -634,17 +619,8 @@ double ActualFrequ=0.0; double ActualSlope=0.0; - double DDS3Bize ; - double DDS2Bize ; - int N2Bize ; - int Signe2Bize; - double Math3Bize; - double Math1Bize; - - - switch (event) - { + { case EVENT_TIMER_TICK: switch(Acquiring) { @@ -1374,7 +1350,7 @@ if (SlopeMeasuring == TRUE) { - double currentFreq; + double currentFreq = 0.0; /* select reference */ switch (slopeReference) { @@ -2861,27 +2837,12 @@ int CVICALLBACK CB_OnAutoStopSlopeCancellingIfDelock (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { - bool BoxChecked = FALSE; - double ActualFrequ=0.0; - switch (event) - { + { case EVENT_COMMIT: - - if (control== PANEL_CHECKBOX_STOPIFAUTODE) - { - GetCtrlVal(MainPanel, PANEL_CHECKBOX_STOPIFAUTODE, &BoxChecked) ; - if (BoxChecked) { - AutoStopSlopeCancellingIfDelock=TRUE ; - } - else {AutoStopSlopeCancellingIfDelock=FALSE ;} - - } - - - break; - - } + GetCtrlVal(MainPanel, PANEL_CHECKBOX_STOPIFAUTODE, &AutoStopSlopeCancellingIfDelock); + break; + } return 0; }