Final Project files for mBed development.

Dependencies:   m3pi mbed

Revision:
29:459ff10d2a07
Parent:
22:46b9d9b2e35c
Child:
31:1e950ee04481
diff -r 9976a94efa83 -r 459ff10d2a07 main.h
--- a/main.h	Mon Dec 08 10:52:42 2014 +0000
+++ b/main.h	Mon Dec 08 22:43:09 2014 +0000
@@ -3,6 +3,8 @@
  * @brief   Main header file for includes and whatnot 
  *          for the other project files.
  * @author  John Wilkey
+ * @author  Alec Guertin
+ * @author  Chester Chu
  */
  
 #ifndef _MAIN_H
@@ -24,10 +26,7 @@
 #define CLOSE_ENOUGH .0008
 
 
-/**
- * @brief   move the robot from its current position to (x,y)
- *
- */
+/** @brief Move the robot from its current position to (x,y) */
 void move(int x, int y, int draw);
 
 /**
@@ -43,52 +42,42 @@
 int retrieve_inst(char *buf, int *x, int *y, int *draw);
 
 /**
- * @brief Driver forward.
+ * @brief Driver forward for a time.
  *
- * @param[in]   amt     Amount to drive forward. In centimeters.
- * @return              Success or failure. 
+ * @param[in]   amt     Amount to drive forward. In milliseconds.
  */
-int forward(int amt);
+void forward(int amt);
 
 /**
- * @brief Drive backward.
+ * @brief Drive backward for a time.
  *
- * @param[in]   amt     Amount to drive backward. In centimeters.
- * @return              Success or failure. 
+ * @param[in]   amt     Amount to drive backward. In milliseconds.
  */
-int backward(int amt);
+void backward(int amt);
 
 /**
- * @brief Turn right.
+ * @brief Turn right by some angle.
  *
- * @param[in]   deg     Desired final turn angle from starting position.
- * @param[in]   spd     Desired turning speed.
- * @return              Success or failure. 
+ * @param[in]   deg     Desired final turn angle in degrees from start.
+ *                      Note that a negative angle will turn in the opposite
+ *                      direction.
  */
-int right(float deg);
+void right(float deg);
 
 /**
- * @brief Turn left.
+ * @brief Turn left by some angle.
  *
- * @param[in]   deg     Desired final turn angle from starting position.
- * @param[in]   spd     Desired turning speed.
- * @return              Success or failure. 
+ * @param[in]   deg     Desired final turn angle in degrees from start.
+ *                      Note that a negative angle will turn in the opposite
+ *                      direction.
  */
-int left (float deg);
+void left (float deg);
 
-/**
- * @brief Enable pen motion. 
- *
- * Note that at the moment, for simplicity, this method just activates an LED
- * on the expansion board to indicate that the pen should be in DOWN mode. 
- */
+/** @brief Lower pen intro drawing position */
 void pen_down();
  
- /**
-  * @brief Raise pen
-  */
-void pen_up();
-  
+/** @brief Raise pen into moveto position */
+void pen_up();  
 
 /**
  * @brief Controller decision logic.
@@ -98,10 +87,12 @@
 void next_action();
 
 /**
- * @brief Wait for a number of seconds, possibly fractional.
+ * @brief   Wait for a number of seconds, possibly fractional.
+ * 
+ * Timer resolution is on the order of microseconds. A negative wait
+ * time does nothing. 
  *
- * This is because mBed wait() function SUCKS
+ * @param[in]   amt     Time to wait, in seconds.
  */
-void timerWait(float);
-
-#endif
+void timerWait(float amt);
+#endif
\ No newline at end of file