main

Dependents:   00_yotsuba 200_yotsuba_21 200_yotuba_21_uiChange

Revision:
9:904dac75a729
Parent:
8:713bbc1fb58f
Child:
12:19149697667d
--- a/robot.h	Thu Mar 04 01:20:51 2021 +0000
+++ b/robot.h	Thu Mar 04 11:58:52 2021 +0000
@@ -1,61 +1,72 @@
 #ifndef ROBOT_H
 #define ROBOT_H
 
+#include "main.h"
+#include "sensorGen.h"
 #include "robo_config.h"
-#include "pin_config.h"
-#include "mbed.h"
 #include "kohiMD.h"
 #include "solenoid.h"
 #include "esc.h"
 #include "omni_wheel.h"
 #include "PID.h"
-#include "sensorGen.h"
-#include "aqm0802.h"
 
 class Robot
 {
 public :
+    /**コンストラクタ
+     * ピン設定
+     */
     Robot();
     
+    /**ボールが見えてる時用だよ
+     */
     void chaseBall();
     
+    /**ボールを見失ってる時だよ
+     */
     void lostBall();
     
-    void start(); // 強い奴はここ
+    /**強いよ
+     */
+    void start(uint8_t Team, uint8_t Algorithm);
     
+    /**モーターチェック
+     */
     void motorCheck(int motorNumber, float power);
     
-    void motorStop();
+    /**モーター以外のチェックをしてる時にモーターを止める関数だよ
+     */
+    void motorStop(double pwm);
     
+    /**キッカーチェックだよ
+     */
     void kickCheck();
     
+    /**ドリブラーチェックだよ
+     */
     void dribbleCheck(float power);
-private :
-    KohiMD *motor[4];    
-    Solenoid shot;
-    RCJESC drib;
-    PID spin;
-    OmniWheel omni;
-    Serial pc;
-    DigitalIn but;
-    Timer tim;
-    Timer lineOut;
-    sensor sensor;
+    
+    /**jyリセットだよ
+     */
+    
+    sensorgen sensor_;
+    OmniWheel      omni;
     
-    DigitalIn dip1;
-    DigitalIn dip2;
-    DigitalIn dip3;
-    DigitalIn b1;
-    DigitalIn b2;
-    aqm0802   lcd;
-    
-    
-    float theta;
-    float towardAngle;
-    float omni2wheel,omni3wheel;
-    float spin_power;
-    bool startb=0;
-    int i,_motorNumber;
+private :
+    KohiMD         *motor[4];    
+    Solenoid       shot;
+    RCJESC         drib;
+    PID            spin;
+    BufferedSerial pc;
+    Timer          tim;
+    Timer          lineOut;
+
+    float   theta;
+    float   towardAngle;
+    float   omni2wheel,omni3wheel;
+    float   spin_power, motorSpeed;
+    bool    startb=false;
+    uint8_t i,_motorNumber;
 };
 
 #endif
\ No newline at end of file