Pacemaker code Implementation for SFWRENG 3K04
Dependencies: mbed Queue mbed-rtos FXOS8700Q
Fork of Pacemaker by
SWFRENG 3K04 Project to design, develop, and document a functional pacemaker.
The project uses the Freescale K64F Microcontroller and C++ mbed library.
Diff: interface.cpp
- Revision:
- 28:4f36e100ccbe
- Parent:
- 26:3b49e8c3793f
- Child:
- 31:5e55042e025a
diff -r f8deff828a00 -r 4f36e100ccbe interface.cpp --- 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);