created separate function for hex to char

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of SS_SensePOC2P0_11Dec2017_USERPID by rashmi v

Revision:
52:7d9ff7781bdc
Parent:
51:1a4693774b60
Child:
53:cc6e65480a67
--- a/touch_modules.cpp	Wed Sep 20 07:48:55 2017 +0000
+++ b/touch_modules.cpp	Wed Sep 20 10:33:17 2017 +0000
@@ -101,7 +101,9 @@
                           
                           state = 12;
                         }
-                if ((read_debug_status()== 1) && get_timer_debug()<TIMER_ENABLE_DEBUG_MODE)                                                                              // checking for the debug status and timer 
+                        
+                        
+                else if ((read_debug_status()== 1) && get_timer_debug()<TIMER_ENABLE_DEBUG_MODE)                                                                              // checking for the debug status and timer 
                     {
                         if ( ((xt >=DELETE_MAIN_X_MIN) && (xt<=DELETE_MAIN_X_MAX)) && ( (yt>=DELETE_MAIN_Y_MIN) && (yt<=DELETE_MAIN_Y_MAX) ) )                          // DELETE
                             {
@@ -109,6 +111,7 @@
                             }
                     }
                     
+                    
                  else if ( ((xt >=PATIENT_INFO_MAIN_X_MIN) && (xt<=PATIENT_INFO_MAIN_X_MAX)) && ( (yt>=PATIENT_INFO_MAIN_Y_MIN) && (yt<=PATIENT_INFO_MAIN_Y_MAX) ) )    // file
                       {
                                 state=11;
@@ -116,11 +119,13 @@
                        }
                  else if ( ((xt >=HOME_MAIN_X_MIN) && (xt<=HOME_MAIN_X_MAX)) && ( (yt>=HOME_MAIN_Y_MIN) && (yt<=HOME_MAIN_Y_MAX) ) ) // home
                        {
-                                 state=1;         //////////
+                                 state=1;       
                         
                        }
                    else 
-                     state=10;     
+                     state=10; 
+                     
+                     kc.printf("state = %d\n", state);    
                    
          return state;     
     }