# HG changeset patch # User Daniele Nicolodi # Date 1355741715 -3600 # Node ID 3aa1f1c18961e86dc57043c88a88dc8ff983e8b2 # Parent 87af2fbc232126195ee5c1fa9758c6c1474c604c Fix data logging to disc. Shorten file names diff -r 87af2fbc2321 -r 3aa1f1c18961 FXAnalyse.c --- a/FXAnalyse.c Fri Nov 30 17:42:29 2012 +0100 +++ b/FXAnalyse.c Mon Dec 17 11:55:15 2012 +0100 @@ -209,7 +209,7 @@ // construct filename in the form folder\\id-name.txt snprintf(filename, sizeof(filename), "%s\\%s-%s.txt", folder, id, name); - int fd = OpenFile(name, VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); + int fd = OpenFile(filename, VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII); Fmt(line, "%s\t%s\t%f[p3]\t%f[p3]", date, time, utc, value); WriteLine(fd, line, -1); CloseFile(fd); @@ -223,6 +223,7 @@ if (InitCVIRTE (0, argv, 0) == 0) return -1; + if ((MainPanel = LoadPanel (0, "FXAnalyse.uir", PANEL)) < 0) return -1; if ((CalcN1Panel = LoadPanel (0, "FXAnalyse.uir", CALCN1)) < 0) @@ -1300,21 +1301,21 @@ // write LO frequency (Math2) to disk GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH2SAVE, &save); if (save) { - writeData(DATAFOLDER, "OptCavity", id, Date, Time, utc, Math2); + writeData(DATAFOLDER, "Lo", id, Date, Time, utc, Math2); writeData("C:\\Femto\\Results", "OptCavity", id, Date, Time, utc, Math2); } // write Hg frequency (Math3) to disk GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH3SAVE, &save); if (save) { - writeData(DATAFOLDER, "HgCavity", id, Date, Time, utc, Math3); + writeData(DATAFOLDER, "Hg", id, Date, Time, utc, Math3); writeData("C:\\Femto\\Results", "HgCavity", id, Date, Time, utc, Math3); } // write ExtraMath (Math5) to disk GetCtrlVal(MainPanel, PANEL_CHECKBOX_MATH5SAVE, &save); if (save) { - writeData(DATAFOLDER, "ExtraMath", id, Date, Time, utc, Math5); + writeData(DATAFOLDER, "Ex", id, Date, Time, utc, Math5); } // Special case to handle change of day at next second