TAM Simulator

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Blanglois
Date:
Thu Nov 08 18:42:39 2018 +0000
Parent:
6:98c94f5b42b2
Commit message:
Previous commit fix (again)

Changed in this revision

TAM.cpp Show annotated file Show diff for this revision Revisions of this file
TAM.h Show annotated file Show diff for this revision Revisions of this file
--- a/TAM.cpp	Thu Nov 08 18:38:30 2018 +0000
+++ b/TAM.cpp	Thu Nov 08 18:42:39 2018 +0000
@@ -14,12 +14,16 @@
         {       
             printf("Setting parameters\n");
             setparameters();
+            isloopdone = 1;
         }
         else if(strcmp(buffer,"n") == 0 || strcmp(buffer,"N") == 0)
+        {
             printf("Default parameters maintained\n");
+            isloopdone = 1;
+        }
         else
             printf("Error: invalid input\n");
-    } while(strcmp(buffer,"y") != 0 || strcmp(buffer,"Y") != 0 || strcmp(buffer,"n") != 0 || strcmp(buffer,"N") != 0); 
+    } while(isloopdone != 1); 
     
     printf("Beginning simulation\n");
     
--- a/TAM.h	Thu Nov 08 18:38:30 2018 +0000
+++ b/TAM.h	Thu Nov 08 18:42:39 2018 +0000
@@ -20,8 +20,7 @@
 char cycleswitch = 1;
 char command;
 char buffer[128];
-char buffer2[128];
-float buffer3 = 0;
+bool isloopdone = 0;
 
 Serial          PcUart(USBTX, USBRX);