Code supports writing to the SD card as well as working with the Volckens group smartphone apps for the mbed HRM1017

Dependencies:   ADS1115 BLE_API BME280 Calibration CronoDot EEPROM LSM303 MCP40D17 NCP5623BMUTBG SDFileSystem SI1145 STC3100 mbed nRF51822

Fork of UPAS_BLE_and_USB by Volckens Group Sensors

Revision:
78:a465de6cc47e
Parent:
77:24fbeb2bfe05
Child:
79:ed555e9081d0
--- a/main.cpp	Fri Sep 04 01:36:57 2015 +0000
+++ b/main.cpp	Fri Sep 11 19:47:06 2015 +0000
@@ -239,7 +239,7 @@
     Menu.read_menu(E2PROM, logInerval,refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num);   //Read all data from the EEPROM here
 
     //**************//BLE initialization//**************//
-    //bleMenu.read_settings(E2PROM, device_name);
+    bleMenu.read_menu(E2PROM, logInerval,refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num);   //Read all data from the EEPROM here
     uint8_t BLE_name[] = {device_name[0], device_name[1], device_name[2], device_name[3], device_name[4], device_name[5], device_name[6], device_name[7], device_name[8]};
     ble.init();
     // setup advertising
@@ -269,7 +269,7 @@
             RGB_LED.set_led(0,1,1);   // error code/color
             RunReady = Menu.Start(pc, E2PROM, RTC, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, Menu.menu_ops, 0.25, serial_num, calibrations);  //Forces you to open the menu
             RGB_LED.set_led(0,10,10); // error code/color
-            bleMenu.open_menu(txPayload, rxCharacteristic, E2PROM, RTC, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, 9,RunReady, 0.25);
+            bleMenu.open_menu(txPayload, rxCharacteristic, E2PROM, RTC, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, Menu.menu_ops ,RunReady, 0.25, serial_num, calibrations);
         }
         if(Menu.crr == 0){
             Menu.save_menu(E2PROM, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num);       //Save all data to the EEPROM
@@ -279,7 +279,8 @@
 
     RunReady = 0;
     Menu.save_menu(E2PROM, logInerval, refreshtime, volflowSet, device_name, dutyUp, dutyDown, home_lat, home_lon, work_lat, work_lon, RunReady, serial_num);       //Save all data to the EEPROM
-
+    calibrations.initialize(serial_num);
+    
     stop.attach(&check_stop, 60);    // check if we should shut down every 5 seconds, starting 60s after the start.
 
     if(volflowSet==1.0) {