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 merged_code2_3rd_nov_2017 by
Diff: main.cpp
- Revision:
- 54:f2a413d5dffd
- Parent:
- 53:cc6e65480a67
--- a/main.cpp Wed Sep 20 11:02:08 2017 +0000
+++ b/main.cpp Wed Sep 27 09:36:26 2017 +0000
@@ -37,11 +37,11 @@
Timer timer_bt; // timer for bluetooth
Timer timer_battery; // timer for battery
Timer timer_debug; // timer for entering the debug mode
-static bool debug_mode=0; // holds the status of the debug mode "1" indicates the device is in debug mode
+static bool debug_mode=false; // holds the status of the debug mode "1" indicates the device is in debug mode
char debug_message_rx[6]; // buffer to receive the debug message data
char debug_message[6]={"debug"}; //debug message to be received
void debug_status_monitoring(); // debug status monitoring
-
+static uint32_t pid = 0; // patient ID
int main()
{
@@ -57,6 +57,7 @@
gc.baud(115200);
blue1.baud(115200);
init_screen(); //initialize lcd
+ pid = get_filepid() + 1; //added on 22/09/2017 nikita
screen_main(); // display of main screen
battery_monitor(); // monitor battery at the start only
battery_status_display(); // display of main screen
@@ -67,7 +68,7 @@
while(1)
{
- if (read_debug_status() == 0) // checking the debug_mode status
+ if (read_debug_status() == false) // checking the debug_mode status
{
if(timer_debug.read_ms()<TIMER_ENTER_DEBUG_MODE)
{
@@ -317,7 +318,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;
- static uint32_t pid = 0; // patient ID
+
switch(state1) // state for display screens
{
@@ -628,8 +629,8 @@
{
-if(get_timer_debug()<TIMER_ENTER_DEBUG_MODE)
-{
+//if(get_timer_debug()<TIMER_ENTER_DEBUG_MODE)
+//{
if (gc.readable()) // check for the user input
{
@@ -644,13 +645,13 @@
if (strcmp(debug_message_rx, debug_message) == 0) // compare the message with the required one
{
- debug_mode = 1; // enable the debug mode status
+ debug_mode = true; // enable the debug mode status
gc.printf("entered into debug mode\n");
timer_debug.reset();
timer_debug.start(); // timer is started in orede
}
}
-}
+//}
}
