Added 4 point or 8 point averaging function .

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of merged_code2_3rd_nov_2017 by nikita teggi

Revision:
41:1141a75eacc4
Parent:
40:f7f351699288
Child:
42:c81673b04b6a
--- a/glc.cpp	Sun Aug 20 16:21:54 2017 +0000
+++ b/glc.cpp	Fri Sep 08 10:35:21 2017 +0000
@@ -263,7 +263,8 @@
         BLEMsg_info_glc.cal_data.cal_dbp_OTtyp = (uint16_t) mgdl;  //To be checked for reliable results           
             
         structure_file(ptr_BLEMsg_info_glc, pid);           // Copy the structure into the GLC file 
-        glcfile_mainfile(pid); 
+        glcfile_mainfile(pid);
+        increment_pid ();                                   //increment pid if test is pass
        }
   else if(err == 1 || mgdl > MAX_GLC_THRESHOLD || mgdl < MIN_GLC_THRESHOLD)      // added threshold to check value out of range   
     {