Mark Schwarzer / Mbed 2 deprecated Project_OCE360

Dependencies:   mbed

Revision:
8:7f970fcf1a16
Parent:
7:b3cc3dd22f55
Child:
9:120ab4a494ec
--- a/main.cpp	Thu Dec 03 14:50:58 2020 +0000
+++ b/main.cpp	Thu Dec 03 15:01:27 2020 +0000
@@ -78,14 +78,18 @@
     { 
         p_sensor.Barometer_MS5837();
         //Depth Holding
-    if (p_sensor.depth()<2.0) {
+    if (p_sensor.depth()>2.0) {
         thruster.pulsewidth(1.0/1000.00);
         thruster2.pulsewidth(1.0/1000.00);
         }
-        else if(p_sensor.depth()>2.0) {
+        else if(p_sensor.depth()<2.0) {
             thruster.pulsewidth(1.6/1000.00);
             thruster2.pulsewidth(1.6/1000.00);
             }
+            else if(p_sensor.depth()==2.0) {
+            thruster.pulsewidth(1.3/1000.00);
+            thruster2.pulsewidth(1.3/1000.00);
+                }
  /*
         printf("Pressure: "); 
         printf("%f",p_sensor.MS5837_Pressure());