before test

Dependencies:   BEAR_Protocol_Edited BufferedSerial Debug MaxSonar PID Process QEI UI iSerial mbed

Fork of clean_V1 by Betago

Revision:
5:fe76f3dae81e
Parent:
4:de5a65c17664
Child:
7:0dac9d4ff04f
--- a/rplidar/rplidar.h	Sun Jun 05 09:43:40 2016 +0000
+++ b/rplidar/rplidar.h	Tue Jun 07 03:26:08 2016 +0000
@@ -26,13 +26,11 @@
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
-#ifndef RPLIDAR_H
-#define RPLIDAR_H
 
 #pragma once
 #include "mbed.h"
-#include "rptypes.h"
-#include "rplidar_cmd.h"
+#include "inc/rptypes.h"
+#include "inc/rplidar_cmd.h"
 #include "../BufferedSerial/BufferedSerial.h"
 struct RPLidarMeasurement
 {
@@ -55,7 +53,7 @@
 
     // open the given serial interface and try to connect to the RPLIDAR
     //bool begin(BufferedSerial &serialobj);
-    void begin();
+    void begin(BufferedSerial &serialobj);
     // close the currently opened serial interface
     void end();
 
@@ -76,13 +74,13 @@
 
     // wait for one sample point to arrive
     u_result waitPoint(_u32 timeout = RPLIDAR_DEFAULT_TIMEOUT);
-u_result _sendCommand(_u8 cmd, const void * payload, size_t payloadsize);
+    u_result _sendCommand(_u8 cmd, const void * payload, size_t payloadsize);
     // retrieve currently received sample point
-
     int Data[360];
     int ang,dis;
     int angMin,angMax;
     void setAngle(int min,int max);
+    void get_lidar();
     const RPLidarMeasurement & getCurrentPoint()
     {
         return _currentMeasurement;
@@ -93,9 +91,6 @@
     u_result _waitResponseHeader(rplidar_ans_header_t * header, _u32 timeout);
 
 protected:
-
-  //  BufferedSerial * _bined_serialdev;
-
+    BufferedSerial * _bined_serialdev;
     RPLidarMeasurement _currentMeasurement;
 };
-#endif