kani

Dependencies:   2017NHKpin_config FEP omni_wheel PID R1307 ikarashiMDC

classDiagram

    \ ̄\                   / ̄/ 
/l     \  \             /  / lヽ  
| ヽ  ヽ   |           |  /  / | 
\ ` ‐ヽ  ヽ  ●        ●         /  / ‐  / 
  \ __ l  |  ||___|| /  l __ / 
     \  \ /      \/ 
      /\|   人__人  |/\    <ズワイガニ  
    //\|             |/\\     
    //\|   ケガニ            |/\\     
    /     . \_____/         \ 

                               ┏┓        ┏━┓┏┓              
     ┏┓         ┏┓┏┓   ┏┓    ┏┓┗┛     ┏┓ ┗┓┃┗┛              
┏┛┗━┓  ┃┃┃┃    ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ 
┗┓┏━┛  ┃┃┗┛    ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛    
┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓      ┏┛┃┃┃        ┃┃              
┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛      ┗━┛┃┃        ┃┃┏┓          
┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃         ┏┛┃        ┃┃┃┗━━┓    
┗┛┗━━┛┗━━━┛┗┛┗━━┛         ┗━┛        ┗┛┗━━━┛  
Revision:
6:fe9767a50891
Parent:
5:16ea97725085
Child:
7:c6acf63088b0
--- a/bot/PIDcontroller/PID_controller.h	Wed Sep 06 17:47:20 2017 +0900
+++ b/bot/PIDcontroller/PID_controller.h	Wed Sep 06 18:39:19 2017 +0900
@@ -35,6 +35,7 @@
 const float INPUT_LIMIT = 180.0;
 const float OUTPUT_LIMIT = 0.4;
 const float BIAS = 0.0;
+const int SENSED_THRESHOLD = 1800;
 
 /**
 * @brief コンパスセンサを使ったPIDコントローラ
@@ -60,27 +61,25 @@
 
 
     void confirm();
-    void resetOffset();
-    void resetOffset2();
-    float getCo() const;
-    int getDegree() const;
+    void resetAxisOffset();
+    void resetPlaneOffset();
+    float getCalculationResult() const;
+    int getCurrentDegree() const;
     void calibration(int mode);
 private :
 
     void updateOutput();
 
-    int offSetDegree;
-    int offSetDegree2;
+    int axisOffSetDegree;
+    int planeOffSetDegree;
     int turnOverNumber;
     int beforeDegree;
 
 protected :
     int rawDegree;
-    float co;
-    float processValue;
-    int initDegree;
-    int initDegree2;
-    int baseAngle;
+    float calculationResult;
+    int axisCurrentDegree;
+    int planeCurrentDegree;
 };
 
 #endif//PID_CONTROLLER_H