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:
- 74:9ba8a7101036
- Parent:
- 73:22e4f398a2a6
- Child:
- 75:0feb6f993562
--- a/main.cpp Thu Dec 07 07:30:46 2017 +0000 +++ b/main.cpp Sun Dec 10 03:17:14 2017 +0000 @@ -18,7 +18,7 @@ #define SERIAL_BAUD_RATE 115200 #define BATTERY_SCREEN_NO_CHARGE_CONDITION 3 #define TIMER_ENTER_DEBUG_MODE 10000 -#define HEARTBEAT_DATA_LEN 0x0Du +#define HEARTBEAT_DATA_LEN 0x13u //changed from 0D to 13 #define DEVICE_RESULT_DATA_LEN 0x04u #define ZERO_DATA_LEN 0x00u @@ -65,7 +65,7 @@ uint8_t cmd; // this contains error response uint8_t length; uint8_t did; - char pid[10]; + uint8_t pid[10]; //uint32_t pid; DateTime_info date_time; uint8_t device_state; //changed POC2P0_DEVICE_STATE to uint8_t @@ -106,7 +106,6 @@ 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 user_pid[10]; static uint8_t device_id = 0; int main() @@ -128,8 +127,9 @@ //battery_status_display(); // display of main screen timer_battery.start(); timer_debug.start(); + read_device_id(); gc.printf("enter message to go into debug mode\n"); - read_device_id(); + while(1) { @@ -143,7 +143,7 @@ battery_status_monitoring(); // to monitior battery status after every 10 min. - if (get_battery_status() == BATTERY_SCREEN_NO_CHARGE_CONDITION) // to check battery status and take action + if(false)// (get_battery_status() == BATTERY_SCREEN_NO_CHARGE_CONDITION) // to check battery status and take action { //DisableTouch(); } @@ -151,6 +151,7 @@ { //EnableTouch(); //gc.printf("c"); + //gc.printf("main state: %d\n",main_state); switch(main_state) // main state machine { case GET_TOUCH_DISP_STATE: