Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of SS_SensePOC2P0_11Dec2017_USERPID by
Diff: bt.cpp
- Revision:
 - 60:3bb9e9ba3205
 - Parent:
 - 59:dadb88794375
 - Child:
 - 62:7d2a844ed639
 
diff -r dadb88794375 -r 3bb9e9ba3205 bt.cpp
--- a/bt.cpp	Mon Nov 13 12:02:00 2017 +0000
+++ b/bt.cpp	Tue Nov 14 12:03:36 2017 +0000
@@ -520,7 +520,6 @@
      
     if (cal_chksum == poc2p0_bt_msg_req.chksum)
     {
-        //mc.printf("CMD: %2x\n",poc2p0_bt_msg_req.cmd);
         switch (poc2p0_bt_msg_req.cmd)
         {
         case STRT_BP_TEST_REQ:
@@ -530,16 +529,19 @@
 
         case STRT_BG_FBS_TEST_REQ:
             mc.printf("\n\r cal_chksum = %2x\n", cal_chksum); 
+            eprom_write_16(20,0);                                               //added on 14-Nov by rashmi
             touch_state = TOUCH_STATE_BG_TEST_SCREEN;
             break;
 
         case STRT_BG_PP_TEST_REQ:
             mc.printf("\n\r cal_chksum = %2x\n", cal_chksum); 
+            eprom_write_16(20,1);                                               //added on 14-Nov by rashmi 
             touch_state = TOUCH_STATE_BG_TEST_SCREEN;
             break;
 
         case STRT_BG_RAN_TEST_REQ:
             mc.printf("\n\r cal_chksum = %2x\n", cal_chksum); 
+            eprom_write_16(20,2);                                               //added on 14-Nov by rashmi
             touch_state = TOUCH_STATE_BG_TEST_SCREEN;
             break;
 
@@ -550,12 +552,13 @@
 
         case DATA_SYNC_REQ:
             mc.printf("\n\r cal_chksum = %2x\n", cal_chksum); 
-            touch_state = TOUCH_STATE_DATA_SYNC_SCREEN;
+            touch_state = 12 ;                                                  //TOUCH_STATE_DATA_SYNC_SCREEN
             poc2p0_send_device_msg_res(DATA_SYNC_MSG_ACCEPTED_RES);
             break;
 
         case HEARTBEAT_REQ:
             mc.printf("\n\r cal_chksum = %2x\n", cal_chksum); 
+            mc.printf("curr_touch_state: %2x\n",curr_touch_state);
             if ((curr_touch_state == TOUCH_STATE_HOME_SCREEN)||(curr_touch_state == TOUCH_STATE_TEST_SCREEN))
             {
                 poc2p0_send_device_heartbeat_msg_res(curr_touch_state);
@@ -598,7 +601,7 @@
         temp_ms_nibble = input_buf[i] > '9' ? (input_buf[i]|32) - 'a' + 10 : input_buf[i] - '0';
         temp_ls_nibble = input_buf[i+1] > '9' ? (input_buf[i+1]|32) - 'a' + 10 : input_buf[i+1] - '0';
         temp_buf[j] = (temp_ms_nibble << 4) | temp_ls_nibble;
-        mc.printf("\n\r msg_SOS = %2x", temp_buf[j]);
+        //mc.printf("\n\r msg_SOS = %2x", temp_buf[j]);
     }
     
     memcpy(&poc2p0_bt_msg_req, &temp_buf, sizeof(poc2p0_bt_msg_req));
    