# HG changeset patch # User Daniele Nicolodi # Date 1354191392 -3600 # Node ID 6aae1ebf397f7535186568b98169d1ffc2ddb122 # Parent 9f81652432d0522a73414b7b1254a66706758d91 Remove not completely implemented autosave option diff -r 9f81652432d0 -r 6aae1ebf397f FXAnalyse.c --- a/FXAnalyse.c Thu Nov 08 18:43:15 2012 +0100 +++ b/FXAnalyse.c Thu Nov 29 13:16:32 2012 +0100 @@ -1277,11 +1277,6 @@ } } - GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, &BoxChecked); // AutoSave OL - if (BoxChecked) { - SetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2SAVE, TRUE); // so that it will try to write it (at next block) if it seems reasonnable, even though it was off before - } - GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2SAVE, &BoxChecked); // Save OL (Math2) if (BoxChecked) { FileOpt = OpenFile("z:\\MeasuresFifi1\\OptCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); @@ -1294,13 +1289,7 @@ CloseFile(FileOpt); } - GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, &BoxChecked); // AutoSave Hg (Math3) - if (BoxChecked) { - SetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3SAVE, TRUE); // so that it will try to write it (at next block) if it seems reasonnable, even though it was off before - } - GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3SAVE, &BoxChecked); // Save Hg - if (BoxChecked) { FileHg = OpenFile("z:\\MeasuresFifi1\\HgCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math3); @@ -1668,130 +1657,6 @@ } - -int CVICALLBACK CB_OnSaveOpt (int panel, int control, int event, - void *callbackData, int eventData1, int eventData2) -{ - bool BoxChecked = FALSE ; - - switch (event) - { - case EVENT_COMMIT: - - GetCtrlVal(MainPanel, control, &BoxChecked); - - if (BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, ATTR_DIMMED, FALSE) ; - } - - if (!BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, ATTR_DIMMED, TRUE) ; - } - - break; - } - return 0; -} - - - - -int CVICALLBACK CB_OnSaveHg (int panel, int control, int event, - void *callbackData, int eventData1, int eventData2) -{ - bool BoxChecked = FALSE ; - - switch (event) - { - case EVENT_COMMIT: - - GetCtrlVal(MainPanel, control, &BoxChecked); - - if (BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, FALSE) ; - } - - if (!BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, TRUE) ; - } - - break; - } - return 0; -} - -int CVICALLBACK CB_OnAutoSaveHg (int panel, int control, int event, - void *callbackData, int eventData1, int eventData2) -{ - bool BoxChecked = FALSE ; - - switch (event) - { - case EVENT_COMMIT: - - GetCtrlVal(MainPanel, control, &BoxChecked); - - if (BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2SAVE, ATTR_DIMMED, TRUE) ; - } - - if (!BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2SAVE, ATTR_DIMMED, FALSE) ; - } - - break; - } - return 0; -} - -int CVICALLBACK CB_OnSaveSr (int panel, int control, int event, - void *callbackData, int eventData1, int eventData2) -{ - bool BoxChecked = FALSE ; - - switch (event) - { - case EVENT_COMMIT: - - GetCtrlVal(MainPanel, control, &BoxChecked); - - if (BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, FALSE) ; - } - - if (!BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, TRUE) ; - } - break; - } - return 0; -} - -int CVICALLBACK CB_OnAutoSaveSr (int panel, int control, int event, - void *callbackData, int eventData1, int eventData2) -{ - bool BoxChecked = FALSE ; - - switch (event) - { - case EVENT_COMMIT: - - GetCtrlVal(MainPanel, control, &BoxChecked); - - if (BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3SAVE, ATTR_DIMMED, TRUE) ; - } - - if (!BoxChecked) { - SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3SAVE, ATTR_DIMMED, FALSE) ; - } - - break; - } - return 0; -} - - int CVICALLBACK CB_OnAcceptN (int panel, int control, int event, void *callbackData, int eventData1, int eventData2) { diff -r 9f81652432d0 -r 6aae1ebf397f FXAnalyse.h --- a/FXAnalyse.h Thu Nov 08 18:43:15 2012 +0100 +++ b/FXAnalyse.h Thu Nov 29 13:16:32 2012 +0100 @@ -104,7 +104,7 @@ #define PANEL_CHECKBOX_MATH5ALLAN 50 /* control type: radioButton, callback function: CB_OnAllanPlot */ #define PANEL_CHECKBOX_MATH3PLOT 51 /* control type: radioButton, callback function: CB_OnFreqPlot */ #define PANEL_CHECKBOX_MATH5SAVE 52 /* control type: radioButton, callback function: (none) */ -#define PANEL_CHECKBOX_MATH3SAVE_2 53 /* control type: radioButton, callback function: CB_OnSaveSr */ +#define PANEL_CHECKBOX_MATH4SAVE 53 /* control type: radioButton, callback function: (none) */ #define PANEL_CHECKBOX_MATH3ALLAN 54 /* control type: radioButton, callback function: CB_OnAllanPlot */ #define PANEL_MATHSTRING4 55 /* control type: string, callback function: CB_ChangeMath */ #define PANEL_TEXTMSG_17 56 /* control type: textMsg, callback function: (none) */ @@ -112,8 +112,8 @@ #define PANEL_SPLITTER_15 58 /* control type: splitter, callback function: (none) */ #define PANEL_SPLITTER_12 59 /* control type: splitter, callback function: (none) */ #define PANEL_CHECKBOX_MATH2PLOT 60 /* control type: radioButton, callback function: CB_OnFreqPlot */ -#define PANEL_CHECKBOX_MATH3SAVE 61 /* control type: radioButton, callback function: CB_OnSaveHg */ -#define PANEL_CHECKBOX_MATH2SAVE 62 /* control type: radioButton, callback function: CB_OnSaveOpt */ +#define PANEL_CHECKBOX_MATH3SAVE 61 /* control type: radioButton, callback function: (none) */ +#define PANEL_CHECKBOX_MATH2SAVE 62 /* control type: radioButton, callback function: (none) */ #define PANEL_CHECKBOX_MATH2ALLAN 63 /* control type: radioButton, callback function: CB_OnAllanPlot */ #define PANEL_TEXTMSG_7 64 /* control type: textMsg, callback function: (none) */ #define PANEL_MATHSTRING3 65 /* control type: string, callback function: CB_ChangeMath */ @@ -147,33 +147,31 @@ #define PANEL_UTC 93 /* control type: numeric, callback function: (none) */ #define PANEL_TIME 94 /* control type: string, callback function: (none) */ #define PANEL_DATE 95 /* control type: string, callback function: (none) */ -#define PANEL_CHECKBOX_MATH3AUTOSAV 96 /* control type: radioButton, callback function: CB_OnAutoSaveSr */ -#define PANEL_CHECKBOX_MATH2AUTOSAV 97 /* control type: radioButton, callback function: CB_OnAutoSaveHg */ -#define PANEL_CHOOSESAVEFILE 98 /* control type: command, callback function: OnChooseSaveFile */ -#define PANEL_SPLITTER_14 99 /* control type: splitter, callback function: (none) */ -#define PANEL_SPLITTER_13 100 /* control type: splitter, callback function: (none) */ -#define PANEL_DDS4 101 /* control type: numeric, callback function: CB_ChangeDDSOut */ -#define PANEL_SPLITTER_2 102 /* control type: splitter, callback function: (none) */ -#define PANEL_DDS3 103 /* control type: numeric, callback function: CB_ChangeDDSOut */ -#define PANEL_N1CALCULUS 104 /* control type: command, callback function: CB_OnNCalculus */ -#define PANEL_FINDSIGN3 105 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN3 106 /* control type: numeric, callback function: (none) */ -#define PANEL_FINDSIGN2 107 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN2 108 /* control type: numeric, callback function: (none) */ -#define PANEL_FINDSIGN1 109 /* control type: command, callback function: CB_OnFindSign */ -#define PANEL_SIGN1 110 /* control type: numeric, callback function: (none) */ -#define PANEL_FIND10K3 111 /* control type: command, callback function: CB_OnFind275K */ -#define PANEL_FIND275K2 112 /* control type: command, callback function: CB_OnFind275K */ -#define PANEL_RESETSLOPE 113 /* control type: command, callback function: CB_OnResetSlope */ -#define PANEL_CHECKBOX_STOPIFAUTODE 114 /* control type: radioButton, callback function: CB_OnStopSlopeCancellingOnUnlocked */ -#define PANEL_CHECKBOX_RECENTER 115 /* control type: radioButton, callback function: CB_OnReCentering */ -#define PANEL_CHECKBOX_KEEPSLOPE 116 /* control type: radioButton, callback function: CB_OnCROX */ -#define PANEL_CHECKBOX_KEEP 117 /* control type: radioButton, callback function: CB_OnCROX */ -#define PANEL_SLOPE_REFERENCE 118 /* control type: ring, callback function: CB_OnSlopeReference */ -#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) */ +#define PANEL_CHOOSESAVEFILE 96 /* control type: command, callback function: OnChooseSaveFile */ +#define PANEL_SPLITTER_14 97 /* control type: splitter, callback function: (none) */ +#define PANEL_SPLITTER_13 98 /* control type: splitter, callback function: (none) */ +#define PANEL_DDS4 99 /* control type: numeric, callback function: CB_ChangeDDSOut */ +#define PANEL_SPLITTER_2 100 /* control type: splitter, callback function: (none) */ +#define PANEL_DDS3 101 /* control type: numeric, callback function: CB_ChangeDDSOut */ +#define PANEL_N1CALCULUS 102 /* control type: command, callback function: CB_OnNCalculus */ +#define PANEL_FINDSIGN3 103 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN3 104 /* control type: numeric, callback function: (none) */ +#define PANEL_FINDSIGN2 105 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN2 106 /* control type: numeric, callback function: (none) */ +#define PANEL_FINDSIGN1 107 /* control type: command, callback function: CB_OnFindSign */ +#define PANEL_SIGN1 108 /* control type: numeric, callback function: (none) */ +#define PANEL_FIND10K3 109 /* control type: command, callback function: CB_OnFind275K */ +#define PANEL_FIND275K2 110 /* control type: command, callback function: CB_OnFind275K */ +#define PANEL_RESETSLOPE 111 /* control type: command, callback function: CB_OnResetSlope */ +#define PANEL_CHECKBOX_STOPIFAUTODE 112 /* control type: radioButton, callback function: CB_OnStopSlopeCancellingOnUnlocked */ +#define PANEL_CHECKBOX_RECENTER 113 /* control type: radioButton, callback function: CB_OnReCentering */ +#define PANEL_CHECKBOX_KEEPSLOPE 114 /* control type: radioButton, callback function: CB_OnCROX */ +#define PANEL_CHECKBOX_KEEP 115 /* control type: radioButton, callback function: CB_OnCROX */ +#define PANEL_SLOPE_REFERENCE 116 /* control type: ring, callback function: CB_OnSlopeReference */ +#define PANEL_ESTIMATE_N3 117 /* control type: command, callback function: CB_OnEstimateN */ +#define PANEL_INVERT_SLOPE_SIGN 118 /* control type: radioButton, callback function: CB_InvertSlopeSign */ +#define PANEL_MEASURE_SLOPE 119 /* control type: LED, callback function: CB_MeasureSlope */ +#define PANEL_SLOPE_MEASURED 120 /* control type: numeric, callback function: (none) */ /* Menu Bars, Menus, and Menu Items: */ @@ -192,8 +190,6 @@ int CVICALLBACK CB_MeasureSlope(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnAcceptN(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnAllanPlot(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); -int CVICALLBACK CB_OnAutoSaveHg(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); -int CVICALLBACK CB_OnAutoSaveSr(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnChangeNdiv(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnCROX(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnDeltaFreq(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); @@ -212,9 +208,6 @@ int CVICALLBACK CB_OnPlus10k(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnReCentering(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnResetSlope(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); -int CVICALLBACK CB_OnSaveHg(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); -int CVICALLBACK CB_OnSaveOpt(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); -int CVICALLBACK CB_OnSaveSr(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnSlopeReference(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnSlopeTime(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); int CVICALLBACK CB_OnStart(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); diff -r 9f81652432d0 -r 6aae1ebf397f FXAnalyse.uir Binary file FXAnalyse.uir has changed