You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Cycler.cpp
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -405,7 +405,14 @@ double Cycler::checkUp_batteryStates(bool blockDegradation, bool checkCap, int c
405
405
// Write the results to the csv file
406
406
if(verbose >= printCyclerHighLevel)
407
407
cout<<"Cycler::checkUp_batteryStates is writing the capacity to the csv file"<<endl;
408
-
string fullName = ".\\"+ID+"\\"+nameState; // we want to write the file in a subfolder, so append the name of the subfolder before the name of the csv file
408
+
// We want to write the file in the subfolder of this cell, but Windows and Linux use the opposite subfolder separation symbol
409
+
string fol;
410
+
#ifdef _WIN32
411
+
fol = ".\\"+ID+"\\"; // Windows: parent\child
412
+
#elif defined __linux__
413
+
fol = "./"+ID+"/"; // Linux: parent/child
414
+
#endif
415
+
string fullName = fol+nameState; // we want to write the file in a subfolder, so append the name of the subfolder before the name of the csv file
409
416
ofstream output(fullName,std::ios_base::app); // open the csv file and append the new data after the already existing data
410
417
if (output.is_open()){
411
418
output<<cumCycle<<","<<cumTime<<","<<cumAh<<","<<cumWh; // write the data points for where the cell is in it's life
cout<<"Cycler::checkUp_OCVcurves is writing the OCV curves to a csv file"<<endl;
493
-
string fullName = ".\\"+ID+"\\"+nameOCV; // we want to write the file in a subfolder, so append the name of the subfolder before the name of the csv file
500
+
// We want to write the file in the subfolder of this cell, but Windows and Linux use the opposite subfolder separation symbol
501
+
string fol;
502
+
#ifdef _WIN32
503
+
fol = ".\\"+ID+"\\"; // Windows: parent\child
504
+
#elif defined __linux__
505
+
fol = "./"+ID+"/"; // Linux: parent/child
506
+
#endif
507
+
string fullName = fol+nameOCV; // we want to write the file in a subfolder, so append the name of the subfolder before the name of the csv file
494
508
ofstream output(fullName,std::ios_base::app); // open the csv file and append the new data after the already existing data
0 commit comments