PWM/Direction Motor Driver compatible with VNH3SP30 Motor Driver Carrier MD01B

Dependents:   RoboCup_2015

Files at this revision

API Documentation at this revision

Comitter:
OPSHUD
Date:
Mon Sep 29 17:20:59 2014 +0000
Parent:
1:4b1582384e71
Commit message:
updated format;

Changed in this revision

MotorDriver.cpp Show annotated file Show diff for this revision Revisions of this file
MotorDriver.h Show annotated file Show diff for this revision Revisions of this file
--- a/MotorDriver.cpp	Mon Sep 29 17:15:29 2014 +0000
+++ b/MotorDriver.cpp	Mon Sep 29 17:20:59 2014 +0000
@@ -1,6 +1,7 @@
 #include "MotorDriver.h"
 #include "mbed.h"
-MotorDriver::MotorDriver(PinName PWMPin, PinName directionPin1, PinName directionPin2) : mPWM(PWMPin), mDir1(directionPin1), mDir2(directionPin2) {
+MotorDriver::MotorDriver(PinName PWMPin, PinName directionPin1, PinName directionPin2) : 
+ mPWM(PWMPin), mDir1(directionPin1), mDir2(directionPin2) {
     this->SetValue(0);
 }
 void MotorDriver::SetValue(float value) {
--- a/MotorDriver.h	Mon Sep 29 17:15:29 2014 +0000
+++ b/MotorDriver.h	Mon Sep 29 17:20:59 2014 +0000
@@ -40,8 +40,8 @@
     MotorDriver(PinName PWMPin, PinName directionPin1, PinName directionPin2);    
     
     /**
-     * Sets the PWM duty cycle to the absolute value of your percentage, and the direction as
-     * the sign of your value.
+     * Sets the PWM duty cycle to the absolute value of your percentage, and the direction 
+     * as the sign of your value.
      * @param   value   From -1.0 to 1.0, the percentage you want to run your motor at.
      */
     void SetValue(float value);