za

Fork of m3pi by Chris Styles

Revision:
9:08cc708cee52
Parent:
8:4b7d6ea9b35b
Child:
10:30aaa3c1910a
--- a/m3pi.h	Thu May 12 13:26:37 2011 +0000
+++ b/m3pi.h	Sun Mar 24 00:15:29 2013 +0000
@@ -1,28 +1,9 @@
-/* mbed m3pi Library
- * Copyright (c) 2007-2010 cstyles
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
+
 
 #ifndef M3PI_H
 #define M3PI_H
 
+
 #include "mbed.h"
 #include "platform.h"
 
@@ -51,35 +32,9 @@
 
 
 
-/** m3pi control class
- *
- * Example:
- * @code
- * // Drive the m3pi forward, turn left, back, turn right, at half speed for half a second
-
-   #include "mbed.h"
-   #include "m3pi.h"
-
-   m3pi pi;
-
-   int main() {
-
-     wait(0.5);
+ 
 
-     pi.forward(0.5);
-     wait (0.5);
-     pi.left(0.5);
-     wait (0.5);
-     pi.backward(0.5);
-     wait (0.5);
-     pi.right(0.5);
-     wait (0.5);
-
-     pi.stop();
-
- }
- * @endcode
- */
+ 
 class m3pi :  public Stream {
 
     // Public functions
@@ -149,7 +104,7 @@
      * @returns voltage as a float
      *
      */
-    float pot_voltage(void);
+    //float pot_voltage(void);
 
     /** Read the battery voltage on the 3pi
      * @returns battery voltage as a float
@@ -162,23 +117,23 @@
      *   0.0 means the line is in the middle
      *   1.0 means the line is on the right
      */
-    float line_position (void);
+    float position (void);
 
 
     /** Calibrate the sensors. This turns the robot left then right, looking for a line
      *
      */
-    char sensor_auto_calibrate (void);
+    //char sensor_auto_calibrate (void);
 
     /** Set calibration manually to the current settings.
      *
      */
-    void calibrate(void);
+    //void calibrate(void);
 
     /** Clear the current calibration settings
      *
      */
-    void reset_calibration (void);
+    //void reset_calibration (void);
 
     void PID_start(int max_speed, int a, int b, int c, int d);
 
@@ -197,6 +152,8 @@
      */
     void locate(int x, int y);
 
+   
+    
     /** Clear the LCD
      *
      */