most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown

Dependencies:   mbed MODSERIAL FATFileSystem

Revision:
51:c5c40272ecc3
Parent:
49:47ffa4feb6db
Child:
52:f207567d3ea4
--- a/StateMachine/StateMachine.cpp	Thu Feb 15 23:08:38 2018 +0000
+++ b/StateMachine/StateMachine.cpp	Mon Jun 04 15:20:21 2018 +0000
@@ -1142,6 +1142,25 @@
         else if (userInput == 'C' or userInput == 'c') {
             
             pc().printf("\n\n\rCURRENT STATUS AND PARAMETERS:\n\r");
+            
+            // Testing out ADC
+            float vref = 5.6;
+            float vmeasured = 0;
+            unsigned int raw = adc().readCh5();
+            vmeasured = ((float)raw)/4095.0*vref;
+            pc().printf("raw BCE pos: %d \r\n",adc().readCh0());
+            pc().printf("raw BMM pos: %d \r\n",adc().readCh1());
+            pc().printf("raw BCE current sense: %d \r\n",adc().readCh2());
+            pc().printf("raw BMM current sense: %d \r\n",adc().readCh3());
+            pc().printf("raw depth pressure: %d \r\n",adc().readCh4());
+            pc().printf("raw vessel pressure: %d \r\n",adc().readCh5());
+            pc().printf("raw battery voltage: %d \r\n",adc().readCh6());
+            pc().printf("raw board current: %d \r\n",adc().readCh7());
+            pc().printf("raw BCE limit switch: %d \r\n",bce().getSwitch());
+            pc().printf("raw BMM limit switch: %d \r\n",batt().getSwitch());
+            pc().printf("raw vessel pressure: %f %d \r\n",vmeasured,raw);
+            // End of ADC Test
+            
             pc().printf("depth: %3.1f ft\r\n",depthLoop().getPosition());
             pc().printf("pitch: %3.1f deg\r\n",imu().getPitch());
             pc().printf("bce().getPosition_mm(): %3.1f\r\n",bce().getPosition_mm());