Clownface / MotorDriver

Fork of MotorDriver by Matt Rogers

Revision:
3:7a6365365ee2
Parent:
1:15e17abb9f29
--- a/MotorDriver.cpp	Thu Apr 28 02:00:07 2016 +0000
+++ b/MotorDriver.cpp	Thu Apr 28 02:38:16 2016 +0000
@@ -3,7 +3,6 @@
 #include <cmath>
 
 // See .h file for function descriptions and details
-
 MotorDriver::MotorDriver(DigitalOut in1, DigitalOut in2, PwmOut pwm, float pwmFreq, bool isBrakeable)
     : _in1(in1), _in2(in2), _pwm(pwm)
 {
@@ -43,14 +42,14 @@
         (bool)((speed < 0.0f) && (motor_state.code == DRIVING_CW) && (_pwm > 0.05f)) ||
         (bool)((speed > 0.0f) && (motor_state.code == DRIVING_CCW)&& (_pwm > 0.05f));
     if(isTryingToInstantReverse) {
-        // Set motor to brake, set state to error
+    // Set motor to brake, set state to error
         coast();
         motor_state.code = MOTOR_ERROR;
         motor_state.value = _pwm;
         return motor_state;
     } else {
         if(speed == 0.0f) {
-            // No effect to _in pins
+        // No effect to _in pins
         } else {
             _in1 = (speed>0.0f);
             _in2 = (speed<0.0f);