update with altimeter, swimfile.txt endleg.txt, etc see changes_13sep.txt also reset_PI()

Dependencies:   mbed MODSERIAL FATFileSystem

Revision:
3:7824127c5cfd
Parent:
2:892b58e56712
Child:
4:66f13fbb035d
--- a/main.cpp	Fri Oct 06 13:25:26 2017 +0000
+++ b/main.cpp	Fri Oct 06 21:16:55 2017 +0000
@@ -17,14 +17,18 @@
 #define BATT_ZERO 100    //counts
 #define BATT_LIMIT 50.0 //mm
 
-#include <fstream>
-#include <iostream>
-
 int main()
-{
-    //initialize linear actuator objects (doesn't work) 
+{   
+    local();  //this makes sure the local file system is constructed
+    
+    //Read in and load the BCE parameters from the text file "bce.txt"
     load_BCE_config();
     
+    ////Read in and load the battery mover parameters from the text file "batt.txt"
+    
+    // do not leave this in. It is just there to check that things are working
+    pc().printf("\n\rP: %3.2f I: %3.2f D %3.2f zero: %3i limit %3.2f slope %3.2f", bce().getControllerP(), bce().getControllerI(), bce().getControllerD(), bce().getZeroCounts(), bce().getTravelLimit(), bce().getPotSlope());
+    
     //Front load the desired parameters into the linear acuator objects.  
     //This could be done using ConfigFile, if it worked
     
@@ -32,13 +36,6 @@
     //actuator's PID objects. I noticed I have defaults that are appropriate for only
     //the bouyancy engine
     
-    bce().setControllerP(BCE_P);
-    bce().setControllerI(BCE_I);
-    bce().setControllerD(BCE_D);
-    bce().setZeroCounts(BCE_ZERO);
-    bce().setTravelLimit(BCE_LIMIT);
-    bce().setPotSlope(POT_SLOPE);
-    
     batt().setControllerP(BATT_P);
     batt().setControllerI(BATT_I);
     batt().setControllerD(BATT_D);