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: ecgg.cpp
- Revision:
- 43:85a7f399cb9d
- Parent:
- 42:c81673b04b6a
- Child:
- 51:1a4693774b60
diff -r c81673b04b6a -r 85a7f399cb9d ecgg.cpp
--- a/ecgg.cpp Mon Sep 11 10:02:46 2017 +0000
+++ b/ecgg.cpp Mon Sep 11 13:09:29 2017 +0000
@@ -14,7 +14,7 @@
#include "ec_bp.h"
#include "eeprom_pgm.h"
#include "struct.h" // Added on 31/5/17_Nidhin
-
+#include "main.h"
//#include "test_type.h" //Added on 31/5/17_Nidhin
#define MAX_HR_THRESHOLD 205
@@ -25,7 +25,7 @@
Serial pc(USBTX,USBRX);
-uint16_t ecg(int32_t pid)
+uint16_t ecg(uint32_t pid)
//float ecg(int pid)
{
@@ -248,6 +248,11 @@
structure_file(ptr_BLEMsg_info_ecg, pid); //copy the ECG structure to Main file //COMMENTED Nidhin 10/6/2017
ecgfile_mainfile(pid); // copy raw data to the main file and ECG file is cleared. //COMMENTED Nidhin 10/6/2017
+ if(get_filecreated_status() == false) //if file is in write mode
+ {
+ set_filecreated_status();
+ increment_filepid ();
+ }
pc.printf("Closed the main file\n");
return HR_avg;
}
