first commit

Dependencies:   mbed MMA8451Q

Revision:
9:5320c2dfb913
Parent:
6:d2bd68ba99c9
Child:
13:0091da3021df
--- a/steering_methods.h	Mon Oct 25 18:48:17 2021 +0000
+++ b/steering_methods.h	Tue Oct 26 01:22:05 2021 +0000
@@ -88,12 +88,12 @@
         current_duty_cycle = rad2dc(servo_angle);
         if( abs(current_duty_cycle - prev_duty) >= 0.001){
             servo_motor_pwm.write(current_duty_cycle);
-            }
+            };
       }
-      else if(steering_enabled == false){
+      else {
             current_duty_cycle = rad2dc(M_PI/4);
             servo_motor_pwm.write(current_duty_cycle);
-          }
+          };
     //Save the error for the next calculation.
     prev_duty = current_duty_cycle;
     err_prev = err;