2019NHK_teamA_auto_measuring wheel

Dependencies:   QEI R1370MeasuringWheel

Revision:
7:e74a1688680d
Parent:
3:30045028d27e
--- a/measuring_wheel.h	Mon Aug 27 06:14:20 2018 +0000
+++ b/measuring_wheel.h	Tue Sep 18 15:22:01 2018 +0000
@@ -4,14 +4,18 @@
 #include "mbed.h"
 #include "QEI.h"
 #include "R1370.h"
-//#include "OmniPosition.h"
+#include "pin_config.h"
+#include "SerialMultiByte.h"
 #define PI 3.141592653589793
 
+#define FIRST_HEDDER 0xEE
+#define SECOND_HEDDER 0xFF
+#define BUFFER_SIZE 6
+
 class MeasuringWheel
 {
 public :
     MeasuringWheel(PinName channel1_1, PinName channel1_2, PinName channel2_1, PinName channel2_2, PinName channel3_1, PinName channel3_2);
-//    bool
 
     bool wheelDiameter(float diameter1, float diameter2, float diameter3);
 
@@ -20,7 +24,6 @@
     void transmissionXY();
     float getWheel1(),getWheel2(),getWheel3();
     float getjyroAngle();
-//    OmniPosition r1370;
 
 private :
     float diameter[3];
@@ -36,18 +39,16 @@
     QEI w3;
     R1370 r1370;
     float Cdif, yaw, yawdegree;
-//    Ticker ticker;
     Thread thread;
     uint16_t X_, Y_,ofsetX, ofsetY, yawdegree_;
     char upBitX, upBitY, upBitAngle;
     char downBitX,downBitY, downBitAngle;
-    Serial mainMicon;
     char get;
-    DigitalOut led;
     void resetposition(); 
-    
-//    unsigned char upBitangle down;
-//    void rawAngle();
+    float beforeYaw, nowYaw;
+    int yawMode;
+    uint8_t txdata[BUFFER_SIZE];
+    SerialMultiByte serial;