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:
51:1a4693774b60
Parent:
49:3ff80c4bc1be
Child:
52:7d9ff7781bdc
--- a/touch_modules.cpp	Sat Sep 16 06:54:42 2017 +0000
+++ b/touch_modules.cpp	Wed Sep 20 07:48:55 2017 +0000
@@ -16,14 +16,14 @@
  {
             xt = (X_MAX*readTouchX()/TOTAL1);
             yt = (Y_MAX*readTouchY()/TOTAL1);
-            //kc.printf("%d\n", xt); 
-            //  kc.printf("%d\n", yt); 
+           kc.printf("%d\n", xt); 
+            kc.printf("%d\n", yt); 
  }
 
 
 void detect_touch(unsigned char display_state)   // detect the touch //debounce
 {
-//kc.printf("display state=%d\n",display_state);
+kc.printf("display state=%d\n",display_state);
 uint32_t time_ms=0;
 switch (display_state)
 
@@ -96,20 +96,20 @@
     
     unsigned char state=0;
         
-                  if ( ((xt >=BT_MAIN_X_MIN) && (xt<=BT_MAIN_X_MAX)) && ( (yt>= BT_MAIN_Y_MIN) && (yt<=BT_MAIN_Y_MAX) ) ) // ble
+                  if ( ((xt >=BT_MAIN_X_MIN) && (xt<=BT_MAIN_X_MAX)) && ( (yt>= BT_MAIN_Y_MIN) && (yt<=BT_MAIN_Y_MAX) ) )                                                   // ble
                        {
                           
                           state = 12;
                         }
-                if (read_debug_status()== 1)
+                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
+                        if ( ((xt >=DELETE_MAIN_X_MIN) && (xt<=DELETE_MAIN_X_MAX)) && ( (yt>=DELETE_MAIN_Y_MIN) && (yt<=DELETE_MAIN_Y_MAX) ) )                          // DELETE
                             {
                            state=13;
                             }
                     }
                     
-                 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
+                 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;