created separate function for hex to char
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of SS_SensePOC2P0_11Dec2017_USERPID by
Diff: main.cpp
- Revision:
- 67:7e07cdb1b150
- Parent:
- 66:d7fc45e328d0
- Child:
- 68:41da0a3ba038
--- a/main.cpp Mon Nov 20 09:52:59 2017 +0000 +++ b/main.cpp Mon Nov 20 12:23:52 2017 +0000 @@ -104,7 +104,7 @@ static uint32_t pid = 0; // patient ID static uint8_t state_touch = 1; //added on 16-NOV rashmi uint8_t buffer_pointer = 0x00u; - +static char usser_pid[10] = {0}; int main() { static DEVICE_MAIN_STATE main_state = GET_TOUCH_DISP_STATE; @@ -374,7 +374,7 @@ static uint8_t ecg_flag=0; // ecg_flag to indicate the ecg test is already done for the same pid static uint8_t glc_flag=0; // glc_flag to indicate the glc test is already done for the same pid //uint16_t heart_rate=0; - + switch(state1) // state for display screens { @@ -408,10 +408,11 @@ case 3: DisableTouch(); - //sd_read(pid_btpid); //read pid from sd card - //pid=pid_btpid[0]; //copy pid to a variable + gc.printf("\n\r Enter User PID\n"); // + set_userpid(usser_pid); + gc.printf("User pid = %s\n",usser_pid); gc.printf("pidinit=%d",pid); - screen_main_2(pid); + screen_main_2(usser_pid); state1=0; state=3; nstate=state; @@ -480,7 +481,7 @@ eprom_write_8(30,0); nstate=state; //wait(2); //added on 16-NOV rashmi - screen_main_2(pid); //added on 16-NOV rashmi + screen_main_2(usser_pid); //added on 20-NOV rashmi state_touch = TOUCH_STATE_TEST_SCREEN; //added on 16-Nov rashmi EnableTouch(); break; @@ -498,7 +499,7 @@ nstate=state; screen_ecg_bp(); //wait(2); //added on 16-NOV rashmi - screen_main_2(pid); //added on 16-NOV rashmi + screen_main_2(usser_pid); //added on 20-NOV rashmi state_touch = TOUCH_STATE_TEST_SCREEN; //added on 16-Nov rashmi EnableTouch(); break; @@ -518,7 +519,7 @@ eprom_write_8(30,2); nstate=state; //wait(2); //added on 16-NOV rashmi - screen_main_2(pid); //added on 16-NOV rashmi + screen_main_2(usser_pid); //added on 20-NOV rashmi state_touch = TOUCH_STATE_TEST_SCREEN; //added on 16-Nov rashmi EnableTouch(); break; @@ -843,3 +844,8 @@ } + +char *get_userpid(char user_pid[]) +{ + return user_pid; +}