diff --git a/Version_Max_07_05_2018_CMake/src/main.cpp b/Version_Max_07_05_2018_CMake/src/main.cpp index 704c00a..e7fd594 100755 --- a/Version_Max_07_05_2018_CMake/src/main.cpp +++ b/Version_Max_07_05_2018_CMake/src/main.cpp @@ -1,112 +1,121 @@ #include #include #include "configCAMforNewMotor.h" #define CAM_FOR_FLUID 1 #define CAM_FOR_NEWMOTOR 2 #define PRINT #define STOP_AFTER_SUMMARY int main(int argc, char *argv[]) { // paths config //TODO: maybe change char[] to String char datasetPath[700]; char destinationPath[700]; // dataset config char datasetName[200]; unsigned int datasetLength; // CAM System config int camConfigOption; // CAM Values config (fuzzy functions etc.) float innerBoundSimDif; float outerBoundSimDif; int boundTimeInSamples; float innerBoundDrift; float outerBoundDrift; int boundBrokenTime; int downSamplingFactor; //if the only argument is the name of the executable itself. if (argc <= 1) { //configure here everything out of the C++ code. } else if (argc > 12) { // paths config +#ifdef _WIN32 sprintf_s(destinationPath, "%s", argv[1]); sprintf_s(datasetPath, "%s", argv[2]); +#else + sprintf(destinationPath, "%s", argv[1]); + sprintf(datasetPath, "%s", argv[2]); +#endif // dataset config +#ifdef _WIN32 sprintf_s(datasetName, "%s", argv[3]); +#else + sprintf(datasetName, "%s", argv[3]); +#endif datasetLength = (unsigned int)atoi(argv[4]); // CAM System config camConfigOption = atoi(argv[5]); // CAM Values config (fuzzy functions etc.) innerBoundSimDif = atof(argv[6]); outerBoundSimDif = atof(argv[7]); boundTimeInSamples = atoi(argv[8]); innerBoundDrift = atof(argv[9]); outerBoundDrift = atof(argv[10]); boundBrokenTime = atoi(argv[11]); downSamplingFactor = atoi(argv[12]); #ifdef PRINT printf("destinationPath: %s\n\n", destinationPath); printf("datasetPath: %s\n", datasetPath); printf("datasetName: %s\n", datasetName); printf("datasetLength: %u\n", datasetLength); printf("innerBoundSimDif: %f\n", innerBoundSimDif); printf("outerBoundSimDif: %f\n", outerBoundSimDif); printf("boundTimeInSamples: %i\n", boundTimeInSamples); printf("innerBoundDrift: %f\n", innerBoundDrift); printf("outerBoundDrift: %f\n", outerBoundDrift); printf("boundBrokenTime: %i\n", boundBrokenTime); printf("downSamplingFactor: %i\n", downSamplingFactor); #ifdef STOP_AFTER_SUMMARY getchar(); #endif // STOP_AFTER_SUMMARY #endif if (camConfigOption == CAM_FOR_FLUID) { //start Fluid CAM config /* configAndStartFluidExperiment( destinationPath, datasetPath, datasetName, datasetLength, innerBoundSimDif, outerBoundSimDif, boundTimeInSamples, innerBoundDrift, outerBoundDrift, boundBrokenTime, downSamplingFactor); */ } else if (camConfigOption == CAM_FOR_NEWMOTOR) { //start newMotor CAM config configAndStartNewMotorExperiment( destinationPath, datasetPath, datasetName, datasetLength, innerBoundSimDif, outerBoundSimDif, boundTimeInSamples, innerBoundDrift, outerBoundDrift, boundBrokenTime, downSamplingFactor); } } }