cleaned up motor class with separate header and .cpp files

Dependencies:   mbed

Dependents:   TerraBot_Drive_2D TerraBot_Drive_2D TerraBot_Drive_2D_FINAL DUMP_TRUCK_Test ... more

Files at this revision

API Documentation at this revision

Comitter:
simplyellow
Date:
Tue Feb 14 20:46:08 2017 +0000
Parent:
2:7674afbf8e53
Commit message:
added some doxygen tags

Changed in this revision

Motor.h Show annotated file Show diff for this revision Revisions of this file
--- a/Motor.h	Mon Oct 24 20:14:27 2016 +0000
+++ b/Motor.h	Tue Feb 14 20:46:08 2017 +0000
@@ -1,12 +1,41 @@
+/**
+*   @file   Motor.h
+*
+*   @brief  Motor class implements API for controlling motors.
+*
+*   @author Terrabots Team
+*
+*/
+
 #ifndef MOTOR_H
 #define MOTOR_H
 
 #include "mbed.h"
 
+/**
+*   @class Motor
+*
+*   @brief  Interface for controlling the dump truck's motors
+*/
+
 class Motor {
     public:
+        /**
+        *   Constructor for the Motor object.
+        *
+        *   @param[in]  pwm     The PwmOut pin used for controlling speed.
+        *   @param[in]  dir     The DigitalOut pin used for controlling direction.
+        */
         Motor(PinName pwm, PinName dir);
+        /**
+        *   Command the motor to run at a desired speed
+        *
+        *   @param[in]  Val     The desired speed of type float.
+        */
         void write(float Val);
+        /**
+        *   Read the speed of the motor
+        */
         float read();
     private:
         PwmOut pwmPin;