comparison FXAnalyse.c @ 75:6aae1ebf397f

Remove not completely implemented autosave option
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 29 Nov 2012 13:16:32 +0100
parents 1dfaf5ef0352
children 5e0c314528bf
comparison
equal deleted inserted replaced
74:9f81652432d0 75:6aae1ebf397f
1275 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, frequency); 1275 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, frequency);
1276 CenteringTimeBegin10K = utc; 1276 CenteringTimeBegin10K = utc;
1277 } 1277 }
1278 } 1278 }
1279 1279
1280 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, &BoxChecked); // AutoSave OL
1281 if (BoxChecked) {
1282 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
1283 }
1284
1285 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2SAVE, &BoxChecked); // Save OL (Math2) 1280 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2SAVE, &BoxChecked); // Save OL (Math2)
1286 if (BoxChecked) { 1281 if (BoxChecked) {
1287 FileOpt = OpenFile("z:\\MeasuresFifi1\\OptCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); 1282 FileOpt = OpenFile("z:\\MeasuresFifi1\\OptCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII);
1288 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math2); 1283 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math2);
1289 WriteLine(FileOpt, ReportString, -1); 1284 WriteLine(FileOpt, ReportString, -1);
1292 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math2); 1287 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math2);
1293 WriteLine(FileOpt, ReportString, -1); 1288 WriteLine(FileOpt, ReportString, -1);
1294 CloseFile(FileOpt); 1289 CloseFile(FileOpt);
1295 } 1290 }
1296 1291
1297 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, &BoxChecked); // AutoSave Hg (Math3)
1298 if (BoxChecked) {
1299 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
1300 }
1301
1302 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3SAVE, &BoxChecked); // Save Hg 1292 GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3SAVE, &BoxChecked); // Save Hg
1303
1304 if (BoxChecked) { 1293 if (BoxChecked) {
1305 FileHg = OpenFile("z:\\MeasuresFifi1\\HgCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); 1294 FileHg = OpenFile("z:\\MeasuresFifi1\\HgCavity.txt", VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII);
1306 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math3); 1295 Fmt(ReportString, "%s\t%s\t%f[p3]\t%f[p3]", Date, Time, utc, Math3);
1307 WriteLine(FileHg, ReportString, -1); 1296 WriteLine(FileHg, ReportString, -1);
1308 CloseFile(FileHg); 1297 CloseFile(FileHg);
1666 } 1655 }
1667 return 0; 1656 return 0;
1668 } 1657 }
1669 1658
1670 1659
1671
1672 int CVICALLBACK CB_OnSaveOpt (int panel, int control, int event,
1673 void *callbackData, int eventData1, int eventData2)
1674 {
1675 bool BoxChecked = FALSE ;
1676
1677 switch (event)
1678 {
1679 case EVENT_COMMIT:
1680
1681 GetCtrlVal(MainPanel, control, &BoxChecked);
1682
1683 if (BoxChecked) {
1684 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, ATTR_DIMMED, FALSE) ;
1685 }
1686
1687 if (!BoxChecked) {
1688 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2AUTOSAV, ATTR_DIMMED, TRUE) ;
1689 }
1690
1691 break;
1692 }
1693 return 0;
1694 }
1695
1696
1697
1698
1699 int CVICALLBACK CB_OnSaveHg (int panel, int control, int event,
1700 void *callbackData, int eventData1, int eventData2)
1701 {
1702 bool BoxChecked = FALSE ;
1703
1704 switch (event)
1705 {
1706 case EVENT_COMMIT:
1707
1708 GetCtrlVal(MainPanel, control, &BoxChecked);
1709
1710 if (BoxChecked) {
1711 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, FALSE) ;
1712 }
1713
1714 if (!BoxChecked) {
1715 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, TRUE) ;
1716 }
1717
1718 break;
1719 }
1720 return 0;
1721 }
1722
1723 int CVICALLBACK CB_OnAutoSaveHg (int panel, int control, int event,
1724 void *callbackData, int eventData1, int eventData2)
1725 {
1726 bool BoxChecked = FALSE ;
1727
1728 switch (event)
1729 {
1730 case EVENT_COMMIT:
1731
1732 GetCtrlVal(MainPanel, control, &BoxChecked);
1733
1734 if (BoxChecked) {
1735 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2SAVE, ATTR_DIMMED, TRUE) ;
1736 }
1737
1738 if (!BoxChecked) {
1739 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH2SAVE, ATTR_DIMMED, FALSE) ;
1740 }
1741
1742 break;
1743 }
1744 return 0;
1745 }
1746
1747 int CVICALLBACK CB_OnSaveSr (int panel, int control, int event,
1748 void *callbackData, int eventData1, int eventData2)
1749 {
1750 bool BoxChecked = FALSE ;
1751
1752 switch (event)
1753 {
1754 case EVENT_COMMIT:
1755
1756 GetCtrlVal(MainPanel, control, &BoxChecked);
1757
1758 if (BoxChecked) {
1759 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, FALSE) ;
1760 }
1761
1762 if (!BoxChecked) {
1763 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3AUTOSAV, ATTR_DIMMED, TRUE) ;
1764 }
1765 break;
1766 }
1767 return 0;
1768 }
1769
1770 int CVICALLBACK CB_OnAutoSaveSr (int panel, int control, int event,
1771 void *callbackData, int eventData1, int eventData2)
1772 {
1773 bool BoxChecked = FALSE ;
1774
1775 switch (event)
1776 {
1777 case EVENT_COMMIT:
1778
1779 GetCtrlVal(MainPanel, control, &BoxChecked);
1780
1781 if (BoxChecked) {
1782 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3SAVE, ATTR_DIMMED, TRUE) ;
1783 }
1784
1785 if (!BoxChecked) {
1786 SetCtrlAttribute(MainPanel, PANEL_CHECKBOX_MATH3SAVE, ATTR_DIMMED, FALSE) ;
1787 }
1788
1789 break;
1790 }
1791 return 0;
1792 }
1793
1794
1795 int CVICALLBACK CB_OnAcceptN (int panel, int control, int event, 1660 int CVICALLBACK CB_OnAcceptN (int panel, int control, int event,
1796 void *callbackData, int eventData1, int eventData2) 1661 void *callbackData, int eventData1, int eventData2)
1797 { 1662 {
1798 switch (event) 1663 switch (event)
1799 { 1664 {