NHK2017Ateamかにろぼ

Dependencies:   2017NHKpin_config mbed FEP HMC6352 MotorDriverController PID QEI omni

classDiagram

    \ ̄\                   / ̄/ 
/l     \  \             /  / lヽ  
| ヽ  ヽ   |           |  /  / | 
\ ` ‐ヽ  ヽ  ●        ●         /  / ‐  / 
  \ __ l  |  ||___|| /  l __ / 
     \  \ /      \/ 
      /\|   人__人  |/\       
    //\|             |/\\     
    //\|             |/\\     
    /     . \_____/         \ 

                               ┏┓        ┏━┓┏┓              
     ┏┓         ┏┓┏┓   ┏┓    ┏┓┗┛     ┏┓ ┗┓┃┗┛              
┏┛┗━┓  ┃┃┃┃    ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ 
┗┓┏━┛  ┃┃┗┛    ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛    
┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓      ┏┛┃┃┃        ┃┃              
┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛      ┗━┛┃┃        ┃┃┏┓          
┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃         ┏┛┃        ┃┃┃┗━━┓    
┗┛┗━━┛┗━━━┛┗┛┗━━┛         ┗━┛        ┗┛┗━━━┛  
Revision:
19:3a62cbc6fee9
Parent:
18:41f7dd1a5ed1
Child:
22:bb6afe7332c3
--- a/bot/PIDcontroller/PID_controller.cpp	Thu Aug 31 10:34:55 2017 +0900
+++ b/bot/PIDcontroller/PID_controller.cpp	Mon Sep 04 01:01:13 2017 +0000
@@ -23,22 +23,22 @@
 }
 
 PIDC::PIDC(PinName sda, PinName scl, float kc, float ti, float td, float interval) :
-PID(kc, ti, td, interval), HMC6352(sda, scl)
-{
-    PID::setInputLimits(-INPUT_LIMIT, INPUT_LIMIT);
-    PID::setOutputLimits(-OUTPUT_LIMIT, OUTPUT_LIMIT);
-    PID::setBias(BIAS);
-    PID::setMode(AUTO_MODE);
-    PID::setSetPoint(0.0);
-
-    HMC6352::setOpMode(HMC6352_CONTINUOUS, 1, 20);
-    rawDegree = HMC6352::sample();
-    beforeDegree = HMC6352::sample();
-    offSetDegree = HMC6352::sample();
-    initDegree = 0;
-    turnOverNumber = 0;
-//    this -> attach(this, &PIDC::updateOutput, INTERVAL);
-}
+PID(kc, ti, td, interval), HMC6352(sda, scl)
+{
+    PID::setInputLimits(-INPUT_LIMIT, INPUT_LIMIT);
+    PID::setOutputLimits(-OUTPUT_LIMIT, OUTPUT_LIMIT);
+    PID::setBias(BIAS);
+    PID::setMode(AUTO_MODE);
+    PID::setSetPoint(0.0);
+
+    HMC6352::setOpMode(HMC6352_CONTINUOUS, 1, 20);
+    rawDegree = HMC6352::sample();
+    beforeDegree = HMC6352::sample();
+    offSetDegree = HMC6352::sample();
+    initDegree = 0;
+    turnOverNumber = 0;
+//    this -> attach(this, &PIDC::updateOutput, INTERVAL);
+}
 
 
 void PIDC::confirm()
@@ -56,3 +56,9 @@
 {
     return co;
 }
+
+
+void PIDC::calibration(int mode)
+{
+    setCalibrationMode(mode);
+}