Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
Diff: interface.cpp
- Revision:
- 1:fbba2687ddfe
- Parent:
- 0:b2b3955cd77b
- Child:
- 7:4eb590c7e064
--- a/interface.cpp Sun Oct 30 16:04:52 2016 +0000 +++ b/interface.cpp Mon Nov 14 01:27:31 2016 +0000 @@ -44,18 +44,22 @@ case '2': interface::dataScreen(); break; - } + default: + pc->printf("\nThat is not an option."); + interface::startScreen(); + break; + } } void interface::dataScreen(){ (*pc).printf("\nDCM Data sets:\n"); - (*pc).printf("1. Atrium Data\n2. Ventricle Data\n3. Egram Data\n4. Back to start page\n"); + (*pc).printf("1. Atrium Data\n2. Ventricle Data\n3. General Data\n4. Egram Data\n5. Back to start page\n"); (*pc).printf("Choose a data set:"); char command = getChar(); switch (command) { case '1': - pc->printf("\nAtrium Data\n"); - pc->printf("1. Pace Amplitude: %f", atrData->getPaceAmp()*7); + pc->printf("\nAtrium Data"); + pc->printf("\n1. Pace Amplitude: %f", atrData->getPaceAmp()*7); pc->printf("\n2. Pace Width: %f", atrData->getPaceWidth()); pc->printf("\n3. Refractory Period: %f", atrData->getRP()); pc->printf("\n4. Sensitivity: %f", atrData->getSensitivity()); @@ -63,8 +67,8 @@ interface::getData(atrData); break; case '2': - pc->printf("\nVentricle Data\n"); - pc->printf("1. Pace Amplitude: %f", ventData->getPaceAmp()*7); + pc->printf("\nVentricle Data"); + pc->printf("\n1. Pace Amplitude: %f", ventData->getPaceAmp()*7); pc->printf("\n2. Pace Width: %f", ventData->getPaceWidth()); pc->printf("\n3. Refractory Period: %f", ventData->getRP()); pc->printf("\n4. Sensitivity: %f", ventData->getSensitivity()); @@ -72,12 +76,15 @@ interface::getData(ventData); break; case '3': - printf("\nNot setup yet"); + pc->printf("\nGeneral Data"); +// pc->printf("\n1. Hysteresis: %f", + case '4': + pc->printf("\nNot setup yet"); break; - case '4': + case '5': interface::startScreen(); default: - printf("\nThat is not an option."); + pc->printf("\nThat is not an option."); interface::dataScreen(); } } @@ -86,28 +93,28 @@ char command = getChar(); switch (command){ case '1': - printf("\nChoose New Value:"); + pc->printf("\nChoose New Value:"); char* value = getInput(); chamber->chngPaceAmp(atof(value)); pc->printf("\t%f",chamber->getPaceAmp()*7); interface::dataScreen(); break; case '2': - printf("\nChoose New Value:"); + pc->printf("\nChoose New Value:"); value = getInput(); chamber->chngPaceWidth(atof(value)); pc->printf("\t%f",chamber->getPaceWidth()); interface::dataScreen(); break; case '3': - printf("\nChoose New Value:"); + pc->printf("\nChoose New Value:"); value = getInput(); chamber->chngRP(atof(value)); pc->printf("\t%f",chamber->getRP()); interface::dataScreen(); break; case '4': - printf("\nChoose New Value:"); + pc->printf("\nChoose New Value:"); value = getInput(); chamber->chngSensitivity(atof(value)); pc->printf("\t%f",chamber->getSensitivity());