Pacemaker code Implementation for SFWRENG 3K04

Dependencies:   FXOS8700Q Queue mbed-rtos mbed

Fork of Pacemaker by Eric dollar

Revision:
28:4f36e100ccbe
Parent:
26:3b49e8c3793f
Child:
30:0cb4890910cd
--- a/interface.cpp	Tue Nov 29 19:41:38 2016 +0000
+++ b/interface.cpp	Tue Nov 29 20:48:29 2016 +0000
@@ -116,7 +116,7 @@
             }else{
                 pc->printf("\nThat value is not within range.");   
             }
-            interface::dataScreen();
+            interface::chamberDataScreen(chamber);
             break;
         case '2':
             pc->printf("\nChoose New Value for the Pace Width:");
@@ -127,7 +127,7 @@
             }else{
                 pc->printf("\nThat value is not within range.");   
             }
-            interface::dataScreen();
+            interface::chamberDataScreen(chamber);
             break;
         case '3':
             pc->printf("\nChoose New Value for the Refractory Period:");
@@ -138,7 +138,7 @@
             }else{
                 pc->printf("\nThat value is not within range.");   
             }
-            interface::dataScreen();
+            interface::chamberDataScreen(chamber);
             break;
         case '4':
             pc->printf("\nChoose New Value for the Sensitivity:");
@@ -149,7 +149,7 @@
             }else{
                 pc->printf("\nThat value is not within range.");   
             }
-            interface::dataScreen();
+            interface::chamberDataScreen(chamber);
             break;
         case '5':
             interface::dataScreen();
@@ -262,45 +262,45 @@
     }  
 }
 
-void interface::getData(chamberData* chamber){
-    char command = getChar();
-    switch (command){
-        case '1':
-            pc->printf("\nChoose New Value:");
-            char* value = getInput();
-            chamber->chngPaceAmp(atof(value));
-            pc->printf("\t%f",chamber->getPaceAmp()*7);
-            interface::dataScreen();
-            break;
-        case '2':
-            pc->printf("\nChoose New Value:");
-            value = getInput();
-            chamber->chngPaceWidth(atof(value));
-            pc->printf("\t%f",chamber->getPaceWidth());
-            interface::dataScreen();
-            break;
-        case '3':
-            pc->printf("\nChoose New Value:");
-            value = getInput();
-            chamber->chngRP(atof(value));
-            pc->printf("\t%f",chamber->getRP());
-            interface::dataScreen();
-            break;
-        case '4':
-            pc->printf("\nChoose New Value:");
-            value = getInput();
-            chamber->chngSensitivity(atof(value));
-            pc->printf("\t%f",chamber->getSensitivity());
-            interface::dataScreen();
-            break;
-        case '5':
-            interface::dataScreen();
-            break;
-        default:
-            pc->printf("\nThat is not an option.");
-            interface::getData(chamber);
-    }  
- }
+//void interface::getData(chamberData* chamber){
+//    char command = getChar();
+//    switch (command){
+//        case '1':
+//            pc->printf("\nChoose New Value:");
+//            char* value = getInput();
+//            chamber->chngPaceAmp(atof(value));
+//            pc->printf("\t%f",chamber->getPaceAmp()*7);
+//            interface::dataScreen();
+//            break;
+//        case '2':
+//            pc->printf("\nChoose New Value:");
+//            value = getInput();
+//            chamber->chngPaceWidth(atof(value));
+//            pc->printf("\t%f",chamber->getPaceWidth());
+//            interface::dataScreen();
+//            break;
+//        case '3':
+//            pc->printf("\nChoose New Value:");
+//            value = getInput();
+//            chamber->chngRP(atof(value));
+//            pc->printf("\t%f",chamber->getRP());
+//            interface::dataScreen();
+//            break;
+//        case '4':
+//            pc->printf("\nChoose New Value:");
+//            value = getInput();
+//            chamber->chngSensitivity(atof(value));
+//            pc->printf("\t%f",chamber->getSensitivity());
+//            interface::dataScreen();
+//            break;
+//        case '5':
+//            interface::dataScreen();
+//            break;
+//        default:
+//            pc->printf("\nThat is not an option.");
+//            interface::getData(chamber);
+//    }  
+// }
  
 void interface::getEgram(){
     myDataStruct = new dataStruct(myHardware);